diff --git a/configs/common/packages_nvhpc.yaml b/configs/common/packages_nvhpc.yaml new file mode 100644 index 000000000..57b74373e --- /dev/null +++ b/configs/common/packages_nvhpc.yaml @@ -0,0 +1,99 @@ +packages: + # Compiler preferences + c: + prefer: + - nvhpc + cxx: + prefer: + - nvhpc + fortran: + prefer: + - nvhpc + # Virtual provider settings + blas: + require: + - nvhpc + fftw-api: + require: + - fftw + #- nvpl-fft + lapack: + require: + - nvhpc + # Individual package settings + antlr: + require: + - '%c,cxx=gcc' + bison: + require: + - '%c,cxx=gcc' + cmake: + require: + - '%c,cxx=gcc' + curl: + require: + - '%c=gcc' + ectrans: + require: + - +fftw + file: + require: + - '%c=gcc' + gmake: + require: + - '%c=gcc' + go: + require: + - '%c,cxx=gcc' + # https://github.com/NOAA-EMC/NCEPLIBS-ip/issues/320 + ip: + require: + - ~openmp + libbsd: + require: + - '%c=gcc' + libffi: + require: + - '%c=gcc' + libiconv: + require: + - '%c=gcc' + libmd: + require: + - '%c=gcc' + libxml2: + require: + - '%c=gcc' + ninja: + require: + - '%c=gcc' + nco: + require: + - '%c,cxx=gcc' + numactl: + require: + - '%c=gcc' + patchelf: + require: + - '%c=gcc' + pkg-config: + require: + - '%c=gcc' + python: + require: + - '%c=gcc' + py-cython: + require: + - '%c=gcc' + py-mpi4py: + require: + - '%c,cxx=gcc' + py-numpy: + require: + - '%c,cxx=gcc' + rust: + require: + - '%c,cxx=gcc' + zstd: + require: + - '%c,cxx=gcc' \ No newline at end of file diff --git a/configs/sites/tier2/bounty/README_gcc-14.2.1.yaml b/configs/sites/tier2/bounty/README_gcc-14.2.1.md similarity index 100% rename from configs/sites/tier2/bounty/README_gcc-14.2.1.yaml rename to configs/sites/tier2/bounty/README_gcc-14.2.1.md diff --git a/configs/sites/tier2/bounty/README_nvhpc-26.5.md b/configs/sites/tier2/bounty/README_nvhpc-26.5.md new file mode 100644 index 000000000..21c9ea680 --- /dev/null +++ b/configs/sites/tier2/bounty/README_nvhpc-26.5.md @@ -0,0 +1,13 @@ +WSL 2 Alma Linux 9 installation notes for NVHPC 26.5 compiler + +# Download and install nvhpc, for example: +wget https://developer.download.nvidia.com/hpc-sdk/26.5/nvhpc_2026_265_Linux_x86_64_cuda_13.2.tar.gz +tar xpzf nvhpc_2026_265_Linux_x86_64_cuda_13.2.tar.gz +nvhpc_2026_265_Linux_x86_64_cuda_13.2/install + +# Bug fix for missing include directory (symbolic link) +cd +ln -s Linux_x86_64/26.5/compilers/include include + +# Needed for hpcx +yum install libnl3 diff --git a/configs/sites/tier2/bounty/packages_nvhpc-26.5.yaml b/configs/sites/tier2/bounty/packages_nvhpc-26.5.yaml new file mode 100644 index 000000000..3094e5134 --- /dev/null +++ b/configs/sites/tier2/bounty/packages_nvhpc-26.5.yaml @@ -0,0 +1,37 @@ +packages: + all: + require: + - any_of: ['%nvhpc@=26.5'] + when: '%nvhpc' + - any_of: ['%gcc@=11.5.0'] + when: '%gcc' + mpi: + buildable: false + require: + #- "nvhpc@=26.5" + - "openmpi@=5.0.10" + nvhpc: + buildable: false + externals: + - spec: nvhpc@26.5+blas+lapack~mpi + prefix: /home/dom/prod/nvhpc-26.5 + extra_attributes: + compilers: + c: /home/dom/prod/nvhpc-26.5/Linux_x86_64/26.5/compilers/bin/nvc + cxx: /home/dom/prod/nvhpc-26.5/Linux_x86_64/26.5/compilers/bin/nvc++ + fortran: /home/dom/prod/nvhpc-26.5/Linux_x86_64/26.5/compilers/bin/nvfortran + gcc: + buildable: false + externals: + - spec: gcc@11.5.0 languages:='c,c++' + prefix: /usr + extra_attributes: + compilers: + c: /usr/bin/gcc + cxx: /usr/bin/g++ + fortran: /usr/bin/gfortran + openmpi: + buildable: false + externals: + - spec: openmpi@5.0.10 ~internal-hwloc +two_level_namespace + prefix: /home/dom/prod/nvhpc-26.5/Linux_x86_64/26.5/comm_libs/13.2/hpcx/hpcx-2.50/ompi5 diff --git a/configs/templates/neptune-dev-nvhpc/spack.yaml b/configs/templates/neptune-dev-nvhpc/spack.yaml new file mode 100644 index 000000000..adf6cfcc0 --- /dev/null +++ b/configs/templates/neptune-dev-nvhpc/spack.yaml @@ -0,0 +1,24 @@ +# Template for NEPTUNE development +# +spack: + concretizer: + unify: when_possible + + view: false + include: [] + + specs: + #- dev-utils-env + - neptune-env ~debug +openmp +nvhpc +espc ~ncview ^esmf@=9.0.0b11 + - neptune-env +debug +openmp +nvhpc +espc +ncview ^esmf@=9.0.0b11 + - neptune-env ~debug ~openmp +nvhpc +espc +ncview ^esmf@=9.0.0b11 + - neptune-env +debug ~openmp +nvhpc +espc +ncview ^esmf@=9.0.0b11 + + - py-numpy + #- crtm@3.1.3 + + packages: + # Turn on python variant for esmf + esmf: + require: + - +python diff --git a/repos/spack_stack/spack_repo/spack_stack/packages/neptune_env/package.py b/repos/spack_stack/spack_repo/spack_stack/packages/neptune_env/package.py index 4126b477e..f131fc928 100644 --- a/repos/spack_stack/spack_repo/spack_stack/packages/neptune_env/package.py +++ b/repos/spack_stack/spack_repo/spack_stack/packages/neptune_env/package.py @@ -24,6 +24,8 @@ class NeptuneEnv(BundlePackage): variant("ncview", default=False, description="Build ncview") variant("debug", default=False, description="Build debug version of selected dependencies") variant("openmp", default=True, description="Build OpenMP-enabled versions of dependencies") + # Because spack doesn't support "with when not" + variant("nvhpc", default=False, description="Flag to signal building with nvhpc") depends_on("base-env", type="run") @@ -37,7 +39,9 @@ class NeptuneEnv(BundlePackage): depends_on("p4est", type="run") depends_on("w3emc", type="run") depends_on("ip ~openmp", type="run", when="~openmp") - depends_on("ip +openmp", type="run", when="+openmp") + # https://github.com/NOAA-EMC/NCEPLIBS-ip/issues/320 + depends_on("ip ~openmp", type="run", when="+openmp +nvhpc") + depends_on("ip +openmp", type="run", when="+openmp ~nvhpc") depends_on("esmf ~debug ~openmp", type="run", when="~debug ~openmp") depends_on("esmf ~debug +openmp", type="run", when="~debug +openmp") depends_on("esmf +debug ~openmp", type="run", when="+debug ~openmp") diff --git a/spack-ext/lib/jcsda-emc/spack-stack/stack/common.py b/spack-ext/lib/jcsda-emc/spack-stack/stack/common.py index 5379715e1..5333e1c97 100644 --- a/spack-ext/lib/jcsda-emc/spack-stack/stack/common.py +++ b/spack-ext/lib/jcsda-emc/spack-stack/stack/common.py @@ -20,6 +20,7 @@ "intel-oneapi-compilers-classic" : "intel", "intel-oneapi-compilers" : "oneapi", "llvm" : "llvm", + "nvhpc" : "nvhpc", # MPI "cray-mpich" : "cray-mpich", "intel-oneapi-mpi" : "impi",