From 325826790619b2e7a0ec29062ef702eb99eca518 Mon Sep 17 00:00:00 2001 From: "Adrien M. BERNEDE" <51493078+adrienbernede@users.noreply.github.com> Date: Mon, 15 Apr 2024 12:23:41 +0200 Subject: [PATCH 1/6] Update Shared CI with reproducer fix --- .gitlab-ci.yml | 4 ++-- .gitlab/jobs/corona.yml | 3 ++- .gitlab/jobs/lassen.yml | 3 ++- .gitlab/jobs/poodle.yml | 3 ++- .gitlab/jobs/ruby.yml | 3 ++- .gitlab/jobs/tioga.yml | 3 ++- .uberenv_config.json | 2 +- 7 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eb93921d..c2e21a7e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -73,7 +73,7 @@ stages: include: - local: '.gitlab/custom-jobs-and-variables.yml' - project: 'radiuss/radiuss-shared-ci' - ref: 'v2023.12.0' + ref: 'v2023.12.3' file: 'pipelines/${CI_MACHINE}.yml' - artifact: '${CI_MACHINE}-jobs.yml' job: 'generate-job-lists' @@ -84,7 +84,7 @@ stages: include: # [Optional] checks preliminary to running the actual CI test #- project: 'radiuss/radiuss-shared-ci' - # ref: 'v2023.12.0' + # ref: 'v2023.12.3' # file: 'utilities/preliminary-ignore-draft-pr.yml' # pipelines subscribed by the project - local: '.gitlab/subscribed-pipelines.yml' diff --git a/.gitlab/jobs/corona.yml b/.gitlab/jobs/corona.yml index 5aabd375..a461dd53 100644 --- a/.gitlab/jobs/corona.yml +++ b/.gitlab/jobs/corona.yml @@ -6,7 +6,8 @@ ############################################################################## # Override reproducer section to define project specific variables. -.corona_reproducer_vars: &corona_reproducer_vars +.corona_reproducer_vars: + script: - | echo -e "export MODULE_LIST=\"${MODULE_LIST}\"" echo -e "export SPEC=\"${SPEC//\"/\\\"}\"" diff --git a/.gitlab/jobs/lassen.yml b/.gitlab/jobs/lassen.yml index 14e7887c..5a39ae91 100644 --- a/.gitlab/jobs/lassen.yml +++ b/.gitlab/jobs/lassen.yml @@ -6,7 +6,8 @@ ############################################################################## # Override reproducer section to define project specific variables. -.lassen_reproducer_vars: &lassen_reproducer_vars +.lassen_reproducer_vars: + script: - | echo -e "export MODULE_LIST=\"${MODULE_LIST}\"" echo -e "export SPEC=\"${SPEC//\"/\\\"}\"" diff --git a/.gitlab/jobs/poodle.yml b/.gitlab/jobs/poodle.yml index ddf64f74..f0b121fc 100644 --- a/.gitlab/jobs/poodle.yml +++ b/.gitlab/jobs/poodle.yml @@ -6,7 +6,8 @@ ############################################################################### # Override reproducer section to define projet specific variables. -.poodle_reproducer_vars: &poodle_reproducer_vars +.poodle_reproducer_vars: + script: - | echo -e "export MODULE_LIST=\"${MODULE_LIST}\"" echo -e "export SPEC=\"${SPEC//\"/\\\"}\"" diff --git a/.gitlab/jobs/ruby.yml b/.gitlab/jobs/ruby.yml index ddf64f74..f0b121fc 100644 --- a/.gitlab/jobs/ruby.yml +++ b/.gitlab/jobs/ruby.yml @@ -6,7 +6,8 @@ ############################################################################### # Override reproducer section to define projet specific variables. -.poodle_reproducer_vars: &poodle_reproducer_vars +.poodle_reproducer_vars: + script: - | echo -e "export MODULE_LIST=\"${MODULE_LIST}\"" echo -e "export SPEC=\"${SPEC//\"/\\\"}\"" diff --git a/.gitlab/jobs/tioga.yml b/.gitlab/jobs/tioga.yml index a6cefb56..606f418a 100644 --- a/.gitlab/jobs/tioga.yml +++ b/.gitlab/jobs/tioga.yml @@ -6,7 +6,8 @@ ############################################################################## # Override reproducer section to define project specific variables. -.tioga_reproducer_vars: &tioga_reproducer_vars +.tioga_reproducer_vars: + script: - | echo -e "export MODULE_LIST=\"${MODULE_LIST}\"" echo -e "export SPEC=\"${SPEC//\"/\\\"}\"" diff --git a/.uberenv_config.json b/.uberenv_config.json index 01f5fc65..0a5e75d7 100644 --- a/.uberenv_config.json +++ b/.uberenv_config.json @@ -4,7 +4,7 @@ "package_final_phase": "initconfig", "package_source_dir": "../..", "spack_url": "https://github.com/spack/spack.git", -"spack_branch": "develop-2024-01-21", +"spack_branch": "develop-2024-02-18", "spack_activate": {}, "spack_configs_path": "scripts/radiuss-spack-configs", "spack_packages_path": ["scripts/radiuss-spack-configs/packages", "scripts/spack_packages/packages"], From 0609995053edd3e7c41f5561afa825beaf2e3c25 Mon Sep 17 00:00:00 2001 From: "Adrien M. BERNEDE" <51493078+adrienbernede@users.noreply.github.com> Date: Mon, 15 Apr 2024 13:46:31 +0200 Subject: [PATCH 2/6] Update Spack Configs - Use spack environments - Share CARE package, remove local copy - Use compilers wrappers on lassen - Update Uberenv --- .uberenv_config.json | 2 +- scripts/radiuss-spack-configs | 2 +- .../spack_packages/packages/care/package.py | 239 ------------------ scripts/spack_packages/repo.yaml | 2 - scripts/uberenv | 2 +- 5 files changed, 3 insertions(+), 244 deletions(-) delete mode 100644 scripts/spack_packages/packages/care/package.py delete mode 100644 scripts/spack_packages/repo.yaml diff --git a/.uberenv_config.json b/.uberenv_config.json index 0a5e75d7..da8cb1c0 100644 --- a/.uberenv_config.json +++ b/.uberenv_config.json @@ -7,7 +7,7 @@ "spack_branch": "develop-2024-02-18", "spack_activate": {}, "spack_configs_path": "scripts/radiuss-spack-configs", -"spack_packages_path": ["scripts/radiuss-spack-configs/packages", "scripts/spack_packages/packages"], +"spack_packages_path": "scripts/radiuss-spack-configs/packages", "spack_concretizer": "clingo", "spack_setup_clingo": false, "debug": true diff --git a/scripts/radiuss-spack-configs b/scripts/radiuss-spack-configs index c5854178..a8d22367 160000 --- a/scripts/radiuss-spack-configs +++ b/scripts/radiuss-spack-configs @@ -1 +1 @@ -Subproject commit c5854178b618b882386dd5f3c82fd34528b85522 +Subproject commit a8d22367e03d4c9c180a11886414430bdf6428a8 diff --git a/scripts/spack_packages/packages/care/package.py b/scripts/spack_packages/packages/care/package.py deleted file mode 100644 index 8824dd66..00000000 --- a/scripts/spack_packages/packages/care/package.py +++ /dev/null @@ -1,239 +0,0 @@ -# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -import socket - -from spack.package import * - -from .camp import blt_link_helpers -from .camp import cuda_for_radiuss_projects -from .camp import hip_for_radiuss_projects - - -class Care(CachedCMakePackage, CudaPackage, ROCmPackage): - """ - CHAI and RAJA extensions (includes data structures and algorithms). - """ - - homepage = "https://github.com/LLNL/CARE" - git = "https://github.com/LLNL/CARE.git" - - version('develop', branch='develop', submodules='True') - version('master', branch='master', submodules='True') - version('0.10.0', tag='v0.10.0', submodules='True') - version('0.3.0', tag='v0.3.0', submodules='True') - version('0.2.0', tag='v0.2.0', submodules='True') - - variant('openmp', default=False, description='Enable openmp') - variant("mpi", default=False, description="Enable MPI support") - - variant('tests', default=False, description='Build tests') - variant('benchmarks', default=False, description='Build benchmarks.') - variant('examples', default=False, description='Build examples.') - variant('docs', default=False, description='Build documentation') - - variant('implicit_conversions', default=False, description='Enable implicit conversions to/from raw pointers') - variant('loop_fuser', default=False, description='Enable loop fusion capability') - - depends_on('cmake@3.21:', type='build', when='+rocm') - depends_on('cmake@3.18:', type='build', when='@develop') - depends_on('cmake@3.14:', type='build', when='@0.10.0:') - - depends_on('blt@0.6.1:', type='build', when='@develop') - depends_on('blt@0.5.2:', type='build', when='@0.10.0:') - depends_on('blt@0.4.1:', type='build', when='@0.3.1:') - depends_on('blt@:0.3.6', type='build', when='@:0.3.0') - - depends_on('umpire') - depends_on('umpire+mpi', when='+mpi') - depends_on('umpire@2024.02.0:', when='@develop') - depends_on('umpire@2022.10.0:', when='@0.10.0:') - - depends_on('raja') - depends_on('raja@2024.02.0:', when='@develop') - depends_on('raja@2022.10.5:', when='@0.10.0:') - - # TODO: Add an enable_pick variant - depends_on('chai+raja+enable_pick') - depends_on('chai@2024.02.0:', when='@develop') - depends_on('chai@2022.10.0:', when='@0.10.0:') - - - with when('+openmp'): - depends_on('umpire+openmp') - depends_on('raja+openmp') - depends_on('chai+openmp') - - with when('+cuda'): - # WARNING: this package currently only supports an internal cub - # package. This will cause a race condition if compiled with another - # package that uses cub. TODO: have all packages point to the same external - # cub package. - depends_on('cub') - - depends_on('umpire+cuda') - depends_on('raja+cuda') - depends_on('chai+cuda') - - for sm_ in CudaPackage.cuda_arch_values: - depends_on('umpire+cuda cuda_arch={0}'.format(sm_), when='cuda_arch={0}'.format(sm_)) - depends_on('raja+cuda cuda_arch={0}'.format(sm_), when='cuda_arch={0}'.format(sm_)) - depends_on('chai+cuda cuda_arch={0}'.format(sm_), when='cuda_arch={0}'.format(sm_)) - - with when('+rocm'): - depends_on('umpire+rocm') - depends_on('raja+rocm') - depends_on('chai+rocm') - - for arch_ in ROCmPackage.amdgpu_targets: - depends_on('umpire+rocm amdgpu_target={0}'.format(arch_), when='amdgpu_target={0}'.format(arch_)) - depends_on('raja+rocm amdgpu_target={0}'.format(arch_), when='amdgpu_target={0}'.format(arch_)) - depends_on('chai+rocm amdgpu_target={0}'.format(arch_), when='amdgpu_target={0}'.format(arch_)) - - - def _get_sys_type(self, spec): - sys_type = spec.architecture - - if "SYS_TYPE" in env: - sys_type = env["SYS_TYPE"] - return sys_type - - - @property - def cache_name(self): - hostname = socket.gethostname() - - if "SYS_TYPE" in env: - hostname = hostname.rstrip("1234567890") - return "{0}-{1}-{2}@{3}-{4}.cmake".format( - hostname, - self._get_sys_type(self.spec), - self.spec.compiler.name, - self.spec.compiler.version, - self.spec.dag_hash(8) - ) - - - def initconfig_compiler_entries(self): - spec = self.spec - compiler = self.compiler - entries = super().initconfig_compiler_entries() - - #### BEGIN: Override CachedCMakePackage CMAKE_C_FLAGS and CMAKE_CXX_FLAGS - flags = spec.compiler_flags - - # use global spack compiler flags - cppflags = " ".join(flags["cppflags"]) - - if cppflags: - # avoid always ending up with " " with no flags defined - cppflags += " " - - cflags = cppflags + " ".join(flags["cflags"]) - - if cflags: - entries.append(cmake_cache_string("CMAKE_C_FLAGS", cflags)) - - cxxflags = cppflags + " ".join(flags["cxxflags"]) - - if cxxflags: - entries.append(cmake_cache_string("CMAKE_CXX_FLAGS", cxxflags)) - - fflags = " ".join(flags["fflags"]) - - if fflags: - entries.append(cmake_cache_string("CMAKE_Fortran_FLAGS", fflags)) - - #### END: Override CachedCMakePackage CMAKE_C_FLAGS and CMAKE_CXX_FLAGS - - blt_link_helpers(entries, spec, compiler) - - return entries - - - def initconfig_hardware_entries(self): - spec = self.spec - compiler = self.compiler - entries = super().initconfig_hardware_entries() - - entries.append(cmake_cache_option("ENABLE_OPENMP", '+openmp' in spec)) - - if '+cuda' in spec: - entries.append(cmake_cache_option("ENABLE_CUDA", True)) - entries.append(cmake_cache_option("CUDA_SEPARABLE_COMPILATION", True)) - entries.append(cmake_cache_string("CUDA_TOOLKIT_ROOT_DIR", spec['cuda'].prefix)) - entries.append(cmake_cache_string("CUB_DIR", spec['cub'].prefix)) - - cuda_for_radiuss_projects(entries, spec) - else: - entries.append(cmake_cache_option("ENABLE_CUDA", False)) - - if '+rocm' in spec: - entries.append(cmake_cache_option("ENABLE_HIP", True)) - entries.append(cmake_cache_string("HIP_ROOT_DIR", spec['hip'].prefix)) - - hip_for_radiuss_projects(entries, spec, compiler) - else: - entries.append(cmake_cache_option("ENABLE_HIP", False)) - - return entries - - - def initconfig_mpi_entries(self): - spec = self.spec - - entries = super(Care, self).initconfig_mpi_entries() - entries.append(cmake_cache_option("ENABLE_MPI", "+mpi" in spec)) - - return entries - - - def initconfig_package_entries(self): - spec = self.spec - entries = [] - - # TPL locations - entries.append("#------------------{0}".format("-" * 60)) - entries.append("# TPLs") - entries.append("#------------------{0}\n".format("-" * 60)) - - entries.append(cmake_cache_path('BLT_SOURCE_DIR', spec['blt'].prefix)) - entries.append(cmake_cache_path('UMPIRE_DIR', spec['umpire'].prefix)) - entries.append(cmake_cache_path('RAJA_DIR', spec['raja'].prefix)) - entries.append(cmake_cache_path('CHAI_DIR', spec['chai'].prefix)) - - # Build options - entries.append("#------------------{0}".format("-" * 60)) - entries.append("# Build Options") - entries.append("#------------------{0}\n".format("-" * 60)) - - entries.append(cmake_cache_string( - "CMAKE_BUILD_TYPE", spec.variants["build_type"].value)) - - entries.append(cmake_cache_option( - 'ENABLE_TESTS', '+tests' in spec)) - - entries.append(cmake_cache_option( - 'ENABLE_BENCHMARKS', '+benchmarks' in spec)) - - entries.append(cmake_cache_option( - 'ENABLE_EXAMPLES', '+examples' in spec)) - - entries.append(cmake_cache_option( - 'ENABLE_DOCS', '+docs' in spec)) - - entries.append(cmake_cache_option( - 'CARE_ENABLE_IMPLICIT_CONVERSIONS', '+implicit_conversions' in spec)) - - entries.append(cmake_cache_option( - 'CARE_ENABLE_LOOP_FUSER', '+loop_fuser' in spec)) - - return entries - - - def cmake_args(self): - options = [] - return options - diff --git a/scripts/spack_packages/repo.yaml b/scripts/spack_packages/repo.yaml deleted file mode 100644 index b97ec70d..00000000 --- a/scripts/spack_packages/repo.yaml +++ /dev/null @@ -1,2 +0,0 @@ -repo: - namespace: 'llnl.care' diff --git a/scripts/uberenv b/scripts/uberenv index 0d00dc8e..cf91883e 160000 --- a/scripts/uberenv +++ b/scripts/uberenv @@ -1 +1 @@ -Subproject commit 0d00dc8e19a889ba07ae433590b87533c4b5b3da +Subproject commit cf91883ef0500a808338ad6c8b56647da15fa5f3 From dc2c1651fae6124ea8a574b9009317f167592547 Mon Sep 17 00:00:00 2001 From: Adrien Bernede <51493078+adrienbernede@users.noreply.github.com> Date: Tue, 16 Apr 2024 15:41:41 +0200 Subject: [PATCH 3/6] Use new pci queue on tioga --- .gitlab/custom-jobs-and-variables.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab/custom-jobs-and-variables.yml b/.gitlab/custom-jobs-and-variables.yml index cdf42857..318e35c8 100644 --- a/.gitlab/custom-jobs-and-variables.yml +++ b/.gitlab/custom-jobs-and-variables.yml @@ -46,7 +46,7 @@ variables: # Tioga # Arguments for top level allocation - TIOGA_SHARED_ALLOC: "--exclusive --time-limit=20m --nodes=1" + TIOGA_SHARED_ALLOC: "--queue=pci --exclusive --time-limit=20m --nodes=1" # Arguments for job level allocation TIOGA_JOB_ALLOC: "--nodes=1 --begin-time=+5s" # Project specific variants for tioga From f91db7adbc479183436f57051c0596d3443cca26 Mon Sep 17 00:00:00 2001 From: Adrien Bernede <51493078+adrienbernede@users.noreply.github.com> Date: Wed, 17 Apr 2024 19:55:03 +0200 Subject: [PATCH 4/6] Apply changes required by LC (token handling) --- .gitlab-ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c2e21a7e..3507b342 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -73,7 +73,7 @@ stages: include: - local: '.gitlab/custom-jobs-and-variables.yml' - project: 'radiuss/radiuss-shared-ci' - ref: 'v2023.12.3' + ref: 'v2024.04.0' file: 'pipelines/${CI_MACHINE}.yml' - artifact: '${CI_MACHINE}-jobs.yml' job: 'generate-job-lists' @@ -82,9 +82,11 @@ stages: pipeline_variables: true include: + - project: 'lc-templates/id_tokens' + file: 'id_tokens.yml' # [Optional] checks preliminary to running the actual CI test #- project: 'radiuss/radiuss-shared-ci' - # ref: 'v2023.12.3' + # ref: 'v2024.04.0' # file: 'utilities/preliminary-ignore-draft-pr.yml' # pipelines subscribed by the project - local: '.gitlab/subscribed-pipelines.yml' From f8cdc01bc55a81f7cb91e325b77efbcbe6700ad7 Mon Sep 17 00:00:00 2001 From: "Adrien M. BERNEDE" <51493078+adrienbernede@users.noreply.github.com> Date: Tue, 4 Jun 2024 11:29:28 +0200 Subject: [PATCH 5/6] Restore settings for local packages repo --- .uberenv_config.json | 2 +- scripts/spack_packages/repo.yaml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 scripts/spack_packages/repo.yaml diff --git a/.uberenv_config.json b/.uberenv_config.json index da8cb1c0..0a5e75d7 100644 --- a/.uberenv_config.json +++ b/.uberenv_config.json @@ -7,7 +7,7 @@ "spack_branch": "develop-2024-02-18", "spack_activate": {}, "spack_configs_path": "scripts/radiuss-spack-configs", -"spack_packages_path": "scripts/radiuss-spack-configs/packages", +"spack_packages_path": ["scripts/radiuss-spack-configs/packages", "scripts/spack_packages/packages"], "spack_concretizer": "clingo", "spack_setup_clingo": false, "debug": true diff --git a/scripts/spack_packages/repo.yaml b/scripts/spack_packages/repo.yaml new file mode 100644 index 00000000..b97ec70d --- /dev/null +++ b/scripts/spack_packages/repo.yaml @@ -0,0 +1,2 @@ +repo: + namespace: 'llnl.care' From 01fbd61ab0d1c8a553ce662e96a3e84253a893cc Mon Sep 17 00:00:00 2001 From: "Adrien M. BERNEDE" <51493078+adrienbernede@users.noreply.github.com> Date: Tue, 4 Jun 2024 11:52:13 +0200 Subject: [PATCH 6/6] Add missing directory for Spack --- scripts/spack_packages/packages/README.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 scripts/spack_packages/packages/README.md diff --git a/scripts/spack_packages/packages/README.md b/scripts/spack_packages/packages/README.md new file mode 100644 index 00000000..808ab4c8 --- /dev/null +++ b/scripts/spack_packages/packages/README.md @@ -0,0 +1,6 @@ + +## Local Spack Packages + +This directory is meant to host Spack packages that have been tuned for CARE +specifically. Please consider submitting those packages to RADIUSS Spack +Configs or to Spack.