From 70b47c7186e265d98cc7bbdee4e5c25d58452942 Mon Sep 17 00:00:00 2001 From: Ben Cumming Date: Thu, 25 Apr 2024 16:15:53 +0200 Subject: [PATCH] mch-v6 software stack (#87) Add mch-v6 software stack. --- recipes/mch/v6/compilers.yaml | 4 +- recipes/mch/v6/config.yaml | 4 +- recipes/mch/v6/environments.yaml | 17 +- recipes/mch/v6/modules.yaml | 2 +- recipes/mch/v6/readme.md | 4 + .../v6/repo/packages/aws-ofi-nccl/package.py | 66 ++ .../mch/v6/repo/packages/cray-gtl/package.py | 123 +++ .../v6/repo/packages/cray-mpich/package.py | 210 ++++++ .../mch/v6/repo/packages/cray-pals/package.py | 89 +++ .../mch/v6/repo/packages/cray-pmi/package.py | 107 +++ recipes/mch/v6/repo/packages/cuda/package.py | 705 ++++++++++++++++++ recipes/mch/v6/repo/packages/nvhpc/package.py | 94 ++- recipes/mch/validation/compilers.yaml | 5 + recipes/mch/validation/config.yaml | 6 + recipes/mch/validation/environments.yaml | 29 + recipes/mch/validation/modules.yaml | 36 + .../repo/packages/r/change_optflags_tmp.patch | 67 ++ .../mch/validation/repo/packages/r/package.py | 262 +++++++ .../mch/validation/repo/packages/r/zlib.patch | 29 + scripts/setup-stackinator | 4 +- stack-build | 2 +- 21 files changed, 1840 insertions(+), 25 deletions(-) create mode 100644 recipes/mch/v6/readme.md create mode 100644 recipes/mch/v6/repo/packages/aws-ofi-nccl/package.py create mode 100644 recipes/mch/v6/repo/packages/cray-gtl/package.py create mode 100644 recipes/mch/v6/repo/packages/cray-mpich/package.py create mode 100644 recipes/mch/v6/repo/packages/cray-pals/package.py create mode 100644 recipes/mch/v6/repo/packages/cray-pmi/package.py create mode 100644 recipes/mch/v6/repo/packages/cuda/package.py create mode 100644 recipes/mch/validation/compilers.yaml create mode 100644 recipes/mch/validation/config.yaml create mode 100644 recipes/mch/validation/environments.yaml create mode 100644 recipes/mch/validation/modules.yaml create mode 100644 recipes/mch/validation/repo/packages/r/change_optflags_tmp.patch create mode 100644 recipes/mch/validation/repo/packages/r/package.py create mode 100644 recipes/mch/validation/repo/packages/r/zlib.patch diff --git a/recipes/mch/v6/compilers.yaml b/recipes/mch/v6/compilers.yaml index 8baf3d6a..6ed59567 100644 --- a/recipes/mch/v6/compilers.yaml +++ b/recipes/mch/v6/compilers.yaml @@ -4,6 +4,6 @@ gcc: specs: - gcc@11.3 llvm: - requires: gcc@11 + requires: gcc@11.3 specs: - - nvhpc@23.3 + - nvhpc@24.1 diff --git a/recipes/mch/v6/config.yaml b/recipes/mch/v6/config.yaml index 169ba387..7d09e55b 100644 --- a/recipes/mch/v6/config.yaml +++ b/recipes/mch/v6/config.yaml @@ -1,6 +1,6 @@ name: mch -store: /user-environment +store: /mch-environment/v6 spack: - commit: releases/v0.20 + commit: releases/v0.19 repo: https://github.com/spack/spack.git description: The compiler toolchains, libraries and tools required for the MCH production software stack. diff --git a/recipes/mch/v6/environments.yaml b/recipes/mch/v6/environments.yaml index 79095165..c5d6aba8 100644 --- a/recipes/mch/v6/environments.yaml +++ b/recipes/mch/v6/environments.yaml @@ -1,17 +1,13 @@ tools: compiler: - toolchain: gcc - spec: gcc@11.3 + spec: gcc unify: when_possible specs: - - ccache - cmake@3.24 - python@3.7 - python@3.10 - libtree - - meson - - ninja - - tmux - tree - ruby@3.1.0 - r@4.0.5 @@ -23,12 +19,12 @@ tools: prgenv-nvidia: compiler: - toolchain: gcc - spec: gcc@11.3 + spec: gcc - toolchain: llvm spec: nvhpc unify: when_possible mpi: - spec: cray-mpich@8.1.25 + spec: cray-mpich@8.1.26%nvhpc gpu: cuda packages: - perl @@ -72,17 +68,19 @@ prgenv-nvidia: views: prgenv-icon: exclude: ['eccodes@2.19.1'] + link: roots prgenv-gcc: compiler: - toolchain: gcc - spec: gcc@11.3 + spec: gcc unify: when_possible mpi: - spec: cray-mpich@8.1.25 + spec: cray-mpich@8.1.26 gpu: cuda packages: - perl - curl + - libx11 specs: - cuda@11.8 - osu-micro-benchmarks@5.9 @@ -108,3 +106,4 @@ prgenv-gcc: - netcdf-c+mpi - netcdf-fortran ^netcdf-c+mpi - eccodes@2.25.0 + link: roots diff --git a/recipes/mch/v6/modules.yaml b/recipes/mch/v6/modules.yaml index dc7ad15c..6b82de3c 100644 --- a/recipes/mch/v6/modules.yaml +++ b/recipes/mch/v6/modules.yaml @@ -68,7 +68,7 @@ modules: all: '{name}/{version}-{compiler.name}' nvhpc: '{name}/{version}' gcc: '{name}/{version}' - cray-mpich: 'cray-mpich-binary/{version}' + cray-mpich: 'cray-mpich-{compiler.name}/{version}' python: '{name}/{version}' hdf5%gcc~mpi: '{name}/{version}-serial-{compiler.name}' netcdf-c~mpi: '{name}/{version}-serial-{compiler.name}' diff --git a/recipes/mch/v6/readme.md b/recipes/mch/v6/readme.md new file mode 100644 index 00000000..15e567d6 --- /dev/null +++ b/recipes/mch/v6/readme.md @@ -0,0 +1,4 @@ +This software stack uses spack v0.19, which requires a specially patched version of stackinator. + +* use the `mch-v6-v0.19` branch of stackinator. +* use a separate build cache, because v0.19 caches are not compatible with v0.20 or later diff --git a/recipes/mch/v6/repo/packages/aws-ofi-nccl/package.py b/recipes/mch/v6/repo/packages/aws-ofi-nccl/package.py new file mode 100644 index 00000000..51347b6c --- /dev/null +++ b/recipes/mch/v6/repo/packages/aws-ofi-nccl/package.py @@ -0,0 +1,66 @@ +# Copyright 2013-2024 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) + +from spack.package import * + + +class AwsOfiNccl(AutotoolsPackage): + """AWS OFI NCCL is a plug-in which enables EC2 developers to use + libfabric as a network provider while running NVIDIA's NCCL based + applications.""" + + homepage = "https://github.com/aws/aws-ofi-nccl" + git = "https://github.com/aws/aws-ofi-nccl.git" + url = "https://github.com/aws/aws-ofi-nccl.git" + + #maintainers("bvanessen") + + version("master", branch="master") + version("v1.7.4", + sha256="cca529da330d3155ae1502c21365d62159254bca6bfc0482afd35e7eaa927090", + url="https://github.com/aws/aws-ofi-nccl/releases/download/v1.7.4-aws/aws-ofi-nccl-1.7.4-aws.tar.gz", + ) + + variant("trace", default=False, description="Enable printing trace messages") + variant("tests", default=False, description="Build tests") + + depends_on("libfabric") + depends_on("cuda") + depends_on("nccl") + depends_on("mpi") + depends_on("hwloc") + depends_on("autoconf", type="build") + depends_on("automake", type="build") + depends_on("libtool", type="build") + + # To enable this plug-in to work with NCCL add it to the LD_LIBRARY_PATH + def setup_run_environment(self, env): + aws_ofi_nccl_home = self.spec.prefix + env.append_path("LD_LIBRARY_PATH", aws_ofi_nccl_home.lib) + + # To enable this plug-in to work with NCCL add it to the LD_LIBRARY_PATH + def setup_dependent_run_environment(self, env, dependent_spec): + aws_ofi_nccl_home = self.spec["aws-ofi-nccl"].prefix + env.append_path("LD_LIBRARY_PATH", aws_ofi_nccl_home.lib) + + def configure_args(self): + spec = self.spec + args = [] + + # Always set configure's external paths to use the Spack + # provided dependencies + args.extend( + [ + "--with-libfabric={0}".format(spec["libfabric"].prefix), + "--with-cuda={0}".format(spec["cuda"].prefix), + "--with-nccl={0}".format(spec["nccl"].prefix), + "--with-mpi={0}".format(spec["mpi"].prefix), + ] + ) + + args.extend(self.enable_or_disable("trace")) + args.extend(self.enable_or_disable("tests")) + + return args diff --git a/recipes/mch/v6/repo/packages/cray-gtl/package.py b/recipes/mch/v6/repo/packages/cray-gtl/package.py new file mode 100644 index 00000000..37dc9672 --- /dev/null +++ b/recipes/mch/v6/repo/packages/cray-gtl/package.py @@ -0,0 +1,123 @@ +# 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 os +import platform + +import spack.compilers +from spack.package import * + +_versions = { + "8.1.29": { + "Linux-aarch64": "321bc3bc3c17f38d199e0ccae87cc931f69ca58238385f1e6a6165a2fbe94a71", + }, + "8.1.28": { + "Linux-aarch64": "0bb881cba502b199dadce7875bba62e7403e1c55abc6669c76a7cba7c05fa5ad", + "Linux-x86_64": "2e82c618648e79bdc4b8bf9394be8fd59c34ccd77f172afd11fce38beca1ecab", + }, + "8.1.27": { + "Linux-x86_64": "80c7e94d30b5a3573ac6b2cc5fb0373046760a0acdff44a178e723ab3c8fdfb9" + }, + "8.1.26": { + "Linux-x86_64": "37d9626cb5f851f63c9799c18a419354c6f21c77f90558472552156df9eef311" + }, + "8.1.25": { + "Linux-x86_64": "a2e2af2037e63b64ef74d870c0bab91a8109e75eef82a30250b81b0d785ff6ae" + }, + "8.1.24": { + "Linux-x86_64": "2fa8635f829e67844e7b30dffb092a336d257e0e769d2225030f2ccf4c1d302f" + }, + "8.1.23": { + "Linux-x86_64": "034667c2ea49eec76ef8f79494231bad94884b99683edabf781beed01ec681e4" + }, + "8.1.21": { + "Linux-x86_64": "78072edfcb6cc24cfefab06e824111b5b2b839551235ece68cd154bec7936a24" + }, + "8.1.18": { + "Linux-x86_64": "79c24203a27b67d3aa15ebaab6121e7e72e8a2be61622876179f694a7fb4399c" + }, +} + + +class CrayGtl(Package): + """Install cray-gtl""" + + homepage = "https://www.hpe.com/us/en/compute/hpc/hpc-software.html" + url = "https://jfrog.svc.cscs.ch/artifactory/cray-mpich/cray-gtl-8.1.26.tar.gz" + #maintainers = ["bcumming", "simonpintarelli"] + + for ver, packages in _versions.items(): + key = "{0}-{1}".format(platform.system(), platform.machine()) + sha = packages.get(key) + if sha: + version( + ver, + sha256=sha, + url=f"https://jfrog.svc.cscs.ch/artifactory/cray-mpich/cray-gtl-{ver}.{platform.machine()}.tar.gz", + ) + + variant("cuda", default=False) + variant("rocm", default=False) + conflicts("+cuda", when="+rocm", msg="Pick either CUDA or ROCM") + + # Fix up binaries with patchelf. + depends_on("patchelf", type="build") + + conflicts("+cuda", when="+rocm", msg="Pick either CUDA or ROCM") + + with when("+cuda"): + depends_on("cuda@11.0:11", type="link", when="@:8.1.26") + depends_on("cuda@12.0:12", type="link", when="@8.1.27:") + + with when("+rocm"): + # libamdhip64.so.5 + depends_on("hip@5:", type="link") + # libhsa-runtime64.so.1 + depends_on("hsa-rocr-dev", type="link") + + def get_rpaths(self): + # Those rpaths are already set in the build environment, so + # let's just retrieve them. + pkgs = os.getenv("SPACK_RPATH_DIRS", "").split(":") + compilers = os.getenv("SPACK_COMPILER_IMPLICIT_RPATHS", "").split(":") + return ":".join([p for p in pkgs + compilers if p]) + + def should_patch(self, file): + # Returns true if non-symlink ELF file. + if os.path.islink(file): + return False + try: + with open(file, "rb") as f: + return f.read(4) == b"\x7fELF" + except OSError: + return False + + def install(self, spec, prefix): + install_tree(".", prefix) + + @property + def libs(self): + if "+cuda" in self.spec: + return find_libraries("libmpi_gtl_cuda", root=self.prefix, shared=True) + if "+rocm" in self.spec: + return find_libraries("libmpi_gtl_hsa", root=self.prefix, shared=True) + + @run_after("install") + def fixup_binaries(self): + patchelf = which("patchelf") + rpath = self.get_rpaths() + for root, _, files in os.walk(self.prefix): + for name in files: + f = os.path.join(root, name) + if not self.should_patch(f): + continue + patchelf("--force-rpath", "--set-rpath", rpath, f, fail_on_error=False) + # The C compiler wrapper can fail because libmpi_gtl_cuda refers to the symbol + # __gxx_personality_v0 but wasn't linked against libstdc++. + if "libmpi_gtl_cuda.so" in str(f): + patchelf("--add-needed", "libstdc++.so", f, fail_on_error=False) + if "@8.1.27+cuda" in self.spec: + patchelf("--add-needed", "libcudart.so", f, fail_on_error=False) + patchelf("--add-needed", "libcuda.so", f, fail_on_error=False) diff --git a/recipes/mch/v6/repo/packages/cray-mpich/package.py b/recipes/mch/v6/repo/packages/cray-mpich/package.py new file mode 100644 index 00000000..57ca977c --- /dev/null +++ b/recipes/mch/v6/repo/packages/cray-mpich/package.py @@ -0,0 +1,210 @@ +# 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 os +import platform + +import spack.compilers +from spack.package import * + +_versions = { + "8.1.29": { + "Linux-aarch64": "2fc5d1f5743f9cecc0b5dbf13355c25014f96db2386b5c2c2d8495a57b279381", + }, + "8.1.28": { + "Linux-aarch64": "dfd6c685adfbf070fe9d546d95b31e108ee7089a738447fa7326973a3e696e8d", + "Linux-x86_64": "55a0a068bd8bff14f302c5371d7e2b4cf732d5c1ec875bb03e375644e1a6beab", + }, + "8.1.27": { + "Linux-x86_64": "5d59cc69b7ae2ef692ae49843bb2c7a44b5a8478d72eaf2ab1f1f6c5983eee0b" + }, + "8.1.26": { + "Linux-x86_64": "d308cf3e254ce5873af6caee5ec683a397fed5ce92975f57e5c9215a98d8edad" + }, + "8.1.25": { + "Linux-x86_64": "024ab0c4526670a37df7e2995172ba264454fd69c05d8ffe140c9e519397a65c" + }, + "8.1.24": { + "Linux-x86_64": "2c3fa339511ed822892e112d3e4d5a39a634d00a31cf22e02ce843f0efcc5ae8" + }, + "8.1.23": { + "Linux-x86_64": "ed7ff286ede30ea96dede4c53aa2ef98e8090c988a0bea764cd505ba5fcc0520" + }, + "8.1.21": { + "Linux-x86_64": "5fda115f356c26e5d9f8cc68fe578e954a70edd10ebf007182d945345886b61a" + }, + "8.1.18": { + "Linux-x86_64": "f7feafd204502d0dab449ff22da138c933ec22d7de3d5e30fbb9a62fc9cdf237" + }, +} + + +class CrayMpich(Package): + """Install cray-mpich as a binary package""" + + """Intended to override the main cray-mpich""" + + homepage = "https://www.hpe.com/us/en/compute/hpc/hpc-software.html" + url = "https://jfrog.svc.cscs.ch/artifactory/cray-mpich/cray-mpich-8.1.26.tar.gz" + #maintainers = ["bcumming"] + for ver, packages in _versions.items(): + key = "{0}-{1}".format(platform.system(), platform.machine()) + sha = packages.get(key) + if sha: + version( + ver, + sha256=sha, + url=f"https://jfrog.svc.cscs.ch/artifactory/cray-mpich/cray-mpich-{ver}.{platform.machine()}.tar.gz", + ) + + variant("cuda", default=False) + variant("rocm", default=False) + + conflicts("+cuda", when="+rocm", msg="Pick either CUDA or ROCM") + + provides("mpi") + + # Fix up binaries with patchelf. + depends_on("patchelf", type="build") + + for ver in [ + "8.1.18", + "8.1.21", + "8.1.23", + "8.1.24", + "8.1.25", + "8.1.26", + "8.1.27", + "8.1.28", + "8.1.29", + ]: + with when("+cuda"): + depends_on(f"cray-gtl@{ver} +cuda", type="link", when="@" + ver) + with when("+rocm"): + depends_on(f"cray-gtl@{ver} +rocm", type="link", when="@" + ver) + + depends_on("libfabric@1:", type="link") + + depends_on("cray-pmi", type="link") + depends_on("xpmem", type="link") + + conflicts("%gcc@:7") + conflicts("%gcc@:11", when="@8.1.28:") + + def setup_run_environment(self, env): + env.set("MPICC", join_path(self.prefix.bin, "mpicc")) + env.set("MPICXX", join_path(self.prefix.bin, "mpic++")) + env.set("MPIF77", join_path(self.prefix.bin, "mpif77")) + env.set("MPIF90", join_path(self.prefix.bin, "mpif90")) + + def setup_dependent_build_environment(self, env, dependent_spec): + self.setup_run_environment(env) + env.set("MPICH_CC", dependent_spec.package.module.spack_cc) + env.set("MPICH_CXX", dependent_spec.package.module.spack_cxx) + env.set("MPICH_FC", dependent_spec.package.module.spack_fc) + + def setup_dependent_package(self, module, dependent_spec): + self.spec.mpicc = join_path(self.prefix.bin, "mpicc") + self.spec.mpicxx = join_path(self.prefix.bin, "mpic++") + self.spec.mpifc = join_path(self.prefix.bin, "mpif90") + self.spec.mpif77 = join_path(self.prefix.bin, "mpif77") + + def get_rpaths(self): + # Those rpaths are already set in the build environment, so + # let's just retrieve them. + pkgs = os.getenv("SPACK_RPATH_DIRS", "").split(":") + compilers = os.getenv("SPACK_COMPILER_IMPLICIT_RPATHS", "").split(":") + return ":".join([p for p in pkgs + compilers if p]) + + def should_patch(self, file): + # Returns true if non-symlink ELF file. + if os.path.islink(file): + return False + try: + with open(file, "rb") as f: + return f.read(4) == b"\x7fELF" + except OSError: + return False + + def install(self, spec, prefix): + if "%nvhpc" in self.spec: + install_tree("mpich-nvhpc", prefix) + elif "%gcc" in self.spec: + install_tree("mpich-gcc", prefix) + + @run_after("install") + def fixup_binaries(self): + patchelf = which("patchelf") + rpath = self.get_rpaths() + for root, _, files in os.walk(self.prefix): + for name in files: + f = os.path.join(root, name) + if not self.should_patch(f): + continue + patchelf("--force-rpath", "--set-rpath", rpath, f, fail_on_error=False) + patchelf("--add-needed", "libxpmem.so", f, fail_on_error=False) + if "+cuda" in self.spec: + patchelf("--add-needed", "libmpi_gtl_cuda.so", f, fail_on_error=False) + if "+rocm" in self.spec: + patchelf("--add-needed", "libmpi_gtl_hsa.so", f, fail_on_error=False) + + @run_after("install") + def fixup_compiler_paths(self): + filter_file("@@CC@@", self.compiler.cc, self.prefix.bin.mpicc, string=True) + filter_file("@@CXX@@", self.compiler.cxx, self.prefix.bin.mpicxx, string=True) + filter_file("@@FC@@", self.compiler.fc, self.prefix.bin.mpifort, string=True) + + filter_file("@@PREFIX@@", self.prefix, self.prefix.bin.mpicc, string=True) + filter_file("@@PREFIX@@", self.prefix, self.prefix.bin.mpicxx, string=True) + filter_file("@@PREFIX@@", self.prefix, self.prefix.bin.mpifort, string=True) + + # link with the relevant gtl lib + if "+cuda" in self.spec: + lpath = self.spec["cray-gtl"].prefix.lib + gtl_library = f"-L{lpath} -Wl,-rpath,{lpath} -lmpi_gtl_cuda" + elif "+rocm" in self.spec: + lpath = self.spec["cray-gtl"].prefix.lib + gtl_library = f"-L{lpath} -Wl,-rpath,{lpath} -lmpi_gtl_hsa" + else: + gtl_library = "" + print("==== GTL_LIBRARY", gtl_library) + filter_file("@@GTL_LIBRARY@@", gtl_library, self.prefix.bin.mpicc, string=True) + filter_file("@@GTL_LIBRARY@@", gtl_library, self.prefix.bin.mpicxx, string=True) + filter_file( + "@@GTL_LIBRARY@@", gtl_library, self.prefix.bin.mpifort, string=True + ) + + @property + def headers(self): + hdrs = find_headers("mpi", self.prefix.include, recursive=True) + hdrs += find_headers( + "cray_version", self.prefix.include, recursive=True + ) # cray_version.h + # cray-mpich depends on cray-pmi + # hdrs += find_headers("pmi", self.prefix.include, recursive=True) # See cray-pmi package + hdrs.directories = os.path.dirname(hdrs[0]) + return hdrs + + @property + def libs(self): + query_parameters = self.spec.last_query.extra_parameters + + libraries = ["libmpi", "libmpich"] + + if "f77" in query_parameters: + libraries.extend(["libmpifort", "libmpichfort", "libfmpi", "libfmpich"]) + + if "f90" in query_parameters: + libraries.extend(["libmpif90", "libmpichf90"]) + + libs = [] + for lib_folder in [self.prefix.lib, self.prefix.lib64]: + libs += find_libraries(libraries, root=lib_folder, recursive=True) + # cray-mpich depends on cray-pmi + # libs += find_libraries("libpmi", root=lib_folder, recursive=True) + libs += find_libraries("libopa", root=lib_folder, recursive=True) + libs += find_libraries("libmpl", root=lib_folder, recursive=True) + + return libs diff --git a/recipes/mch/v6/repo/packages/cray-pals/package.py b/recipes/mch/v6/repo/packages/cray-pals/package.py new file mode 100644 index 00000000..6d307c9b --- /dev/null +++ b/recipes/mch/v6/repo/packages/cray-pals/package.py @@ -0,0 +1,89 @@ +# 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 os +import platform + +import spack.compilers +from spack.package import * + +_versions = { + "1.3.2": { + "Linux-aarch64": "f7b97a10cc8dde17e804f79235ab1aa98f83e0c7c178e58d6ca3e9170f89c6da", + "Linux-x86_64": "deea749476de0f545b31fcd0912f133d7ba60b84f673e47d8b4b15d5a117254c", + }, + "1.2.12": { + "Linux-x86_64": "c94d29c09ed650c4e98a236df7ced77f027bdf987919a91a1a1382f704a85bb9" + }, + "1.2.11": { + "Linux-x86_64": "e1af09e39d70e28381de806548c6cb29c23abf891a078f46eb71c301a3f0994c" + }, + "1.2.9": { + "Linux-x86_64": "ceec6f99bea9df3f7f657a7df499445e62976064dda3f3e437d61e895ec31601" + }, + "1.2.5": { + "Linux-x86_64": "d7269ed8f4deab816e3d4006090ec68b25ccc585200d16728ed9a914baf4d9bf" + }, + "1.2.4": { + "Linux-x86_64": "a253939585bad2bb9061b98be6e517f18bda0602ecfd38f75c734a01d12003f2" + }, + "1.2.0": { + "Linux-x86_64": "6f5c71aa4dd2f591b899ea693cae7a5319d859f69d8c46b7ee244fed8c094d10" + }, +} + + +class CrayPals(Package): + """Install cray-pals""" + + """Intended to override the main cray-pals""" + + homepage = "https://www.hpe.com/us/en/compute/hpc/hpc-software.html" + url = "https://jfrog.svc.cscs.ch/artifactory/cray-mpich/cray-pals-1.2.12.tar.gz" + #maintainers = ["simonpintarelli"] + + for ver, packages in _versions.items(): + key = "{0}-{1}".format(platform.system(), platform.machine()) + sha = packages.get(key) + if sha: + version( + ver, + sha256=sha, + url=f"https://jfrog.svc.cscs.ch/artifactory/cray-mpich/cray-pals-{ver}.{platform.machine()}.tar.gz", + ) + + # Fix up binaries with patchelf. + depends_on("patchelf", type="build") + + def get_rpaths(self): + # Those rpaths are already set in the build environment, so + # let's just retrieve them. + pkgs = os.getenv("SPACK_RPATH_DIRS", "").split(":") + compilers = os.getenv("SPACK_COMPILER_IMPLICIT_RPATHS", "").split(":") + return ":".join([p for p in pkgs + compilers if p]) + + def should_patch(self, file): + # Returns true if non-symlink ELF file. + if os.path.islink(file): + return False + try: + with open(file, "rb") as f: + return f.read(4) == b"\x7fELF" + except OSError: + return False + + def install(self, spec, prefix): + install_tree(".", prefix) + + @run_after("install") + def fixup_binaries(self): + patchelf = which("patchelf") + rpath = self.get_rpaths() + for root, _, files in os.walk(self.prefix): + for name in files: + f = os.path.join(root, name) + if not self.should_patch(f): + continue + patchelf("--force-rpath", "--set-rpath", rpath, f, fail_on_error=False) diff --git a/recipes/mch/v6/repo/packages/cray-pmi/package.py b/recipes/mch/v6/repo/packages/cray-pmi/package.py new file mode 100644 index 00000000..19491213 --- /dev/null +++ b/recipes/mch/v6/repo/packages/cray-pmi/package.py @@ -0,0 +1,107 @@ +# 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 os +import platform + +import spack.compilers +from spack.package import * + +_versions = { + "6.1.14": { + "Linux-aarch64": "763933310db675c3e690c9a121778c2ddc3a0b8672cb718542888e31099e25c7", + }, + "6.1.13": { + "Linux-aarch64": "f865f410145a66bb05520c32ee5b64b6dfcb9ae33aace6d3db5f870e4f4714bc", + "Linux-x86_64": "217ac554cf84a4c7f08cd149c6a18428e1e3533d73e350fa291b6800895b632e", + }, + "6.1.12": { + "Linux-x86_64": "d1a4bd929b73197823dd9b4bcb3c8ef06d80326297a07291b24e5996b60330a8" + }, + "6.1.11": { + "Linux-x86_64": "5ebcece6a610da02cd41a9a386fd7463ee909bd55e3370d6d372603f90be9afe" + }, + "6.1.10": { + "Linux-x86_64": "f4fbe75c201a171dcfe6ada773a4bf0c606767a0b7a8a76fd19d10852abe1290" + }, + "6.1.9": { + "Linux-x86_64": "8fd4194c6c5167f8b81b1cf9b76341669e40d647d0caecef287be6f0f5d95290" + }, + "6.1.8": { + "Linux-x86_64": "6c7e5d3038e26b9d0e82428b25b570d00401a6fc9f2fd3c008f15a253a8e2305" + }, + "6.1.7": { + "Linux-x86_64": "574b21bd6f8970521c2bc4f096aced896fec8b749f854272cc7bbb7130ae92d8" + }, + "6.0.17": { + "Linux-x86_64": "5f15cd577c6c082888fcf0f76f0f5a898ddfa32370e1c32ffe926912d4d4dad0" + }, +} + + +class CrayPmi(Package): + """Install cray-pmi""" + + """Intended to override the main cray-pmi""" + + homepage = "https://www.hpe.com/us/en/compute/hpc/hpc-software.html" + url = "https://jfrog.svc.cscs.ch/artifactory/cray-mpich/cray-pmi-6.1.11.tar.gz" + #maintainers = ["bcumming", "simonpintarelli"] + + for ver, packages in _versions.items(): + key = "{0}-{1}".format(platform.system(), platform.machine()) + sha = packages.get(key) + if sha: + version( + ver, + sha256=sha, + url=f"https://jfrog.svc.cscs.ch/artifactory/cray-mpich/cray-pmi-{ver}.{platform.machine()}.tar.gz", + ) + + # Fix up binaries with patchelf. + depends_on("patchelf", type="build") + + depends_on("cray-pals@1.3.2", type="link", when="@6.1.13:") + depends_on("cray-pals@1.2.12", type="link", when="@6.1.11:6.1.12") + depends_on("cray-pals@1.2.11", type="link", when="@6.1.10") + depends_on("cray-pals@1.2.9", type="link", when="@6.1.9") + depends_on("cray-pals@1.2.5", type="link", when="@6.1.8") + depends_on("cray-pals@1.2.4", type="link", when="@6.1.7") + depends_on("cray-pals@1.2.0", type="link", when="@6.0.17") + + def get_rpaths(self): + # Those rpaths are already set in the build environment, so + # let's just retrieve them. + pkgs = os.getenv("SPACK_RPATH_DIRS", "").split(":") + compilers = os.getenv("SPACK_COMPILER_IMPLICIT_RPATHS", "").split(":") + return ":".join([p for p in pkgs + compilers if p]) + + def should_patch(self, file): + # Returns true if non-symlink ELF file. + if os.path.islink(file): + return False + try: + with open(file, "rb") as f: + return f.read(4) == b"\x7fELF" + except OSError: + return False + + def install(self, spec, prefix): + install_tree(".", prefix) + + @property + def libs(self): + return find_libraries(["libmpi", "libpmi2"], root=self.prefix, shared=True) + + @run_after("install") + def fixup_binaries(self): + patchelf = which("patchelf") + rpath = self.get_rpaths() + for root, _, files in os.walk(self.prefix): + for name in files: + f = os.path.join(root, name) + if not self.should_patch(f): + continue + patchelf("--force-rpath", "--set-rpath", rpath, f, fail_on_error=False) diff --git a/recipes/mch/v6/repo/packages/cuda/package.py b/recipes/mch/v6/repo/packages/cuda/package.py new file mode 100644 index 00000000..bcb1c034 --- /dev/null +++ b/recipes/mch/v6/repo/packages/cuda/package.py @@ -0,0 +1,705 @@ +# Copyright 2013-2024 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 os +import platform +import re +from glob import glob + +import llnl.util.tty as tty + +from spack.package import * + +# FIXME Remove hack for polymorphic versions +# This package uses a ugly hack to be able to dispatch, given the same +# version, to different binary packages based on the platform that is +# running spack. See #13827 for context. +# If you need to add a new version, please be aware that: +# - versions in the following dict are automatically added to the package +# - version tuple must be in the form (checksum, url) +# - checksum must be sha256 +# - package key must be in the form '{os}-{arch}' where 'os' is in the +# format returned by platform.system() and 'arch' by platform.machine() + +preferred_ver = "11.8.0" +_versions = { + "12.4.0": { + "Linux-aarch64": ( + "b12bfe6c36d32ecf009a6efb0024325c5fc389fca1143f5f377ae2555936e803", + "https://developer.download.nvidia.com/compute/cuda/12.4.0/local_installers/cuda_12.4.0_550.54.14_linux_sbsa.run", + ), + "Linux-x86_64": ( + "e6a842f4eca9490575cdb68b6b1bb78d47b95a897de48dee292c431892e57d17", + "https://developer.download.nvidia.com/compute/cuda/12.4.0/local_installers/cuda_12.4.0_550.54.14_linux.run", + ), + }, + "12.3.0": { + "Linux-aarch64": ( + "9a8fb8acf46b88faf0d711bda3149e1706efbbae02fcb40ab72addfd0e9ce5df", + "https://developer.download.nvidia.com/compute/cuda/12.3.0/local_installers/cuda_12.3.0_545.23.06_linux_sbsa.run", + ), + "Linux-x86_64": ( + "7c13face3af64d6e1648d6e3101d31c8111e747143acb0077d973c1690820422", + "https://developer.download.nvidia.com/compute/cuda/12.3.0/local_installers/cuda_12.3.0_545.23.06_linux.run", + ), + "Linux-ppc64le": ( + "de15c04380ec35b194c07503bf434837bac5b427cf77b19a63962b1653d195d5", + "https://developer.download.nvidia.com/compute/cuda/12.3.0/local_installers/cuda_12.3.0_545.23.06_linux_ppc64le.run", + ), + }, + "12.2.1": { + "Linux-aarch64": ( + "a9ae6bd02684c7acfb229484368bf2691d592767ce1aed10ae9aed92c81b9f09", + "https://developer.download.nvidia.com/compute/cuda/12.2.1/local_installers/cuda_12.2.1_535.86.10_linux_sbsa.run", + ), + "Linux-x86_64": ( + "c51e814eaa756160a73289b1f35880cc38c18e1ddedc87f46f7ff0d1696bdb95", + "https://developer.download.nvidia.com/compute/cuda/12.2.1/local_installers/cuda_12.2.1_535.86.10_linux.run", + ), + "Linux-ppc64le": ( + "8f1aa60cc1e14fd7853eeecd53a78b7dfb2b2da0512a312cc35e4f5b79454f94", + "https://developer.download.nvidia.com/compute/cuda/12.2.1/local_installers/cuda_12.2.1_535.86.10_linux_ppc64le.run", + ), + }, + "12.2.0": { + "Linux-aarch64": ( + "9c90d79bb63952cd30f1f57f9f8fe11e7a8967bba6f824df45d3464b5d37e5d8", + "https://developer.download.nvidia.com/compute/cuda/12.2.0/local_installers/cuda_12.2.0_535.54.03_linux_sbsa.run", + ), + "Linux-x86_64": ( + "ecf3d2afadcbac029f0f4505785810d52d006e4b87ba79ff3f984336a2bbf518", + "https://developer.download.nvidia.com/compute/cuda/12.2.0/local_installers/cuda_12.2.0_535.54.03_linux.run", + ), + "Linux-ppc64le": ( + "f7b5fde5f727b51c380c6199200d0525e8585475944ff8ad2791d06734f54230", + "https://developer.download.nvidia.com/compute/cuda/12.2.0/local_installers/cuda_12.2.0_535.54.03_linux_ppc64le.run", + ), + }, + "12.1.1": { + "Linux-aarch64": ( + "45ea4cd860f0a26d3db8ce032530f2ee0b55abdd587545213d395a73623b4278", + "https://developer.download.nvidia.com/compute/cuda/12.1.1/local_installers/cuda_12.1.1_530.30.02_linux_sbsa.run", + ), + "Linux-x86_64": ( + "d74022d41d80105319dfa21beea39b77a5b9919539c0487a05caaf2446d6a70e", + "https://developer.download.nvidia.com/compute/cuda/12.1.1/local_installers/cuda_12.1.1_530.30.02_linux.run", + ), + "Linux-ppc64le": ( + "c5950381f2c01fd52692372fc8e51d599e940ada2af2c82c3cc854ecff933eae", + "https://developer.download.nvidia.com/compute/cuda/12.1.1/local_installers/cuda_12.1.1_530.30.02_linux_ppc64le.run", + ), + }, + "12.1.0": { + "Linux-aarch64": ( + "1d0dd884f5257c12471dc455dc1a4aee8d620191737c0b2e40f016d8adc9d009", + "https://developer.download.nvidia.com/compute/cuda/12.1.0/local_installers/cuda_12.1.0_530.30.02_linux_sbsa.run", + ), + "Linux-x86_64": ( + "68699036c12d71adb9ad2799dce2ff070270fab4488b90920b9756ab3f52c41c", + "https://developer.download.nvidia.com/compute/cuda/12.1.0/local_installers/cuda_12.1.0_530.30.02_linux.run", + ), + "Linux-ppc64le": ( + "8d75bd9da953a51062b89b8c752cffcf02b02c85cb461291d354ac2cffb2da48", + "https://developer.download.nvidia.com/compute/cuda/12.1.0/local_installers/cuda_12.1.0_530.30.02_linux_ppc64le.run", + ), + }, + "12.0.1": { + "Linux-aarch64": ( + "835270a8db419b9dbaefc1bab8fe5caf6f2caf381975c4b0d35cc0718c26074a", + "https://developer.download.nvidia.com/compute/cuda/12.0.1/local_installers/cuda_12.0.1_525.85.12_linux_sbsa.run", + ), + "Linux-x86_64": ( + "1b205a06272f1463f477276fdab903f3f666917c068e520738001e69c7a1875b", + "https://developer.download.nvidia.com/compute/cuda/12.0.1/local_installers/cuda_12.0.1_525.85.12_linux.run", + ), + "Linux-ppc64le": ( + "1e81040223c25fd72895a1348e32463d7d0f5a7e74b5d2ace897220cb6d4d849", + "https://developer.download.nvidia.com/compute/cuda/12.0.1/local_installers/cuda_12.0.1_525.85.12_linux_ppc64le.run", + ), + }, + "12.0.0": { + "Linux-aarch64": ( + "cd13e9c65d4c8f895a968706f46064d536be09f9706bce081cc864b7e4fa4544", + "https://developer.download.nvidia.com/compute/cuda/12.0.0/local_installers/cuda_12.0.0_525.60.13_linux_sbsa.run", + ), + "Linux-x86_64": ( + "905e9b9516900839fb76064719db752439f38b8cb730b49335d8bd53ddfad392", + "https://developer.download.nvidia.com/compute/cuda/12.0.0/local_installers/cuda_12.0.0_525.60.13_linux.run", + ), + "Linux-ppc64le": ( + "117fe045c71668e45d41c6119b6f27875370c78e33fc56795b6fe014c796ec60", + "https://developer.download.nvidia.com/compute/cuda/12.0.0/local_installers/cuda_12.0.0_525.60.13_linux_ppc64le.run", + ), + }, + "11.8.0": { + "Linux-aarch64": ( + "e6e9a8d31163c9776b5e313fd7590877c5684e1ecddee741154f95704d4ed27c", + "https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux_sbsa.run", + ), + "Linux-x86_64": ( + "9223c4af3aebe4a7bbed9abd9b163b03a1b34b855fbc2b4a0d1b706ac09a5a16", + "https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run", + ), + "Linux-ppc64le": ( + "f917fb7617033223938543ad3ae923190d99507acc08a399d752a2868e87349d", + "https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux_ppc64le.run", + ), + }, + "11.7.1": { + "Linux-aarch64": ( + "1607b98c30cb8efa52b9c8f564ec92d26ee1922cb677740aafacce313e544ecd", + "https://developer.download.nvidia.com/compute/cuda/11.7.1/local_installers/cuda_11.7.1_515.65.01_linux_sbsa.run", + ), + "Linux-x86_64": ( + "52286a29706549b7d0feeb0e7e3eca1b15287c436a69fa880ad385b1be3e04db", + "https://developer.download.nvidia.com/compute/cuda/11.7.1/local_installers/cuda_11.7.1_515.65.01_linux.run", + ), + "Linux-ppc64le": ( + "f59fc381cbd903da55bfea9f81534bd4d20e3db716c332be3d2c4804efc2ec6b", + "https://developer.download.nvidia.com/compute/cuda/11.7.1/local_installers/cuda_11.7.1_515.65.01_linux_ppc64le.run", + ), + }, + "11.7.0": { + "Linux-aarch64": ( + "e777839a618ca9a3d5ad42ded43a1b6392af2321a7327635a4afcc986876a21b", + "https://developer.download.nvidia.com/compute/cuda/11.7.0/local_installers/cuda_11.7.0_515.43.04_linux_sbsa.run", + ), + "Linux-x86_64": ( + "087fdfcbba1f79543b1f78e43a8dfdac5f6db242d042dde820e16dc185892f26", + "https://developer.download.nvidia.com/compute/cuda/11.7.0/local_installers/cuda_11.7.0_515.43.04_linux.run", + ), + "Linux-ppc64le": ( + "74a507ac54067c258e6b7c9063c98d411116ecc5c5397b1f6e6a999e86dff08a", + "https://developer.download.nvidia.com/compute/cuda/11.7.0/local_installers/cuda_11.7.0_515.43.04_linux_ppc64le.run", + ), + }, + "11.6.2": { + "Linux-aarch64": ( + "b20c014c6bba36b13c50da167ad42e9bd1cea24f3b6297b495ea129c0889f36e", + "https://developer.download.nvidia.com/compute/cuda/11.6.2/local_installers/cuda_11.6.2_510.47.03_linux_sbsa.run", + ), + "Linux-x86_64": ( + "99b7a73dcc52a52cef4c1fceb4a60c3015ac9b6404082c1677d9efdaba1d4593", + "https://developer.download.nvidia.com/compute/cuda/11.6.2/local_installers/cuda_11.6.2_510.47.03_linux.run", + ), + "Linux-ppc64le": ( + "869232ff8dbf295a71609738ac9e1b0079ca75597b427f1c026f42b36896afe8", + "https://developer.download.nvidia.com/compute/cuda/11.6.2/local_installers/cuda_11.6.2_510.47.03_linux_ppc64le.run", + ), + }, + "11.6.1": { + "Linux-aarch64": ( + "80586b003d58030004d465f5331dc69ee26c95a29516fb2488ff10f034139cb2", + "https://developer.download.nvidia.com/compute/cuda/11.6.1/local_installers/cuda_11.6.1_510.47.03_linux_sbsa.run", + ), + "Linux-x86_64": ( + "ab219afce00b74200113269866fbff75ead037bcfc23551a8338c2684c984d7e", + "https://developer.download.nvidia.com/compute/cuda/11.6.1/local_installers/cuda_11.6.1_510.47.03_linux.run", + ), + "Linux-ppc64le": ( + "ef762efbc00b67d572823c6ec338cc2c0cf0c096f41e6bce18e8d4501f260956", + "https://developer.download.nvidia.com/compute/cuda/11.6.1/local_installers/cuda_11.6.1_510.47.03_linux_ppc64le.run", + ), + }, + "11.6.0": { + "Linux-aarch64": ( + "5898579f5e59b708520883cb161089f5e4f3426158d1e9f973c49d224085d1d2", + "https://developer.download.nvidia.com/compute/cuda/11.6.0/local_installers/cuda_11.6.0_510.39.01_linux_sbsa.run", + ), + "Linux-x86_64": ( + "1783da6d63970786040980b57fa3cb6420142159fc7d0e66f8f05c4905d98c83", + "https://developer.download.nvidia.com/compute/cuda/11.6.0/local_installers/cuda_11.6.0_510.39.01_linux.run", + ), + "Linux-ppc64le": ( + "c86b866a42baf59ddc6f1f4a79e6d77213c90749e77e574f0e0d796a749ab7d0", + "https://developer.download.nvidia.com/compute/cuda/11.6.0/local_installers/cuda_11.6.0_510.39.01_linux_ppc64le.run", + ), + }, + "11.5.2": { + "Linux-aarch64": ( + "31337c8bdc224fa1bd07bc4b6a745798392428118cc8ea0fa4446ee4ad47dd30", + "https://developer.download.nvidia.com/compute/cuda/11.5.2/local_installers/cuda_11.5.2_495.29.05_linux_sbsa.run", + ), + "Linux-x86_64": ( + "74959abf02bcba526f0a3aae322c7641b25da040ccd6236d07038f81997b73a6", + "https://developer.download.nvidia.com/compute/cuda/11.5.2/local_installers/cuda_11.5.2_495.29.05_linux.run", + ), + "Linux-ppc64le": ( + "45c468f430436b3e95d5e485a6ba0ec1fa2b23dc6c551c1307b79996ecf0a7ed", + "https://developer.download.nvidia.com/compute/cuda/11.5.2/local_installers/cuda_11.5.2_495.29.05_linux_ppc64le.run", + ), + }, + "11.5.1": { + "Linux-aarch64": ( + "73e1d0e97c7fa686efe7e00fb1e5f179372c4eec8e14d4f44ab58d5f6cf57f63", + "https://developer.download.nvidia.com/compute/cuda/11.5.1/local_installers/cuda_11.5.1_495.29.05_linux_sbsa.run", + ), + "Linux-x86_64": ( + "60bea2fc0fac95574015f865355afbf599422ec2c85554f5f052b292711a4bca", + "https://developer.download.nvidia.com/compute/cuda/11.5.1/local_installers/cuda_11.5.1_495.29.05_linux.run", + ), + "Linux-ppc64le": ( + "9e0e494d945634fe8ad3e12d7b91806aa4220ed27487bb211030d651b27c67a9", + "https://developer.download.nvidia.com/compute/cuda/11.5.1/local_installers/cuda_11.5.1_495.29.05_linux_ppc64le.run", + ), + }, + "11.5.0": { + "Linux-aarch64": ( + "6ea9d520cc956cc751a5ac54f4acc39109627f4e614dd0b1a82cc86f2aa7d8c4", + "https://developer.download.nvidia.com/compute/cuda/11.5.0/local_installers/cuda_11.5.0_495.29.05_linux_sbsa.run", + ), + "Linux-x86_64": ( + "ae0a1693d9497cf3d81e6948943e3794636900db71c98d58eefdacaf7f1a1e4c", + "https://developer.download.nvidia.com/compute/cuda/11.5.0/local_installers/cuda_11.5.0_495.29.05_linux.run", + ), + "Linux-ppc64le": ( + "95baefdc5adf165189407b119861ffb2e9800fd94d7fc81d10fb81ed36dc12db", + "https://developer.download.nvidia.com/compute/cuda/11.5.0/local_installers/cuda_11.5.0_495.29.05_linux_ppc64le.run", + ), + }, + "11.4.4": { + "Linux-aarch64": ( + "c5c08531e48e8fdc2704fa1c1f7195f2c7edd2ee10a466d0e24d05b77d109435", + "https://developer.download.nvidia.com/compute/cuda/11.4.4/local_installers/cuda_11.4.4_470.82.01_linux_sbsa.run", + ), + "Linux-x86_64": ( + "44545a7abb4b66dfc201dcad787b5e8352e5b7ddf3e3cc5b2e9177af419c25c8", + "https://developer.download.nvidia.com/compute/cuda/11.4.4/local_installers/cuda_11.4.4_470.82.01_linux.run", + ), + "Linux-ppc64le": ( + "c71cd4e6c05fde11c0485369a73e7f356080e7a18f0e3ad7244e8fc03a9dd3e2", + "https://developer.download.nvidia.com/compute/cuda/11.4.4/local_installers/cuda_11.4.4_470.82.01_linux_ppc64le.run", + ), + }, + "11.4.3": { + "Linux-aarch64": ( + "e02db34a487ea3de3eec9db80efd09f12eb69d55aca686cecaeae96a9747b1d4", + "https://developer.download.nvidia.com/compute/cuda/11.4.3/local_installers/cuda_11.4.3_470.82.01_linux_sbsa.run", + ), + "Linux-x86_64": ( + "749183821ffc051e123f12ebdeb171b263d55b86f0dd7c8f23611db1802d6c37", + "https://developer.download.nvidia.com/compute/cuda/11.4.3/local_installers/cuda_11.4.3_470.82.01_linux.run", + ), + "Linux-ppc64le": ( + "08f29cc3ed0b3b82dd9b007186237be2352bb552f99230c450a25e768f5754ee", + "https://developer.download.nvidia.com/compute/cuda/11.4.3/local_installers/cuda_11.4.3_470.82.01_linux_ppc64le.run", + ), + }, + "11.4.2": { + "Linux-aarch64": ( + "f2c4a52e06329606c8dfb7c5ea3f4cb4c0b28f9d3fdffeeb734fcc98daf580d8", + "https://developer.download.nvidia.com/compute/cuda/11.4.2/local_installers/cuda_11.4.2_470.57.02_linux_sbsa.run", + ), + "Linux-x86_64": ( + "bbd87ca0e913f837454a796367473513cddef555082e4d86ed9a38659cc81f0a", + "https://developer.download.nvidia.com/compute/cuda/11.4.2/local_installers/cuda_11.4.2_470.57.02_linux.run", + ), + "Linux-ppc64le": ( + "a917c2e53dc13fdda7def71fd40920bf3809d5a2caa3e9acfe377fb9fb22f12d", + "https://developer.download.nvidia.com/compute/cuda/11.4.2/local_installers/cuda_11.4.2_470.57.02_linux_ppc64le.run", + ), + }, + "11.4.1": { + "Linux-aarch64": ( + "8efa725a41dfd3c0c0f453c2dd535d149154102bf2b791718859417b4f84f922", + "https://developer.download.nvidia.com/compute/cuda/11.4.1/local_installers/cuda_11.4.1_470.57.02_linux_sbsa.run", + ), + "Linux-x86_64": ( + "dd6c339a719989d2518f5d54eeac1ed707d0673f8664ba0c4d4b2af7c3ba0005", + "https://developer.download.nvidia.com/compute/cuda/11.4.1/local_installers/cuda_11.4.1_470.57.02_linux.run", + ), + "Linux-ppc64le": ( + "dd92ca04f76ad938da3480e2901c0e52dbff6028ada63c09071ed9e3055dc361", + "https://developer.download.nvidia.com/compute/cuda/11.4.1/local_installers/cuda_11.4.1_470.57.02_linux_ppc64le.run", + ), + }, + "11.4.0": { + "Linux-aarch64": ( + "f0c8e80d98a601ddca031b6764459984366008c7d3847e7c7f99b36bd4438e3c", + "https://developer.download.nvidia.com/compute/cuda/11.4.0/local_installers/cuda_11.4.0_470.42.01_linux_sbsa.run", + ), + "Linux-x86_64": ( + "d219db30f7415a115a4ea22bdbb5984b0a18f7f891cad6074c5da45d223aaa4b", + "https://developer.download.nvidia.com/compute/cuda/11.4.0/local_installers/cuda_11.4.0_470.42.01_linux.run", + ), + "Linux-ppc64le": ( + "6eb2fd0d9d5bc39fb243b5e1789ff827f325d098cd1fbb828a0499552b9544cc", + "https://developer.download.nvidia.com/compute/cuda/11.4.0/local_installers/cuda_11.4.0_470.42.01_linux_ppc64le.run", + ), + }, + "11.3.1": { + "Linux-aarch64": ( + "39990d3da88b21289ac20850bc183f0b66275f32e1f562b551c05843bf506e4c", + "https://developer.download.nvidia.com/compute/cuda/11.3.1/local_installers/cuda_11.3.1_465.19.01_linux_sbsa.run", + ), + "Linux-x86_64": ( + "ad93ea98efced35855c58d3a0fc326377c60917cb3e8c017d3e6d88819bf2934", + "https://developer.download.nvidia.com/compute/cuda/11.3.1/local_installers/cuda_11.3.1_465.19.01_linux.run", + ), + "Linux-ppc64le": ( + "220f2c10a21500d62b03c6848c1659ebb3a8e10dc0915ab87b86b397058407c5", + "https://developer.download.nvidia.com/compute/cuda/11.3.1/local_installers/cuda_11.3.1_465.19.01_linux_ppc64le.run", + ), + }, + "11.3.0": { + "Linux-aarch64": ( + "f7b284cf055fcf18be9a9aa216e3c7968d3e011446eb0c7200a3353c223ce718", + "https://developer.download.nvidia.com/compute/cuda/11.3.0/local_installers/cuda_11.3.0_465.19.01_linux_sbsa.run", + ), + "Linux-x86_64": ( + "262da7f77db177b153a6b70b5812210f3f72f00eb608ab9cf2a4582328c4bf5c", + "https://developer.download.nvidia.com/compute/cuda/11.3.0/local_installers/cuda_11.3.0_465.19.01_linux.run", + ), + "Linux-ppc64le": ( + "c0010107933b575a87e27b1293e5dc32b74201486f4ae2f4c8695ea727d22857", + "https://developer.download.nvidia.com/compute/cuda/11.3.0/local_installers/cuda_11.3.0_465.19.01_linux_ppc64le.run", + ), + }, + "11.2.2": { + "Linux-aarch64": ( + "2f915ad631331eebdafaabd971723a60290ae8bb090d771075b9e6a0b28cbae6", + "https://developer.download.nvidia.com/compute/cuda/11.2.2/local_installers/cuda_11.2.2_460.32.03_linux_sbsa.run", + ), + "Linux-x86_64": ( + "0a2e477224af7f6003b49edfd2bfee07667a8148fe3627cfd2765f6ad72fa19d", + "https://developer.download.nvidia.com/compute/cuda/11.2.2/local_installers/cuda_11.2.2_460.32.03_linux.run", + ), + "Linux-ppc64le": ( + "2304ec235fe5d1f8bf75f00dc2c2d11473759dc23428dbbd5fb5040bc8c757e3", + "https://developer.download.nvidia.com/compute/cuda/11.2.2/local_installers/cuda_11.2.2_460.32.03_linux_ppc64le.run", + ), + }, + "11.2.1": { + "Linux-aarch64": ( + "4b322fa6477d1a2cd2f2f526fa520c0f90bef2c264ef8435cb016bebb5456c5e", + "https://developer.download.nvidia.com/compute/cuda/11.2.1/local_installers/cuda_11.2.1_460.32.03_linux_sbsa.run", + ), + "Linux-x86_64": ( + "1da98cb897cc5f58a7445a4a66ca4f6926867706cb3af58a669cdcd8dc3d17c8", + "https://developer.download.nvidia.com/compute/cuda/11.2.1/local_installers/cuda_11.2.1_460.32.03_linux.run", + ), + "Linux-ppc64le": ( + "b3e8b6cd76872deb3acd050d32e197bc1c655e142b169070f0f9753680461a3f", + "https://developer.download.nvidia.com/compute/cuda/11.2.1/local_installers/cuda_11.2.1_460.32.03_linux_ppc64le.run", + ), + }, + "11.2.0": { + "Linux-aarch64": ( + "c11dc274660e9b47b0f25ca66861a7406246a7191f1b04d0710515fcac0fa6cd", + "https://developer.download.nvidia.com/compute/cuda/11.2.0/local_installers/cuda_11.2.0_460.27.04_linux_sbsa.run", + ), + "Linux-x86_64": ( + "9c50283241ac325d3085289ed9b9c170531369de41165ce271352d4a898cbdce", + "https://developer.download.nvidia.com/compute/cuda/11.2.0/local_installers/cuda_11.2.0_460.27.04_linux.run", + ), + "Linux-ppc64le": ( + "adc3267df5dbfdaf51cb4c9b227ba6bfd979a39d9b4136bba0eba6b1dd2a2731", + "https://developer.download.nvidia.com/compute/cuda/11.2.0/local_installers/cuda_11.2.0_460.27.04_linux_ppc64le.run", + ), + }, + "11.1.1": { + "Linux-aarch64": ( + "9ab1dbafba205c06bea8c88e38cdadb3038af19cb56e7b3ba734d3d7a84b8f02", + "https://developer.download.nvidia.com/compute/cuda/11.1.1/local_installers/cuda_11.1.1_455.32.00_linux_sbsa.run", + ), + "Linux-x86_64": ( + "3eae6727086024925ebbcef3e9a45ad379d8490768fd00f9c2d8b6fd9cd8dd8f", + "https://developer.download.nvidia.com/compute/cuda/11.1.1/local_installers/cuda_11.1.1_455.32.00_linux.run", + ), + "Linux-ppc64le": ( + "023e571fe26ee829c98138dfc305a92279854aac7d184d255fd58c06c6af3c17", + "https://developer.download.nvidia.com/compute/cuda/11.1.1/local_installers/cuda_11.1.1_455.32.00_linux_ppc64le.run", + ), + }, + "11.1.0": { + "Linux-aarch64": ( + "878cbd36c5897468ef28f02da50b2f546af0434a8a89d1c724a4d2013d6aa993", + "https://developer.download.nvidia.com/compute/cuda/11.1.0/local_installers/cuda_11.1.0_455.23.05_linux_sbsa.run", + ), + "Linux-x86_64": ( + "858cbab091fde94556a249b9580fadff55a46eafbcb4d4a741d2dcd358ab94a5", + "https://developer.download.nvidia.com/compute/cuda/11.1.0/local_installers/cuda_11.1.0_455.23.05_linux.run", + ), + "Linux-ppc64le": ( + "a561e6f7f659bc4100e4713523b0b8aad6b36aa77fac847f6423e7780c750064", + "https://developer.download.nvidia.com/compute/cuda/11.1.0/local_installers/cuda_11.1.0_455.23.05_linux_ppc64le.run", + ), + }, + "11.0.3": { + "Linux-aarch64": ( + "1e24f61f79c1043aa3d1d126ff6158daa03a62a51b5195a2ed5fbe75c3b718f3", + "https://developer.download.nvidia.com/compute/cuda/11.0.3/local_installers/cuda_11.0.3_450.51.06_linux_sbsa.run", + ), + "Linux-x86_64": ( + "b079c4e408adf88c3f1ffb8418a97dc4227c37935676b4bf4ca0beec6c328cc0", + "https://developer.download.nvidia.com/compute/cuda/11.0.3/local_installers/cuda_11.0.3_450.51.06_linux.run", + ), + "Linux-ppc64le": ( + "4775b21df004b1433bafff9b48a324075c008509f4c0fe28cd060d042d2e0794", + "https://developer.download.nvidia.com/compute/cuda/11.0.3/local_installers/cuda_11.0.3_450.51.06_linux_ppc64le.run", + ), + }, + "11.0.2": { + "Linux-aarch64": ( + "23851e30f7c47a1baad92891abde0adbc783de5962c7480b9725198ceacda4a0", + "https://developer.download.nvidia.com/compute/cuda/11.0.2/local_installers/cuda_11.0.2_450.51.05_linux_sbsa.run", + ), + "Linux-x86_64": ( + "48247ada0e3f106051029ae8f70fbd0c238040f58b0880e55026374a959a69c1", + "https://developer.download.nvidia.com/compute/cuda/11.0.2/local_installers/cuda_11.0.2_450.51.05_linux.run", + ), + "Linux-ppc64le": ( + "db06d0f3fbf6f7aa1f106fc921ad1c86162210a26e8cb65b171c5240a3bf75da", + "https://developer.download.nvidia.com/compute/cuda/11.0.2/local_installers/cuda_11.0.2_450.51.05_linux_ppc64le.run", + ), + }, + "10.2.89": { + "Linux-x86_64": ( + "560d07fdcf4a46717f2242948cd4f92c5f9b6fc7eae10dd996614da913d5ca11", + "https://developer.download.nvidia.com/compute/cuda/10.2/Prod/local_installers/cuda_10.2.89_440.33.01_linux.run", + ), + "Linux-ppc64le": ( + "5227774fcb8b10bd2d8714f0a716a75d7a2df240a9f2a49beb76710b1c0fc619", + "https://developer.download.nvidia.com/compute/cuda/10.2/Prod/local_installers/cuda_10.2.89_440.33.01_linux_ppc64le.run", + ), + }, + "10.1.243": { + "Linux-x86_64": ( + "e7c22dc21278eb1b82f34a60ad7640b41ad3943d929bebda3008b72536855d31", + "https://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.243_418.87.00_linux.run", + ), + "Linux-ppc64le": ( + "b198002eef010bab9e745ae98e47567c955d00cf34cc8f8d2f0a6feb810523bf", + "https://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.243_418.87.00_linux_ppc64le.run", + ), + }, + "10.0.130": { + "Linux-x86_64": ( + "92351f0e4346694d0fcb4ea1539856c9eb82060c25654463bfd8574ec35ee39a", + "https://developer.nvidia.com/compute/cuda/10.0/Prod/local_installers/cuda_10.0.130_410.48_linux", + ) + }, + "9.2.88": { + "Linux-x86_64": ( + "8d02cc2a82f35b456d447df463148ac4cc823891be8820948109ad6186f2667c", + "https://developer.nvidia.com/compute/cuda/9.2/Prod/local_installers/cuda_9.2.88_396.26_linux", + ) + }, + "9.1.85": { + "Linux-x86_64": ( + "8496c72b16fee61889f9281449b5d633d0b358b46579175c275d85c9205fe953", + "https://developer.nvidia.com/compute/cuda/9.1/Prod/local_installers/cuda_9.1.85_387.26_linux", + ) + }, + "9.0.176": { + "Linux-x86_64": ( + "96863423feaa50b5c1c5e1b9ec537ef7ba77576a3986652351ae43e66bcd080c", + "https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda_9.0.176_384.81_linux-run", + ) + }, + "8.0.61": { + "Linux-x86_64": ( + "9ceca9c2397f841024e03410bfd6eabfd72b384256fbed1c1e4834b5b0ce9dc4", + "https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda_8.0.61_375.26_linux-run", + ) + }, + "8.0.44": { + "Linux-x86_64": ( + "64dc4ab867261a0d690735c46d7cc9fc60d989da0d69dc04d1714e409cacbdf0", + "https://developer.nvidia.com/compute/cuda/8.0/prod/local_installers/cuda_8.0.44_linux-run", + ) + }, + "7.5.18": { + "Linux-x86_64": ( + "08411d536741075131a1858a68615b8b73c51988e616e83b835e4632eea75eec", + "https://developer.download.nvidia.com/compute/cuda/7.5/Prod/local_installers/cuda_7.5.18_linux.run", + ) + }, + "6.5.14": { + "Linux-x86_64": ( + "f3e527f34f317314fe8fcd8c85f10560729069298c0f73105ba89225db69da48", + "https://developer.download.nvidia.com/compute/cuda/6_5/rel/installers/cuda_6.5.14_linux_64.run", + ) + }, + "6.0.37": { + "Linux-x86_64": ( + "991e436c7a6c94ec67cf44204d136adfef87baa3ded270544fa211179779bc40", + "https://developer.download.nvidia.com/compute/cuda/6_0/rel/installers/cuda_6.0.37_linux_64.run", + ) + }, +} + + +class Cuda(Package): + """CUDA is a parallel computing platform and programming model invented + by NVIDIA. It enables dramatic increases in computing performance by + harnessing the power of the graphics processing unit (GPU). + + Note: This package does not currently install the drivers necessary + to run CUDA. These will need to be installed manually. See: + https://docs.nvidia.com/cuda/ for details.""" + + homepage = "https://developer.nvidia.com/cuda-zone" + + #maintainers("ax3l", "Rombur") + executables = ["^nvcc$"] + + skip_version_audit = ["platform=darwin"] + + for ver, packages in _versions.items(): + key = "{0}-{1}".format(platform.system(), platform.machine()) + pkg = packages.get(key) + if pkg: + if ver == preferred_ver: + version(ver, sha256=pkg[0], url=pkg[1], expand=False, preferred=True) + else: + version(ver, sha256=pkg[0], url=pkg[1], expand=False) + + # macOS Mojave drops NVIDIA graphics card support -- official NVIDIA + # drivers do not exist for Mojave. See + # https://devtalk.nvidia.com/default/topic/1043070/announcements/faq-about-macos-10-14-mojave-nvidia-drivers/ + # Note that a CUDA Toolkit installer does exist for macOS Mojave at + # https://developer.nvidia.com/compute/cuda/10.1/Prod1/local_installers/cuda_10.1.168_mac.dmg, + # but support for Mojave is dropped in later versions, and none of the + # macOS NVIDIA drivers at + # https://www.nvidia.com/en-us/drivers/cuda/mac-driver-archive/ mention + # Mojave support -- only macOS High Sierra 10.13 is supported. + conflicts("arch=darwin-mojave-x86_64") + + variant( + "dev", default=False, description="Enable development dependencies, i.e to use cuda-gdb" + ) + variant( + "allow-unsupported-compilers", + default=False, + sticky=True, + description="Allow unsupported host compiler and CUDA version combinations", + ) + + depends_on("libxml2", when="@10.1.243:") + # cuda-gdb needed libncurses.so.5 before 11.4.0 + # see https://docs.nvidia.com/cuda/archive/11.3.1/cuda-gdb/index.html#common-issues-oss + # see https://docs.nvidia.com/cuda/archive/11.4.0/cuda-gdb/index.html#release-notes + depends_on("ncurses abi=5", type="run", when="@:11.3.99+dev") + + provides("opencl@:1.2", when="@7:") + provides("opencl@:1.1", when="@:6") + + @classmethod + def determine_version(cls, exe): + output = Executable(exe)("--version", output=str, error=str) + match = re.search(r"Cuda compilation tools, release .*?, V(\S+)", output) + return match.group(1) if match else None + + def setup_build_environment(self, env): + if self.spec.satisfies("@:8.0.61"): + # Perl 5.26 removed current directory from module search path, + # CUDA 9 has a fix for this, but CUDA 8 and lower don't. + env.append_path("PERL5LIB", self.stage.source_path) + + if self.spec.satisfies("@10.1.243:"): + libxml2_home = self.spec["libxml2"].prefix + env.set("LIBXML2HOME", libxml2_home) + env.append_path("LD_LIBRARY_PATH", libxml2_home.lib) + + def setup_dependent_build_environment(self, env, dependent_spec): + env.set("CUDAHOSTCXX", dependent_spec.package.compiler.cxx) + env.set("CUDA_HOME", self.prefix) + env.set("NVHPC_CUDA_HOME", self.prefix) + + @property + def cmake_prefix_paths(self): + cmake_prefix_paths = [self.prefix] + if self.spec.satisfies("target=x86_64:"): + cub_path = self.prefix.targets + "/x86_64-linux/lib/cmake" + cmake_prefix_paths.append(cub_path) + return cmake_prefix_paths + + def setup_run_environment(self, env): + env.set("CUDA_HOME", self.prefix) + env.set("NVHPC_CUDA_HOME", self.prefix) + + def install(self, spec, prefix): + if os.path.exists("/tmp/cuda-installer.log"): + try: + os.remove("/tmp/cuda-installer.log") + except OSError: + if spec.satisfies("@10.1:"): + tty.die( + "The cuda installer will segfault due to the " + "presence of /tmp/cuda-installer.log " + "please remove the file and try again " + ) + runfile = glob(join_path(self.stage.source_path, "cuda*_linux*"))[0] + + # Note: NVIDIA does not officially support many newer versions of + # compilers. For example, on CentOS 6, you must use GCC 4.4.7 or + # older. See: + # http://docs.nvidia.com/cuda/cuda-installation-guide-linux/#system-requirements + # https://gist.github.com/ax3l/9489132 + # for details. + + # CUDA 10.1 on ppc64le fails to copy some files, the workaround is adapted from + # https://forums.developer.nvidia.com/t/cuda-10-1-243-10-1-update-2-ppc64le-run-file-installation-issue/82433 + # See also #21170 + if spec.satisfies("@10.1.243") and platform.machine() == "ppc64le": + includedir = "targets/ppc64le-linux/include" + os.makedirs(os.path.join(prefix, includedir)) + os.makedirs(os.path.join(prefix, "src")) + os.symlink(includedir, os.path.join(prefix, "include")) + + install_shell = which("sh") + + if self.spec.satisfies("@:8.0.61"): + # Perl 5.26 removed current directory from module search path. + # We are addressing this by exporting `PERL5LIB` earlier, but for some + # reason, it is not enough. One more file needs to be extracted before + # running the actual installer. This solution is one of the commonly + # found on the Internet, when people try to install CUDA <= 8 manually. + # For example: https://askubuntu.com/a/1087842 + arguments = [runfile, "--tar", "mxvf", "./InstallUtils.pm"] + install_shell(*arguments) + + # CUDA 10.1+ has different cmdline options for the installer + arguments = [ + runfile, # the install script + "--silent", # disable interactive prompts + "--override", # override compiler version checks + "--toolkit", # install CUDA Toolkit + ] + + if spec.satisfies("@7:"): + # use stage dir instead of /tmp + mkdir(join_path(self.stage.path, "tmp")) + arguments.append("--tmpdir=%s" % join_path(self.stage.path, "tmp")) + + if spec.satisfies("@10.1:"): + arguments.append("--installpath=%s" % prefix) # Where to install + else: + arguments.append("--verbose") # Verbose log file + arguments.append("--toolkitpath=%s" % prefix) # Where to install + + install_shell(*arguments) + + try: + os.remove("/tmp/cuda-installer.log") + except OSError: + pass + + @property + def libs(self): + libs = find_libraries("libcudart", root=self.prefix, shared=True, recursive=True) + + filtered_libs = [] + # CUDA 10.0 provides Compatability libraries for running newer versions + # of CUDA with older drivers. These do not work with newer drivers. + for lib in libs: + parts = lib.split(os.sep) + if "compat" not in parts and "stubs" not in parts: + filtered_libs.append(lib) + return LibraryList(filtered_libs) + + # Avoid binding stub libraries by absolute path + non_bindable_shared_objects = ["stubs"] diff --git a/recipes/mch/v6/repo/packages/nvhpc/package.py b/recipes/mch/v6/repo/packages/nvhpc/package.py index 43318d55..c2f1d1dc 100644 --- a/recipes/mch/v6/repo/packages/nvhpc/package.py +++ b/recipes/mch/v6/repo/packages/nvhpc/package.py @@ -1,4 +1,4 @@ -# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# Copyright 2013-2024 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) @@ -21,6 +21,82 @@ # - package key must be in the form '{os}-{arch}' where 'os' is in the # format returned by platform.system() and 'arch' by platform.machine() _versions = { + "24.3": { + "Linux-aarch64": ( + "6b9edc34b798ccaae39d4af36ff73465ee318ac49e5f96f5c5a2a0d7919fff15", + "https://developer.download.nvidia.com/hpc-sdk/24.3/nvhpc_2024_243_Linux_aarch64_cuda_12.3.tar.gz", + ), + "Linux-x86_64": ( + "4fb8949ba8cef73b28818bd9375c9420ec48fab1c64e71315a7c1984f5329d6b", + "https://developer.download.nvidia.com/hpc-sdk/24.3/nvhpc_2024_243_Linux_x86_64_cuda_12.3.tar.gz", + ), + }, + "24.1": { + "Linux-aarch64": ( + "8d2aafa8769115191708e41e63c647e1c975c241ce4bf6a0badf805f0f5edf1c", + "https://developer.download.nvidia.com/hpc-sdk/24.1/nvhpc_2024_241_Linux_aarch64_cuda_12.3.tar.gz", + ), + "Linux-x86_64": ( + "91cdc6f327881f14119e8b6e884d544aafab01c3d569b61831e259c91b4530fc", + "https://developer.download.nvidia.com/hpc-sdk/24.1/nvhpc_2024_241_Linux_x86_64_cuda_12.3.tar.gz", + ), + }, + "23.11": { + "Linux-aarch64": ( + "cf744498d1d74ba0af4294388706644ad3669eb0cacea3b69e23739afa2806a0", + "https://developer.download.nvidia.com/hpc-sdk/23.11/nvhpc_2023_2311_Linux_aarch64_cuda_multi.tar.gz", + ), + "Linux-ppc64le": ( + "b08591438bd0802d4c7c78e7c5bc36383a59591b8c2fa8aed5c4b87b24f7bfbb", + "https://developer.download.nvidia.com/hpc-sdk/23.11/nvhpc_2023_2311_Linux_ppc64le_cuda_multi.tar.gz", + ), + "Linux-x86_64": ( + "33483a069a911f9309cd53859ab90d2778fb176df906e9e8d2bd55f45eeec400", + "https://developer.download.nvidia.com/hpc-sdk/23.11/nvhpc_2023_2311_Linux_x86_64_cuda_multi.tar.gz", + ), + }, + "23.9": { + "Linux-aarch64": ( + "dd32ae4233438adb71b2b4f8891f04802fdf90f67036ecf18bfde1b6043a03c3", + "https://developer.download.nvidia.com/hpc-sdk/23.9/nvhpc_2023_239_Linux_aarch64_cuda_multi.tar.gz", + ), + "Linux-ppc64le": ( + "984d61695499db098fd32be8345c1f7d7c637ea3bdb29cef17aad656f16b000f", + "https://developer.download.nvidia.com/hpc-sdk/23.9/nvhpc_2023_239_Linux_ppc64le_cuda_multi.tar.gz", + ), + "Linux-x86_64": ( + "ecf343ecad2398e21c8d7f24a580b2932348017dfd8ea38c1ef31b37114b2d4b", + "https://developer.download.nvidia.com/hpc-sdk/23.9/nvhpc_2023_239_Linux_x86_64_cuda_multi.tar.gz", + ), + }, + "23.7": { + "Linux-aarch64": ( + "d3b9b674045e6e17156b298941be4e1e1e7dea6a3c1938f14ad653b180860ff2", + "https://developer.download.nvidia.com/hpc-sdk/23.7/nvhpc_2023_237_Linux_aarch64_cuda_multi.tar.gz", + ), + "Linux-ppc64le": ( + "67b137cf67e2c8556ef3952d1ee35f4966c9d1968626825924fb8e4b198a532b", + "https://developer.download.nvidia.com/hpc-sdk/23.7/nvhpc_2023_237_Linux_ppc64le_cuda_multi.tar.gz", + ), + "Linux-x86_64": ( + "fea91d95ff18bca1ce7afde50371caa02001ade8bed6ddfc5ff70862ccbebece", + "https://developer.download.nvidia.com/hpc-sdk/23.7/nvhpc_2023_237_Linux_x86_64_cuda_multi.tar.gz", + ), + }, + "23.5": { + "Linux-aarch64": ( + "3af202ad36bbf205b2af56aabe63b971c01b5ec0e82a02effb3c4928f63bc657", + "https://developer.download.nvidia.com/hpc-sdk/23.5/nvhpc_2023_235_Linux_aarch64_cuda_multi.tar.gz", + ), + "Linux-ppc64le": ( + "65b1f1780175096fa58e98e80fc897c0d563cacce43b3e87ba157f40a8e34877", + "https://developer.download.nvidia.com/hpc-sdk/23.5/nvhpc_2023_235_Linux_ppc64le_cuda_multi.tar.gz", + ), + "Linux-x86_64": ( + "071d7119006cb1d7ac22cb91338c20133a02d394efe14931dfa6f5d7dfa54c81", + "https://developer.download.nvidia.com/hpc-sdk/23.5/nvhpc_2023_235_Linux_x86_64_cuda_multi.tar.gz", + ), + }, "23.3": { "Linux-aarch64": ( "48c837de0b1d2dc31c313b19da752d27527e706cb4150c7a6185a4218fc24ef3", @@ -305,10 +381,11 @@ class Nvhpc(Package): homepage = "https://developer.nvidia.com/hpc-sdk" - maintainers = ["samcmill"] - + #maintainers("samcmill") tags = ["e4s"] + skip_version_audit = ["platform=darwin"] + for ver, packages in _versions.items(): key = "{0}-{1}".format(platform.system(), platform.machine()) pkg = packages.get(key) @@ -326,16 +403,15 @@ class Nvhpc(Package): ) variant("lapack", default=True, description="Enable LAPACK") variant("mpi", default=False, description="Enable MPI") + variant( + "default_cuda", default="default", description="Default CUDA version, for example 11.8" + ) provides("blas", when="+blas") provides("lapack", when="+lapack") provides("mpi", when="+mpi") - # TODO: effectively gcc is a direct dependency of nvhpc, but we cannot express that - # properly. For now, add conflicts for non-gcc compilers instead. - for __compiler in spack.compilers.supported_compilers(): - if __compiler != "gcc": - conflicts("%{0}".format(__compiler), msg="nvhpc must be installed with %gcc") + #requires("%gcc", msg="nvhpc must be installed with %gcc") def _version_prefix(self): return join_path(self.prefix, "Linux_%s" % self.spec.target.family, self.version) @@ -344,6 +420,8 @@ def setup_build_environment(self, env): env.set("NVHPC_SILENT", "true") env.set("NVHPC_ACCEPT_EULA", "accept") env.set("NVHPC_INSTALL_DIR", self.prefix) + if self.spec.variants["default_cuda"].value != "default": + env.set("NVHPC_DEFAULT_CUDA", self.spec.variants["default_cuda"].value) if self.spec.variants["install_type"].value == "network": local_dir = join_path(self._version_prefix(), "share_objects") diff --git a/recipes/mch/validation/compilers.yaml b/recipes/mch/validation/compilers.yaml new file mode 100644 index 00000000..73a18ffd --- /dev/null +++ b/recipes/mch/validation/compilers.yaml @@ -0,0 +1,5 @@ +bootstrap: + spec: gcc@11 +gcc: + specs: + - gcc@12 diff --git a/recipes/mch/validation/config.yaml b/recipes/mch/validation/config.yaml new file mode 100644 index 00000000..79240f70 --- /dev/null +++ b/recipes/mch/validation/config.yaml @@ -0,0 +1,6 @@ +name: mch +store: /user-environment +spack: + commit: releases/v0.20 + repo: https://github.com/spack/spack.git +description: Tools for MCH validation. diff --git a/recipes/mch/validation/environments.yaml b/recipes/mch/validation/environments.yaml new file mode 100644 index 00000000..22145484 --- /dev/null +++ b/recipes/mch/validation/environments.yaml @@ -0,0 +1,29 @@ +prgenv-gcc: + compiler: + - toolchain: gcc + spec: gcc@12 + unify: when_possible + mpi: + spec: cray-mpich@8.1.28 + packages: + - perl + - curl + - ncurses + - autoconf + - m4 + - automake + - texinfo + - libtool + - gawk + specs: + - osu-micro-benchmarks@5.9 + - hdf5@1.12.2 +fortran +threadsafe ~mpi + - netcdf-c@4.8.1~mpi ^hdf5~mpi api=v18 + - python@3.11 + - r@4.2.2 + - udunits + - geos + - r-rgeos + views: + ffv2: + link: roots diff --git a/recipes/mch/validation/modules.yaml b/recipes/mch/validation/modules.yaml new file mode 100644 index 00000000..80dce730 --- /dev/null +++ b/recipes/mch/validation/modules.yaml @@ -0,0 +1,36 @@ +modules: + # Paths to check when creating modules for all module sets + prefix_inspections: + bin: + - PATH + lib: + - LD_LIBRARY_PATH + lib64: + - LD_LIBRARY_PATH + lib/pkgconfig: + - PKG_CONFIG_PATH + lib64/pkgconfig: + - PKG_CONFIG_PATH + + default: + arch_folder: false + # Where to install modules + roots: + tcl: /user-environment/modules + tcl: + all: + autoload: none + netcdf-c: + environment: + set: + NETCDF_C_ROOT: '{prefix}' + hash_length: 0 + exclude_implicits: true + include: + - hdf5 + - zlib+shared + exclude: + - '%gcc@7.5.0' + - 'gcc %gcc@7.5.0' + projections: + all: '{name}/{version}' diff --git a/recipes/mch/validation/repo/packages/r/change_optflags_tmp.patch b/recipes/mch/validation/repo/packages/r/change_optflags_tmp.patch new file mode 100644 index 00000000..4e39b02b --- /dev/null +++ b/recipes/mch/validation/repo/packages/r/change_optflags_tmp.patch @@ -0,0 +1,67 @@ +diff -ur R-3.6.3.org/configure R-3.6.3/configure +--- R-3.6.3.org/configure 2020-03-09 11:09:16.060825352 +0900 ++++ R-3.6.3/configure 2020-03-09 11:10:47.011280195 +0900 +@@ -6470,13 +6470,13 @@ + CFLAGS=$ac_save_CFLAGS + elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then +- CFLAGS="-g -O2" ++ CFLAGS="-g -O1" + else + CFLAGS="-g" + fi + else + if test "$GCC" = yes; then +- CFLAGS="-O2" ++ CFLAGS="-O1" + else + CFLAGS= + fi +@@ -7445,13 +7445,13 @@ + FCFLAGS=$ac_save_FCFLAGS + elif test $ac_cv_prog_fc_g = yes; then + if test "x$ac_cv_fc_compiler_gnu" = xyes; then +- FCFLAGS="-g -O2" ++ FCFLAGS="-g -O1" + else + FCFLAGS="-g" + fi + else + if test "x$ac_cv_fc_compiler_gnu" = xyes; then +- FCFLAGS="-O2" ++ FCFLAGS="-O1" + else + FCFLAGS= + fi +@@ -7717,13 +7717,13 @@ + CXXFLAGS=$ac_save_CXXFLAGS + elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then +- CXXFLAGS="-g -O2" ++ CXXFLAGS="-g -O1" + else + CXXFLAGS="-g" + fi + else + if test "$GXX" = yes; then +- CXXFLAGS="-O2" ++ CXXFLAGS="-O1" + else + CXXFLAGS= + fi +@@ -8336,13 +8336,13 @@ + OBJCFLAGS=$ac_save_OBJCFLAGS + elif test $ac_cv_prog_objc_g = yes; then + if test "$GOBJC" = yes; then +- OBJCFLAGS="-g -O2" ++ OBJCFLAGS="-g -O1" + else + OBJCFLAGS="-g" + fi + else + if test "$GOBJC" = yes; then +- OBJCFLAGS="-O2" ++ OBJCFLAGS="-O1" + else + OBJCFLAGS= + fi diff --git a/recipes/mch/validation/repo/packages/r/package.py b/recipes/mch/validation/repo/packages/r/package.py new file mode 100644 index 00000000..df61847b --- /dev/null +++ b/recipes/mch/validation/repo/packages/r/package.py @@ -0,0 +1,262 @@ +# 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 os +import re + +from spack.package import * + + +class R(AutotoolsPackage): + """R is 'GNU S', a freely available language and environment for + statistical computing and graphics which provides a wide variety of + statistical and graphical techniques: linear and nonlinear modelling, + statistical tests, time series analysis, classification, clustering, etc. + Please consult the R project homepage for further information.""" + + homepage = "https://www.r-project.org" + url = "https://cloud.r-project.org/src/base/R-3/R-3.4.3.tar.gz" + + extendable = True + + maintainers("glennpj") + + version("4.2.2", sha256="0ff62b42ec51afa5713caee7c4fde7a0c45940ba39bef8c5c9487fef0c953df5") + version("4.2.1", sha256="4d52db486d27848e54613d4ee977ad952ec08ce17807e1b525b10cd4436c643f") + version("4.2.0", sha256="38eab7719b7ad095388f06aa090c5a2b202791945de60d3e2bb0eab1f5097488") + version("4.1.3", sha256="15ff5b333c61094060b2a52e9c1d8ec55cc42dd029e39ca22abdaa909526fed6") + version("4.1.2", sha256="2036225e9f7207d4ce097e54972aecdaa8b40d7d9911cd26491fac5a0fab38af") + version("4.1.1", sha256="515e03265752257d0b7036f380f82e42b46ed8473f54f25c7b67ed25bbbdd364") + version("4.1.0", sha256="e8e68959d7282ca147360fc9644ada9bd161bab781bab14d33b8999a95182781") + version("4.0.5", sha256="0a3ee079aa772e131fe5435311ab627fcbccb5a50cabc54292e6f62046f1ffef") + version("4.0.4", sha256="523f27d69744a08c8f0bd5e1e6c3d89a4db29ed983388ba70963a3cd3a4a802e") + version("4.0.3", sha256="09983a8a78d5fb6bc45d27b1c55f9ba5265f78fa54a55c13ae691f87c5bb9e0d") + version("4.0.2", sha256="d3bceab364da0876625e4097808b42512395fdf41292f4915ab1fd257c1bbe75") + version("4.0.1", sha256="95fe24a4d8d8f8f888460c8f5fe4311cec656e7a1722d233218bc03861bc6f32") + version("4.0.0", sha256="06beb0291b569978484eb0dcb5d2339665ec745737bdfb4e873e7a5a75492940") + version("3.6.3", sha256="89302990d8e8add536e12125ec591d6951022cf8475861b3690bc8bf1cefaa8f") + version("3.6.2", sha256="bd65a45cddfb88f37370fbcee4ac8dd3f1aebeebe47c2f968fd9770ba2bbc954") + version("3.6.1", sha256="5baa9ebd3e71acecdcc3da31d9042fb174d55a42829f8315f2457080978b1389") + version("3.6.0", sha256="36fcac3e452666158e62459c6fc810adc247c7109ed71c5b6c3ad5fc2bf57509") + version("3.5.3", sha256="2bfa37b7bd709f003d6b8a172ddfb6d03ddd2d672d6096439523039f7a8e678c") + version("3.5.2", sha256="e53d8c3cf20f2b8d7a9c1631b6f6a22874506fb392034758b3bb341c586c5b62") + version("3.5.1", sha256="0463bff5eea0f3d93fa071f79c18d0993878fd4f2e18ae6cf22c1639d11457ed") + version("3.5.0", sha256="fd1725535e21797d3d9fea8963d99be0ba4c3aecadcf081b43e261458b416870") + version("3.4.4", sha256="b3e97d2fab7256d1c655c4075934725ba1cd7cb9237240a11bb22ccdad960337") + version("3.4.3", sha256="7a3cb831de5b4151e1f890113ed207527b7d4b16df9ec6b35e0964170007f426") + version("3.4.2", sha256="971e30c2436cf645f58552905105d75788bd9733bddbcb7c4fbff4c1a6d80c64") + version("3.4.1", sha256="02b1135d15ea969a3582caeb95594a05e830a6debcdb5b85ed2d5836a6a3fc78") + version("3.4.0", sha256="288e9ed42457c47720780433b3d5c3c20983048b789291cc6a7baa11f9428b91") + version("3.3.3", sha256="5ab768053a275084618fb669b4fbaadcc39158998a87e8465323829590bcfc6c") + version("3.3.2", sha256="d294ad21e9f574fb4828ebb3a94b8cb34f4f304a41687a994be00dd41a4e514c") + version("3.3.1", sha256="3dc59ae5831f5380f83c169bac2103ad052efe0ecec4ffa74bde4d85a0fda9e2") + version("3.3.0", sha256="9256b154b1a5993d844bee7b1955cd49c99ad72cef03cce3cd1bdca1310311e4") + version("3.2.5", sha256="60745672dce5ddc201806fa59f6d4e0ba6554d8ed78d0f9f0d79a629978f80b5") + version("3.2.3", sha256="b93b7d878138279234160f007cb9b7f81b8a72c012a15566e9ec5395cfd9b6c1") + version("3.2.2", sha256="9c9152e74134b68b0f3a1c7083764adc1cb56fd8336bec003fd0ca550cd2461d") + version("3.2.1", sha256="d59dbc3f04f4604a5cf0fb210b8ea703ef2438b3ee65fd5ab536ec5234f4c982") + version("3.2.0", sha256="f5ae953f18ba6f3d55b46556bbbf73441350f9fd22625402b723a2b81ff64f35") + version("3.1.3", sha256="07e98323935baa38079204bfb9414a029704bb9c0ca5ab317020ae521a377312") + version("3.1.2", sha256="bcd150afcae0e02f6efb5f35a6ab72432be82e849ec52ce0bb89d8c342a8fa7a") + + variant( + "external-lapack", default=False, description="Links to externally installed BLAS/LAPACK" + ) + variant("X", default=False, description="Enable X11 support (TCLTK, PNG, JPEG, TIFF, CAIRO)") + variant("memory_profiling", default=False, description="Enable memory profiling") + variant("rmath", default=False, description="Build standalone Rmath library") + + depends_on("blas", when="+external-lapack") + depends_on("lapack", when="+external-lapack") + depends_on("bzip2") + # R didn't anticipate the celebratory + # non-breaking major version bump of curl 8. + depends_on("curl+libidn2@:7") + depends_on("icu4c") + depends_on("java") + depends_on("ncurses") + depends_on("pcre", when="@:3.6.3") + depends_on("pcre2", when="@4:") + depends_on("readline") + depends_on("xz") + depends_on("which", type=("build", "run")) + depends_on("zlib@1.2.5:") + depends_on("texinfo", type="build") + depends_on("cairo+X+gobject+pdf", when="+X") + depends_on("pango+X", when="+X") + depends_on("harfbuzz+graphite2", when="+X") + depends_on("jpeg", when="+X") + depends_on("libpng", when="+X") + depends_on("libtiff", when="+X") + depends_on("libx11", when="+X") + depends_on("libxmu", when="+X") + depends_on("libxt", when="+X") + depends_on("tk", when="+X") + + patch("zlib.patch", when="@:3.3.2") + + # R cannot be built with '-O2' optimization + # with Fujitsu Compiler @4.1.0 now. + # Until the Fujitsu compiler resolves this problem, + # temporary fix to lower the optimization level. + patch("change_optflags_tmp.patch", when="%fj@4.1.0") + + # R custom URL version + def url_for_version(self, version): + """Handle R's customed URL versions""" + url = "https://cloud.r-project.org/src/base" + return url + "/R-%s/R-%s.tar.gz" % (version.up_to(1), version) + + @property + def etcdir(self): + return join_path(prefix, "rlib", "R", "etc") + + @run_after("install") + def install_rmath(self): + if "+rmath" in self.spec: + with working_dir("src/nmath/standalone"): + make() + make("install", parallel=False) + + def configure_args(self): + spec = self.spec + prefix = self.prefix + + config_args = [ + "--libdir={0}".format(join_path(prefix, "rlib")), + "--enable-R-shlib", + "--enable-BLAS-shlib", + "--enable-R-framework=no", + "--without-recommended-packages", + "LDFLAGS=-L{0} -Wl,-rpath,{0}".format(join_path(prefix, "rlib", "R", "lib")), + # cannot disable docs with a normal configure option + "ac_cv_path_PDFLATEX=", + "ac_cv_path_PDFTEX=", + "ac_cv_path_TEX=", + "ac_cv_path_TEXI2DVI=", + ] + + if "+external-lapack" in spec: + if "^mkl" in spec and "gfortran" in self.compiler.fc: + mkl_re = re.compile(r"(mkl_)intel(_i?lp64\b)") + config_args.extend( + [ + mkl_re.sub( + r"\g<1>gf\g<2>", "--with-blas={0}".format(spec["blas"].libs.ld_flags) + ), + "--with-lapack", + ] + ) + else: + config_args.extend( + ["--with-blas={0}".format(spec["blas"].libs.ld_flags), "--with-lapack"] + ) + + if "+X" in spec: + config_args.append("--with-cairo") + config_args.append("--with-jpeglib") + config_args.append("--with-libpng") + config_args.append("--with-libtiff") + config_args.append("--with-tcltk") + config_args.append("--with-x") + + tcl_config_path = join_path(spec["tcl"].libs.directories[0], "tclConfig.sh") + config_args.append("--with-tcl-config={0}".format(tcl_config_path)) + + tk_config_path = join_path(spec["tk"].libs.directories[0], "tkConfig.sh") + config_args.append("--with-tk-config={0}".format(tk_config_path)) + else: + config_args.append("--without-cairo") + config_args.append("--without-jpeglib") + config_args.append("--without-libpng") + config_args.append("--without-libtiff") + config_args.append("--without-tcltk") + config_args.append("--without-x") + + if "+memory_profiling" in spec: + config_args.append("--enable-memory-profiling") + + # Set FPICFLAGS for compilers except 'gcc'. + if self.compiler.name != "gcc": + config_args.append("FPICFLAGS={0}".format(self.compiler.cc_pic_flag)) + + if self.spec.satisfies("@:3.6.1 %gcc@10:"): + config_args.append("CFLAGS=-fcommon") + config_args.append("FFLAGS=-fallow-argument-mismatch") + + return config_args + + @run_after("install") + def copy_makeconf(self): + # Make a copy of Makeconf because it will be needed to properly build R + # dependencies in Spack. + src_makeconf = join_path(self.etcdir, "Makeconf") + dst_makeconf = join_path(self.etcdir, "Makeconf.spack") + install(src_makeconf, dst_makeconf) + + # To respect order of execution, we should filter after we made the copy above + filter_compiler_wrappers("Makeconf", relative_root=os.path.join("rlib", "R", "etc")) + + # ======================================================================== + # Set up environment to make install easy for R extensions. + # ======================================================================== + + @property + def r_lib_dir(self): + return join_path("rlib", "R", "library") + + def setup_dependent_build_environment(self, env, dependent_spec): + # Set R_LIBS to include the library dir for the + # extension and any other R extensions it depends on. + r_libs_path = [] + for d in dependent_spec.traverse(deptype=("build", "run")): + if d.package.extends(self.spec): + r_libs_path.append(join_path(d.prefix, self.r_lib_dir)) + + r_libs_path = ":".join(r_libs_path) + env.set("R_LIBS", r_libs_path) + # R_LIBS_USER gets set to a directory in HOME/R if it is not set, such as + # during package installation with the --vanilla flag. Set it to null + # to ensure that it does not point to a directory that may contain R + # packages. + env.set("R_LIBS_USER", "") + env.set("R_MAKEVARS_SITE", join_path(self.etcdir, "Makeconf.spack")) + + # Use the number of make_jobs set in spack. The make program will + # determine how many jobs can actually be started. + env.set("MAKEFLAGS", "-j{0}".format(make_jobs)) + env.set("R_HOME", join_path(self.prefix, "rlib", "R")) + + def setup_dependent_run_environment(self, env, dependent_spec): + # For run time environment set only the path for dependent_spec and + # prepend it to R_LIBS + env.set("R_HOME", join_path(self.prefix, "rlib", "R")) + if dependent_spec.package.extends(self.spec): + env.prepend_path("R_LIBS", join_path(dependent_spec.prefix, self.r_lib_dir)) + + def setup_run_environment(self, env): + env.prepend_path("LD_LIBRARY_PATH", join_path(self.prefix, "rlib", "R", "lib")) + env.prepend_path("PKG_CONFIG_PATH", join_path(self.prefix, "rlib", "pkgconfig")) + env.set("R_HOME", join_path(self.prefix, "rlib", "R")) + + if "+rmath" in self.spec: + env.prepend_path("LD_LIBRARY_PATH", join_path(self.prefix, "rlib")) + + def setup_dependent_package(self, module, dependent_spec): + """Called before R modules' install() methods. In most cases, + extensions will only need to have one line: + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path)""" + + # R extension builds can have a global R executable function + module.R = Executable(join_path(self.spec.prefix.bin, "R")) + + # Add variable for library directry + module.r_lib_dir = join_path(dependent_spec.prefix, self.r_lib_dir) + + # Make the site packages directory for extensions, if it does not exist + # already. + if dependent_spec.package.is_extension: + mkdirp(module.r_lib_dir) diff --git a/recipes/mch/validation/repo/packages/r/zlib.patch b/recipes/mch/validation/repo/packages/r/zlib.patch new file mode 100644 index 00000000..673d5352 --- /dev/null +++ b/recipes/mch/validation/repo/packages/r/zlib.patch @@ -0,0 +1,29 @@ +*** a/configure 2017-01-21 21:48:35.077000000 +0000 +--- b/configure 2017-01-21 21:50:50.700000000 +0000 +*************** +*** 35496,35505 **** + #include + #include + int main() { +! #ifdef ZLIB_VERSION +! /* Work around Debian bug: it uses 1.2.3.4 even though there was no such +! version on the master site zlib.net */ +! exit(strncmp(ZLIB_VERSION, "1.2.5", 5) < 0); + #else + exit(1); + #endif +--- 35496,35509 ---- + #include + #include + int main() { +! /* Checking ZLIB_VERNUM trick learned here: +! * https://github.com/TransitApp/protobuf/blob/master/configure.ac#L95 +! */ +! #ifdef ZLIB_VERNUM +! if (ZLIB_VERNUM < 0x1250) { +! exit(1); +! } +! exit(0); + #else + exit(1); + #endif diff --git a/scripts/setup-stackinator b/scripts/setup-stackinator index 3a8e0383..a6f3c9fa 100755 --- a/scripts/setup-stackinator +++ b/scripts/setup-stackinator @@ -10,11 +10,11 @@ tool_version=v4.0 log "installing stackinator from git in '${tool_path}'" log "cloning stackinator from ${tool_repo}" -git clone --quiet "${tool_repo}" "${tool_path}" || err "unable to clone stackinator git repository" +git clone "${tool_repo}" "${tool_path}" || err "unable to clone stackinator git repository" log "checkout stackinator ${tool_version}" cd "${tool_path}" -git checkout --quiet "${tool_version}" || err "unable to checkout out requested version" +git checkout "${tool_version}" || err "unable to checkout out requested version" log "bootstrap stackinator" cd "${tool_path}" diff --git a/stack-build b/stack-build index 7a45da14..aad0f7c5 100755 --- a/stack-build +++ b/stack-build @@ -62,7 +62,7 @@ do n) name=${OPTARG};; s) system=${OPTARG};; r) recipe_path=$(realpath "${OPTARG}");; - b) build_root=$(realpath "${OPTARG}");; + b) build_root="${OPTARG}";; u) uarch=${OPTARG};; m) mount=${OPTARG};; d) spack_develop="--develop";;