diff --git a/config.yaml b/config.yaml index 9536946e..62ca7308 100644 --- a/config.yaml +++ b/config.yaml @@ -33,14 +33,45 @@ uenvs: # deploy to both the production and test clusters eiger: [zen2] clariden: [a100] - #develop: False - sirius: - "v7.5": + develop: False + cp2k: + "2023": recipes: - a100: v7.5/a100 + # zen2 and zen3 targets use the same recipe + zen2: 2023/mc + zen3: 2023/mc + a100: 2023/a100 deploy: + # deploy to both the production and test clusters + eiger: [zen2] clariden: [a100] - develop: True + develop: False + lammps: + "2023": + recipes: + zen2: "2023/mc" + zen3: "2023/mc" + deploy: + eiger: [zen2] + develop: False + mch: + # v5 was deprecated from the build config due to an out of date + # version of spack (v0.19) + "v6": + recipes: + a100: v6 + deploy: + clariden: [a100] + develop: False + netcdf-tools: + "2024": + recipes: + zen2: '2024' + zen3: '2024' + a100: '2024' + deploy: + eiger: [zen2] + develop: False prgenv-gnu: "23.11": recipes: @@ -52,5 +83,20 @@ uenvs: # deploy to both the production and test clusters eiger: [zen2] clariden: [a100] - #develop: False + quantumespresso: + "v7.1": + recipes: + # zen2 and zen3 targets use the same recipe + zen2: v7.1/mc + zen3: v7.1/mc + a100: v7.1/a100 + deploy: + eiger: [zen2] + sirius: + "v7.5": + recipes: + a100: v7.5/a100 + deploy: + clariden: [a100] + develop: True diff --git a/recipes/amdgpu/ci.yml b/recipes/amdgpu/ci.yml deleted file mode 100644 index f40cebde..00000000 --- a/recipes/amdgpu/ci.yml +++ /dev/null @@ -1,14 +0,0 @@ -include: '/ci/common.yml' - -build-hip53: - extends: .stack-build-hohgant-mi200 - variables: - STACK_NAME: amdgpu-hip53 - STACK_RECIPE: recipes/amdgpu/mi200-hip53 - -build-hip54: - extends: .stack-build-hohgant-mi200 - variables: - STACK_NAME: amdgpu-hip54 - STACK_RECIPE: recipes/amdgpu/mi200-hip54 - diff --git a/recipes/amdgpu/mi200-hip54/compilers.yaml b/recipes/amdgpu/hip54/compilers.yaml similarity index 100% rename from recipes/amdgpu/mi200-hip54/compilers.yaml rename to recipes/amdgpu/hip54/compilers.yaml diff --git a/recipes/amdgpu/mi200-hip53/config.yaml b/recipes/amdgpu/hip54/config.yaml similarity index 100% rename from recipes/amdgpu/mi200-hip53/config.yaml rename to recipes/amdgpu/hip54/config.yaml diff --git a/recipes/amdgpu/mi200-hip54/environments.yaml b/recipes/amdgpu/hip54/environments.yaml similarity index 100% rename from recipes/amdgpu/mi200-hip54/environments.yaml rename to recipes/amdgpu/hip54/environments.yaml diff --git a/recipes/amdgpu/mi200-hip53/modules.yaml b/recipes/amdgpu/hip54/modules.yaml similarity index 100% rename from recipes/amdgpu/mi200-hip53/modules.yaml rename to recipes/amdgpu/hip54/modules.yaml diff --git a/recipes/amdgpu/mi200-hip53/environments.yaml b/recipes/amdgpu/mi200-hip53/environments.yaml deleted file mode 100644 index 20a5260f..00000000 --- a/recipes/amdgpu/mi200-hip53/environments.yaml +++ /dev/null @@ -1,21 +0,0 @@ -# environments.yaml -gcc-amdgpu: - views: - default: - compiler: - - toolchain: gcc - spec: gcc@11.3 - unify: true - specs: - - cmake@3.24.4 - - hip@5.3 - - hipify-clang - - rocthrust - - rocprim - - hipcub - - hdf5 +mpi - variants: - - amdgpu_target=gfx90a - mpi: - spec: cray-mpich - gpu: rocm diff --git a/recipes/amdgpu/mi200-hip54/config.yaml b/recipes/amdgpu/mi200-hip54/config.yaml deleted file mode 100644 index 62dc32b0..00000000 --- a/recipes/amdgpu/mi200-hip54/config.yaml +++ /dev/null @@ -1,6 +0,0 @@ -name: gcc-amdgpu -store: /user-environment -spack: - repo: https://github.com/spack/spack.git - commit: releases/v0.20 -modules: True diff --git a/recipes/amdgpu/mi200-hip53/compilers.yaml b/recipes/cp2k/2023/a100/compilers.yaml similarity index 100% rename from recipes/amdgpu/mi200-hip53/compilers.yaml rename to recipes/cp2k/2023/a100/compilers.yaml diff --git a/recipes/cp2k/2023/a100/config.yaml b/recipes/cp2k/2023/a100/config.yaml new file mode 100644 index 00000000..69d8e753 --- /dev/null +++ b/recipes/cp2k/2023/a100/config.yaml @@ -0,0 +1,8 @@ +name: cp2k +description: CP2K 2023.2 and all the tools and libraries required to built CP2K on NVIDIA a100 GPUs. +store: /user-environment +spack: + repo: https://github.com/spack/spack.git + commit: releases/v0.21 + #commit: 599b612edfeb636c8441744df564c1e0535cdcc2 +modules: True diff --git a/recipes/cp2k/a100/environments.yaml b/recipes/cp2k/2023/a100/environments.yaml similarity index 100% rename from recipes/cp2k/a100/environments.yaml rename to recipes/cp2k/2023/a100/environments.yaml diff --git a/recipes/cp2k/a100/modules.yaml b/recipes/cp2k/2023/a100/modules.yaml similarity index 100% rename from recipes/cp2k/a100/modules.yaml rename to recipes/cp2k/2023/a100/modules.yaml diff --git a/recipes/cp2k/a100/repo/README.md b/recipes/cp2k/2023/a100/repo/README.md similarity index 100% rename from recipes/cp2k/a100/repo/README.md rename to recipes/cp2k/2023/a100/repo/README.md diff --git a/recipes/cp2k/a100/repo/packages/intel-oneapi-mkl/package.py b/recipes/cp2k/2023/a100/repo/packages/intel-oneapi-mkl/package.py similarity index 100% rename from recipes/cp2k/a100/repo/packages/intel-oneapi-mkl/package.py rename to recipes/cp2k/2023/a100/repo/packages/intel-oneapi-mkl/package.py diff --git a/recipes/cp2k/a100/compilers.yaml b/recipes/cp2k/2023/mc/compilers.yaml similarity index 100% rename from recipes/cp2k/a100/compilers.yaml rename to recipes/cp2k/2023/mc/compilers.yaml diff --git a/recipes/cp2k/2023/mc/config.yaml b/recipes/cp2k/2023/mc/config.yaml new file mode 100644 index 00000000..5a334455 --- /dev/null +++ b/recipes/cp2k/2023/mc/config.yaml @@ -0,0 +1,8 @@ +name: cp2k +description: CP2K 2023.2 and all the tools and libraries required to built CP2K on multicore. +store: /user-environment +spack: + repo: https://github.com/spack/spack.git + commit: releases/v0.21 + #commit: 599b612edfeb636c8441744df564c1e0535cdcc2 +modules: True diff --git a/recipes/cp2k/mc/environments.yaml b/recipes/cp2k/2023/mc/environments.yaml similarity index 100% rename from recipes/cp2k/mc/environments.yaml rename to recipes/cp2k/2023/mc/environments.yaml diff --git a/recipes/cp2k/mc/modules.yaml b/recipes/cp2k/2023/mc/modules.yaml similarity index 100% rename from recipes/cp2k/mc/modules.yaml rename to recipes/cp2k/2023/mc/modules.yaml diff --git a/recipes/cp2k/mc/repo/README.md b/recipes/cp2k/2023/mc/repo/README.md similarity index 100% rename from recipes/cp2k/mc/repo/README.md rename to recipes/cp2k/2023/mc/repo/README.md diff --git a/recipes/cp2k/mc/repo/packages/intel-oneapi-mkl/package.py b/recipes/cp2k/2023/mc/repo/packages/intel-oneapi-mkl/package.py similarity index 100% rename from recipes/cp2k/mc/repo/packages/intel-oneapi-mkl/package.py rename to recipes/cp2k/2023/mc/repo/packages/intel-oneapi-mkl/package.py diff --git a/recipes/cp2k/a100/config.yaml b/recipes/cp2k/a100/config.yaml deleted file mode 100644 index 271492d4..00000000 --- a/recipes/cp2k/a100/config.yaml +++ /dev/null @@ -1,6 +0,0 @@ -name: cp2k-nvgpu -store: /user-environment -spack: - repo: https://github.com/spack/spack.git - commit: 599b612edfeb636c8441744df564c1e0535cdcc2 -modules: True diff --git a/recipes/cp2k/ci.yml b/recipes/cp2k/ci.yml deleted file mode 100644 index 9b05a7b1..00000000 --- a/recipes/cp2k/ci.yml +++ /dev/null @@ -1,15 +0,0 @@ -include: '/ci/common.yml' - -build-a100: - extends: .stack-build-hohgant-a100 - variables: - STACK_NAME: cp2k-a100 - STACK_RECIPE: recipes/cp2k/a100 - SPACK_DEVELOP: "-d" - -build-mc: - extends: .stack-build-hohgant-cpu - variables: - STACK_NAME: cp2k-mc - STACK_RECIPE: recipes/cp2k/mc - SPACK_DEVELOP: "-d" diff --git a/recipes/cp2k/mc/config.yaml b/recipes/cp2k/mc/config.yaml deleted file mode 100644 index 6bf4437f..00000000 --- a/recipes/cp2k/mc/config.yaml +++ /dev/null @@ -1,6 +0,0 @@ -name: cp2k-mc -store: /user-environment -spack: - repo: https://github.com/spack/spack.git - commit: 599b612edfeb636c8441744df564c1e0535cdcc2 -modules: True diff --git a/recipes/lammps/2023/mc/compilers.yaml b/recipes/lammps/2023/mc/compilers.yaml new file mode 100644 index 00000000..73a18ffd --- /dev/null +++ b/recipes/lammps/2023/mc/compilers.yaml @@ -0,0 +1,5 @@ +bootstrap: + spec: gcc@11 +gcc: + specs: + - gcc@12 diff --git a/recipes/lammps/2023/mc/config.yaml b/recipes/lammps/2023/mc/config.yaml new file mode 100644 index 00000000..c0f0cc26 --- /dev/null +++ b/recipes/lammps/2023/mc/config.yaml @@ -0,0 +1,7 @@ +name: lammps +store: /user-environment +description: LAMMPS (without Plumed), and the toolchain to build your own LAMMPS. +spack: + repo: https://github.com/spack/spack.git + commit: releases/v0.21 +modules: True diff --git a/recipes/lammps/2023/mc/environments.yaml b/recipes/lammps/2023/mc/environments.yaml new file mode 100644 index 00000000..f7622d67 --- /dev/null +++ b/recipes/lammps/2023/mc/environments.yaml @@ -0,0 +1,27 @@ + lammps: + compiler: + - toolchain: gcc + spec: gcc@12 + mpi: + spec: cray-mpich + gpu: false + unify: true + specs: + - cmake + - hwloc + - python@3.10 + - kokkos + - blas + - lapack + - fftw-api + - lammps~plumed + variants: + - +mpi + views: + default: + exclude: [] + link: run + develop: + exclude: ['lammps'] + packages: + - perl diff --git a/recipes/lammps/2023/mc/modules.yaml b/recipes/lammps/2023/mc/modules.yaml new file mode 100644 index 00000000..1260d2a3 --- /dev/null +++ b/recipes/lammps/2023/mc/modules.yaml @@ -0,0 +1,25 @@ +modules: + # Paths to check when creating modules for all module sets + prefix_inspections: + bin: + - PATH + lib: + - LD_LIBRARY_PATH + lib64: + - LD_LIBRARY_PATH + + default: + arch_folder: false + # Where to install modules + roots: + tcl: /user-environment/modules + tcl: + all: + autoload: none + hash_length: 0 + exclude_implicits: true + exclude: ['%gcc@7.5.0', 'gcc %gcc@7.5.0'] + projections: + all: '{name}/{version}' + lammps+plumed: '{name}-plumed/{version}' + lammps~plumed: '{name}/{version}' diff --git a/recipes/mch/ci.yml b/recipes/mch/ci.yml deleted file mode 100644 index 027e471d..00000000 --- a/recipes/mch/ci.yml +++ /dev/null @@ -1,13 +0,0 @@ -include: '/ci/common.yml' - -build-mch: - extends: .stack-build-hohgant-a100 - variables: - STACK_NAME: mch - STACK_RECIPE: recipes/mch/a100 - -test-mch: - extends: .run-reframe-hohgant-a100 - variables: - STACK_NAME: mch - diff --git a/recipes/mch/a100/compilers.yaml b/recipes/mch/v5/compilers.yaml similarity index 100% rename from recipes/mch/a100/compilers.yaml rename to recipes/mch/v5/compilers.yaml diff --git a/recipes/mch/a100/config.yaml b/recipes/mch/v5/config.yaml similarity index 100% rename from recipes/mch/a100/config.yaml rename to recipes/mch/v5/config.yaml diff --git a/recipes/mch/a100/environments.yaml b/recipes/mch/v5/environments.yaml similarity index 100% rename from recipes/mch/a100/environments.yaml rename to recipes/mch/v5/environments.yaml diff --git a/recipes/mch/a100/modules.yaml b/recipes/mch/v5/modules.yaml similarity index 100% rename from recipes/mch/a100/modules.yaml rename to recipes/mch/v5/modules.yaml diff --git a/recipes/mch/a100/repo/packages/nvhpc/package.py b/recipes/mch/v5/repo/packages/nvhpc/package.py similarity index 100% rename from recipes/mch/a100/repo/packages/nvhpc/package.py rename to recipes/mch/v5/repo/packages/nvhpc/package.py diff --git a/recipes/mch/v6/compilers.yaml b/recipes/mch/v6/compilers.yaml new file mode 100644 index 00000000..8baf3d6a --- /dev/null +++ b/recipes/mch/v6/compilers.yaml @@ -0,0 +1,9 @@ +bootstrap: + spec: gcc@11 +gcc: + specs: + - gcc@11.3 +llvm: + requires: gcc@11 + specs: + - nvhpc@23.3 diff --git a/recipes/mch/v6/config.yaml b/recipes/mch/v6/config.yaml new file mode 100644 index 00000000..169ba387 --- /dev/null +++ b/recipes/mch/v6/config.yaml @@ -0,0 +1,6 @@ +name: mch +store: /user-environment +spack: + commit: releases/v0.20 + 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 new file mode 100644 index 00000000..79095165 --- /dev/null +++ b/recipes/mch/v6/environments.yaml @@ -0,0 +1,110 @@ +tools: + compiler: + - toolchain: gcc + spec: gcc@11.3 + 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 + packages: + - perl + views: + tools: + exclude: ['python@3.7'] +prgenv-nvidia: + compiler: + - toolchain: gcc + spec: gcc@11.3 + - toolchain: llvm + spec: nvhpc + unify: when_possible + mpi: + spec: cray-mpich@8.1.25 + gpu: cuda + packages: + - perl + - curl + - gmake + - autoconf + - automake + specs: + - osu-micro-benchmarks@5.9%nvhpc + - cuda@11.8 + - eccodes@2.25.0%nvhpc +tools +fortran +aec +openmp jp2k=jasper + - eccodes@2.19.1%nvhpc +tools +fortran +aec +openmp jp2k=jasper + - netcdf-c@4.8.1%nvhpc + - netcdf-fortran@4.5.4%nvhpc + - hdf5@1.12.2%nvhpc +szip +hl +fortran +mpi + - openblas@0.3.21%nvhpc + - libfyaml@0.7.12%nvhpc + # Explicitly concretise the packages below with gcc as they shouldn't be + # built with nvhpc. + - ca-certificates-mozilla%gcc + - jasper%gcc + - libaec%gcc + - libiconv%gcc + - libjpeg-turbo%gcc + - libtool%gcc + - libxml2%gcc + - m4%gcc + - nasm%gcc + - ncurses%gcc + - openssl%gcc + - patchelf%gcc + - pkgconf%gcc + - xz%gcc + - zlib%gcc + - nco@5.0.1%gcc + - cdo@2.0.5%gcc + variants: + - cuda_arch=80 + - +mpi + - +cuda + views: + prgenv-icon: + exclude: ['eccodes@2.19.1'] +prgenv-gcc: + compiler: + - toolchain: gcc + spec: gcc@11.3 + unify: when_possible + mpi: + spec: cray-mpich@8.1.25 + gpu: cuda + packages: + - perl + - curl + specs: + - cuda@11.8 + - osu-micro-benchmarks@5.9 + - openblas@0.3.21 + - libfyaml@0.7.12 + - hdf5@1.12.2 +fortran +threadsafe ~mpi + - hdf5@1.12.2 +fortran +threadsafe +mpi + - netlib-scalapack@2.2.0 + - eccodes@2.25.0 +tools +fortran +aec +openmp jp2k=jasper + - eccodes@2.19.1 +tools +fortran +aec +openmp jp2k=jasper + - netcdf-c@4.8.1+mpi ^hdf5+mpi api=v18 + - netcdf-c@4.8.1~mpi ^hdf5~mpi api=v18 + - netcdf-fortran@4.5.4 ^netcdf-c+mpi + - netcdf-fortran@4.5.4 ^netcdf-c~mpi + variants: + - cuda_arch=80 + - +mpi + - +cuda + views: + prgenv-gcc-serial: + exclude: + - hdf5+mpi + - netcdf-c+mpi + - netcdf-fortran ^netcdf-c+mpi + - eccodes@2.25.0 diff --git a/recipes/mch/v6/modules.yaml b/recipes/mch/v6/modules.yaml new file mode 100644 index 00000000..dc7ad15c --- /dev/null +++ b/recipes/mch/v6/modules.yaml @@ -0,0 +1,75 @@ +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 + eccodes: + environment: + set: + ECCODES_DIR: '{prefix}' + ECCODES_INCLUDE: '{prefix}/include' + ECCODES_VERSION: '{version}' + netlib-scalapack: + environment: + set: + NETLIB_SCALAPACK_ROOT: '{prefix}' + openblas: + environment: + set: + OPENBLAS_ROOT: '{prefix}' + netcdf-c: + environment: + set: + NETCDF_C_ROOT: '{prefix}' + hash_length: 0 + exclude_implicits: true + include: + - cuda + - hdf5 + - zlib+shared + exclude: + - '%gcc@7.5.0' + - 'gcc %gcc@7.5.0' + - 'autoconf' + - 'automake' + - 'c-blosc' + - 'ca-certificates-mozilla' + - 'diffutils' + - 'gnuconfig' + - 'jasper' + - 'libaec' + - 'libiconv' + - 'libtool' + - 'libxcrypt' + - 'patchelf' + - 'pkgconf' + - 'm4' + - 'ncurses' + - 'openssl' + - 'xz' + projections: + all: '{name}/{version}-{compiler.name}' + nvhpc: '{name}/{version}' + gcc: '{name}/{version}' + cray-mpich: 'cray-mpich-binary/{version}' + python: '{name}/{version}' + hdf5%gcc~mpi: '{name}/{version}-serial-{compiler.name}' + netcdf-c~mpi: '{name}/{version}-serial-{compiler.name}' + netcdf-fortran^netcdf-c~mpi: '{name}/{version}-serial-{compiler.name}' diff --git a/recipes/mch/v6/repo/packages/nvhpc/package.py b/recipes/mch/v6/repo/packages/nvhpc/package.py new file mode 100644 index 00000000..43318d55 --- /dev/null +++ b/recipes/mch/v6/repo/packages/nvhpc/package.py @@ -0,0 +1,463 @@ +# 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) +# +# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. + +import platform + +from spack.package import * +from spack.util.prefix import Prefix + +# 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() +_versions = { + "23.3": { + "Linux-aarch64": ( + "48c837de0b1d2dc31c313b19da752d27527e706cb4150c7a6185a4218fc24ef3", + "https://developer.download.nvidia.com/hpc-sdk/23.3/nvhpc_2023_233_Linux_aarch64_cuda_multi.tar.gz", + ), + "Linux-ppc64le": ( + "0f2b5b2fff8ffed13428c55809841b4abd3dfe61e2b1a866bbe959e4bcd50223", + "https://developer.download.nvidia.com/hpc-sdk/23.3/nvhpc_2023_233_Linux_ppc64le_cuda_multi.tar.gz", + ), + "Linux-x86_64": ( + "b94d2b4ae5a23c1a0af7d5b07c785f5057850fe3a6ee5ba0aacdde1019af5d12", + "https://developer.download.nvidia.com/hpc-sdk/23.3/nvhpc_2023_233_Linux_x86_64_cuda_multi.tar.gz", + ), + }, + "23.1": { + "Linux-aarch64": ( + "5b430e03752954ea62ac1c745b1735cfdaa43b2e981a9412c1465ecb0412fff6", + "https://developer.download.nvidia.com/hpc-sdk/23.1/nvhpc_2023_231_Linux_aarch64_cuda_multi.tar.gz", + ), + "Linux-ppc64le": ( + "81759e7c747bf4f552b75e7657301f76ecc0828b94fe860f81108c6e83e6ad2b", + "https://developer.download.nvidia.com/hpc-sdk/23.1/nvhpc_2023_231_Linux_ppc64le_cuda_multi.tar.gz", + ), + "Linux-x86_64": ( + "55a064415f6d4ce6a01823ee27ebd266f4fb579679871e7c1a7c054bdc18e9f5", + "https://developer.download.nvidia.com/hpc-sdk/23.1/nvhpc_2023_231_Linux_x86_64_cuda_multi.tar.gz", + ), + }, + "22.11": { + "Linux-aarch64": ( + "e60e798657c33b06754d33dfd5ab3bea2882d4a9b9476102303edf2bbe3b7a95", + "https://developer.download.nvidia.com/hpc-sdk/22.11/nvhpc_2022_2211_Linux_aarch64_cuda_multi.tar.gz", + ), + "Linux-ppc64le": ( + "ef800203cf6040b3a5df24f19944b272f62caee8362875bcb394e86dc1de2353", + "https://developer.download.nvidia.com/hpc-sdk/22.11/nvhpc_2022_2211_Linux_ppc64le_cuda_multi.tar.gz", + ), + "Linux-x86_64": ( + "cb91b3a04368457d5cfe3c0e9c0611591fdc8076b01ea977343fe7db7fdcfa3c", + "https://developer.download.nvidia.com/hpc-sdk/22.11/nvhpc_2022_2211_Linux_x86_64_cuda_multi.tar.gz", + ), + }, + "22.9": { + "Linux-aarch64": ( + "bc4473f04b49bc9a26f08c17a72360650ddf48a3b6eefacdc525d79c8d730f30", + "https://developer.download.nvidia.com/hpc-sdk/22.9/nvhpc_2022_229_Linux_aarch64_cuda_multi.tar.gz", + ), + "Linux-ppc64le": ( + "9aac31d36bb09f6653544978021f5b78c272112e7748871566f7e930f5e7475b", + "https://developer.download.nvidia.com/hpc-sdk/22.9/nvhpc_2022_229_Linux_ppc64le_cuda_multi.tar.gz", + ), + "Linux-x86_64": ( + "aebfeb826ace3dabf9699f72390ca0340f8789a8ef6fe4032e3c7b794f073ea3", + "https://developer.download.nvidia.com/hpc-sdk/22.9/nvhpc_2022_229_Linux_x86_64_cuda_multi.tar.gz", + ), + }, + "22.7": { + "Linux-aarch64": ( + "2aae3fbfd2d0d2d09448a36166c42311368f5600c7c346f159c280b412fe924a", + "https://developer.download.nvidia.com/hpc-sdk/22.7/nvhpc_2022_227_Linux_aarch64_cuda_multi.tar.gz", + ), + "Linux-ppc64le": ( + "6dd4fd382c22769e4fa9508714119abd7d1df3dc58c69414a14b0b0dbc34564f", + "https://developer.download.nvidia.com/hpc-sdk/22.7/nvhpc_2022_227_Linux_ppc64le_cuda_multi.tar.gz", + ), + "Linux-x86_64": ( + "3ce1c346f8bc7e50defb41c545c8907fdc012ff60b27eb8985cf3213f19d863a", + "https://developer.download.nvidia.com/hpc-sdk/22.7/nvhpc_2022_227_Linux_x86_64_cuda_multi.tar.gz", + ), + }, + "22.5": { + "Linux-aarch64": ( + "ceeee84e6227e973ad1beded6008d330e3790f7c4598b948fa530fedfa830a16", + "https://developer.download.nvidia.com/hpc-sdk/22.5/nvhpc_2022_225_Linux_aarch64_cuda_multi.tar.gz", + ), + "Linux-ppc64le": ( + "54d1e45664352d0f9f85ab476dd39496dd1b290e0e1221d3bf63afb940dbe16d", + "https://developer.download.nvidia.com/hpc-sdk/22.5/nvhpc_2022_225_Linux_ppc64le_cuda_multi.tar.gz", + ), + "Linux-x86_64": ( + "7674bcf7a77570fafee5b8299959c9e998a9a10bb27904335cf1a58b71766137", + "https://developer.download.nvidia.com/hpc-sdk/22.5/nvhpc_2022_225_Linux_x86_64_cuda_multi.tar.gz", + ), + }, + "22.3": { + "Linux-aarch64": ( + "e0ea1cbb726556f6879f4b5dfe17238f8e7680c772368577945a85c0e08328f0", + "https://developer.download.nvidia.com/hpc-sdk/22.3/nvhpc_2022_223_Linux_aarch64_cuda_multi.tar.gz", + ), + "Linux-ppc64le": ( + "5e80db6010adc85fe799dac961ae69e43fdf18d35243666c96a70ecdb80bd280", + "https://developer.download.nvidia.com/hpc-sdk/22.3/nvhpc_2022_223_Linux_ppc64le_cuda_multi.tar.gz", + ), + "Linux-x86_64": ( + "bc60a6faf2237bf20550718f71079a714563fa85df62c341cb833f70eb2fe7bb", + "https://developer.download.nvidia.com/hpc-sdk/22.3/nvhpc_2022_223_Linux_x86_64_cuda_multi.tar.gz", + ), + }, + "22.2": { + "Linux-aarch64": ( + "a8241d1139a768d9a0066d1853748160e4098253024e17e997983884d0d33a19", + "https://developer.download.nvidia.com/hpc-sdk/22.2/nvhpc_2022_222_Linux_aarch64_cuda_multi.tar.gz", + ), + "Linux-ppc64le": ( + "f84f72423452968d5bbe02e297f188682c4759864a736a72b32acb3433db3a26", + "https://developer.download.nvidia.com/hpc-sdk/22.2/nvhpc_2022_222_Linux_ppc64le_cuda_multi.tar.gz", + ), + "Linux-x86_64": ( + "8dfb4007d6912b2722946358ac69409592c1f03426d81971ffbcb6fc5fea2cb8", + "https://developer.download.nvidia.com/hpc-sdk/22.2/nvhpc_2022_222_Linux_x86_64_cuda_multi.tar.gz", + ), + }, + "22.1": { + "Linux-aarch64": ( + "05cfa8c520a34eab01272a261b157d421a9ff7129fca7d859b944ce6a16d2255", + "https://developer.download.nvidia.com/hpc-sdk/22.1/nvhpc_2022_221_Linux_aarch64_cuda_multi.tar.gz", + ), + "Linux-ppc64le": ( + "9fa9b64fba2c9b287b5800693417d8065c695d18cab0526bad41d9aecc8be2b3", + "https://developer.download.nvidia.com/hpc-sdk/22.1/nvhpc_2022_221_Linux_ppc64le_cuda_multi.tar.gz", + ), + "Linux-x86_64": ( + "7e4366509ed9031ff271e73327dd3121909902a81ac436307801a5373efaff5e", + "https://developer.download.nvidia.com/hpc-sdk/22.1/nvhpc_2022_221_Linux_x86_64_cuda_multi.tar.gz", + ), + }, + "21.11": { + "Linux-aarch64": ( + "3b11bcd9cca862fabfce1e7bcaa2050ea12130c7e897f4e7859ba4c155d20720", + "https://developer.download.nvidia.com/hpc-sdk/21.11/nvhpc_2021_2111_Linux_aarch64_cuda_multi.tar.gz", + ), + "Linux-ppc64le": ( + "ac51ed92de4eb5e1bdb064ada5bbace5b89ac732ad6c6473778edfb8d29a6527", + "https://developer.download.nvidia.com/hpc-sdk/21.11/nvhpc_2021_2111_Linux_ppc64le_cuda_multi.tar.gz", + ), + "Linux-x86_64": ( + "d8d8ccd0e558d22bcddd955f2233219c96f7de56aa8e09e7be833e384d32d6aa", + "https://developer.download.nvidia.com/hpc-sdk/21.11/nvhpc_2021_2111_Linux_x86_64_cuda_multi.tar.gz", + ), + }, + "21.9": { + "Linux-aarch64": ( + "52c2c66e30043add4afccedf0ba77daa0000bf42e0db844baa630bb635b91a7d", + "https://developer.download.nvidia.com/hpc-sdk/21.9/nvhpc_2021_219_Linux_aarch64_cuda_multi.tar.gz", + ), + "Linux-ppc64le": ( + "cff0b55fb782be1982bfeec1d9763b674ddbf84ff2c16b364495299266320289", + "https://developer.download.nvidia.com/hpc-sdk/21.9/nvhpc_2021_219_Linux_ppc64le_cuda_multi.tar.gz", + ), + "Linux-x86_64": ( + "7de6a6880fd7e59afe0dee51f1fae4d3bff1ca0fb8ee234b24e1f2fdff23ffc9", + "https://developer.download.nvidia.com/hpc-sdk/21.9/nvhpc_2021_219_Linux_x86_64_cuda_multi.tar.gz", + ), + }, + "21.7": { + "Linux-aarch64": ( + "73eb3513845b59645f118b1e313472f54519dc252d5f5c32a05df2a2a8a19878", + "https://developer.download.nvidia.com/hpc-sdk/21.7/nvhpc_2021_217_Linux_aarch64_cuda_multi.tar.gz", + ), + "Linux-ppc64le": ( + "37ea23b5a9c696fb3fdb82855643afc4e02aea618102ec801206441f10fc9fba", + "https://developer.download.nvidia.com/hpc-sdk/21.7/nvhpc_2021_217_Linux_ppc64le_cuda_multi.tar.gz", + ), + "Linux-x86_64": ( + "49d6e23492d131474698cf12971722d42e13a54a4eddec382e66e1053b4ac902", + "https://developer.download.nvidia.com/hpc-sdk/21.7/nvhpc_2021_217_Linux_x86_64_cuda_multi.tar.gz", + ), + }, + "21.5": { + "Linux-aarch64": ( + "1a1748cd7cf538199d92ab3b1208935fa4a62708ba21125aeadb328ddc7380d4", + "https://developer.download.nvidia.com/hpc-sdk/21.5/nvhpc_2021_215_Linux_aarch64_cuda_multi.tar.gz", + ), + "Linux-ppc64le": ( + "4674931a5ce28724308cb9cebd546eefa3f0646d3d08adbea28ba5ad27f0c163", + "https://developer.download.nvidia.com/hpc-sdk/21.5/nvhpc_2021_215_Linux_ppc64le_cuda_multi.tar.gz", + ), + "Linux-x86_64": ( + "21989e52c58a6914743631c8200de1fec7e10b3449c6c1833f3032ee74b85f8e", + "https://developer.download.nvidia.com/hpc-sdk/21.5/nvhpc_2021_215_Linux_x86_64_cuda_multi.tar.gz", + ), + }, + "21.3": { + "Linux-aarch64": ( + "88e0dbf8fcdd06a2ba06aacf65ae1625b8683688f6593ed3bf8ce129ce1b17b7", + "https://developer.download.nvidia.com/hpc-sdk/21.3/nvhpc_2021_213_Linux_aarch64_cuda_multi.tar.gz", + ), + "Linux-ppc64le": ( + "08cd0cd6c80d633f107b44f88685ada7f014fbf6eac19ef5ae4a7952cabe4037", + "https://developer.download.nvidia.com/hpc-sdk/21.3/nvhpc_2021_213_Linux_ppc64le_cuda_multi.tar.gz", + ), + "Linux-x86_64": ( + "391d5604a70f61bdd4ca6a3e4692f6f2391948990c8a35c395b6867341890031", + "https://developer.download.nvidia.com/hpc-sdk/21.3/nvhpc_2021_213_Linux_x86_64_cuda_multi.tar.gz", + ), + }, + "21.2": { + "Linux-aarch64": ( + "fe19c0232f7c9534f8699b7432483c9cc649f1e92e7f0961d1aa7c54d83297ff", + "https://developer.download.nvidia.com/hpc-sdk/21.2/nvhpc_2021_212_Linux_aarch64_cuda_multi.tar.gz", + ), + "Linux-ppc64le": ( + "6b69b6e4ebec6a91b9f1627384c50adad79ebdd25dfb20a5f64cf01c3a07f11a", + "https://developer.download.nvidia.com/hpc-sdk/21.2/nvhpc_2021_212_Linux_ppc64le_cuda_multi.tar.gz", + ), + "Linux-x86_64": ( + "a3e3393040185ae844002fbc6c8eb4ffdfb97ce8b2ce29d796fe7e9a521fdc59", + "https://developer.download.nvidia.com/hpc-sdk/21.2/nvhpc_2021_212_Linux_x86_64_cuda_multi.tar.gz", + ), + }, + "21.1": { + "Linux-aarch64": ( + "b276e7c0ff78cee837a597d9136cd1d8ded27a9d1fdae1e7d674e2a072a9a6aa", + "https://developer.download.nvidia.com/hpc-sdk/21.1/nvhpc_2021_211_Linux_aarch64_cuda_multi.tar.gz", + ), + "Linux-ppc64le": ( + "bc236c212097bac6b7d04d627d9cc6b75bb6cd473a0b6a1bf010559ce328a2b0", + "https://developer.download.nvidia.com/hpc-sdk/21.1/nvhpc_2021_211_Linux_ppc64le_cuda_multi.tar.gz", + ), + "Linux-x86_64": ( + "d529daf46404724ac3f005be4239f2c30e53f5220bb9453f367dccc3a74d6b41", + "https://developer.download.nvidia.com/hpc-sdk/21.1/nvhpc_2021_211_Linux_x86_64_cuda_multi.tar.gz", + ), + }, + "20.11": { + "Linux-aarch64": ( + "2f26ca45b07b694b8669e4f761760d4f7faa8d032b21e430adee1af0a27032c1", + "https://developer.download.nvidia.com/hpc-sdk/20.11/nvhpc_2020_2011_Linux_aarch64_cuda_multi.tar.gz", + ), + "Linux-ppc64le": ( + "99e5a5437e82f3914e0fe81feb761a5b599a3fe8b31f3c2cac8ae47e8cdc7b0f", + "https://developer.download.nvidia.com/hpc-sdk/20.11/nvhpc_2020_2011_Linux_ppc64le_cuda_multi.tar.gz", + ), + "Linux-x86_64": ( + "c80fc26e5ba586696f7030f03054c1aaca0752a891c7923faf47eb23b66857ec", + "https://developer.download.nvidia.com/hpc-sdk/20.11/nvhpc_2020_2011_Linux_x86_64_cuda_multi.tar.gz", + ), + }, + "20.9": { + "Linux-aarch64": ( + "3bfb3d17f5ee99998bcc30d738e818d3b94b828e2d8da7db48bf152a01e22023", + "https://developer.download.nvidia.com/hpc-sdk/20.9/nvhpc_2020_209_Linux_aarch64_cuda_11.0.tar.gz", + ), + "Linux-ppc64le": ( + "b2966d4047e1dfd981ce63b333ab9c0acbdc2a6a505fa217456ac9fa3b8e7474", + "https://developer.download.nvidia.com/hpc-sdk/20.9/nvhpc_2020_209_Linux_ppc64le_cuda_multi.tar.gz", + ), + "Linux-x86_64": ( + "fe665ab611b03846a90bd70ca4e08c1e59ab527364b971ed0304e0ae73c778d8", + "https://developer.download.nvidia.com/hpc-sdk/20.9/nvhpc_2020_209_Linux_x86_64_cuda_multi.tar.gz", + ), + }, + "20.7": { + "Linux-aarch64": ( + "5b83ca1919199ac0aa609309b31c345c5a6453dd3131fddeef9e3ee9059a0e9b", + "https://developer.download.nvidia.com/hpc-sdk/20.7/nvhpc_2020_207_Linux_aarch64_cuda_11.0.tar.gz", + ), + "Linux-ppc64le": ( + "800ead240bdf61611910b2f6df24ee1d7359377ff3767c923738dd81fcea9312", + "https://developer.download.nvidia.com/hpc-sdk/20.7/nvhpc_2020_207_Linux_ppc64le_cuda_multi.tar.gz", + ), + "Linux-x86_64": ( + "a5c5c8726d2210f2310a852c6d6e03c9ef8c75e3643e9c94e24909f5e9c2ea7a", + "https://developer.download.nvidia.com/hpc-sdk/20.7/nvhpc_2020_207_Linux_x86_64_cuda_multi.tar.gz", + ), + }, +} + + +class Nvhpc(Package): + """The NVIDIA HPC SDK is a comprehensive suite of compilers, libraries + and tools essential to maximizing developer productivity and the + performance and portability of HPC applications. The NVIDIA HPC + SDK C, C++, and Fortran compilers support GPU acceleration of HPC + modeling and simulation applications with standard C++ and + Fortran, OpenACC directives, and CUDA. GPU-accelerated math + libraries maximize performance on common HPC algorithms, and + optimized communications libraries enable standards-based + multi-GPU and scalable systems programming. Performance profiling + and debugging tools simplify porting and optimization of HPC + applications.""" + + homepage = "https://developer.nvidia.com/hpc-sdk" + + maintainers = ["samcmill"] + + tags = ["e4s"] + + for ver, packages in _versions.items(): + key = "{0}-{1}".format(platform.system(), platform.machine()) + pkg = packages.get(key) + if pkg: + version(ver, sha256=pkg[0], url=pkg[1]) + + variant("blas", default=True, description="Enable BLAS") + variant( + "install_type", + default="single", + values=("single", "network"), + multi=False, + description="Network installs are for installations shared " + "by different operating systems", + ) + variant("lapack", default=True, description="Enable LAPACK") + variant("mpi", default=False, description="Enable MPI") + + 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") + + def _version_prefix(self): + return join_path(self.prefix, "Linux_%s" % self.spec.target.family, self.version) + + 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["install_type"].value == "network": + local_dir = join_path(self._version_prefix(), "share_objects") + env.set("NVHPC_INSTALL_TYPE", "network") + env.set("NVHPC_INSTALL_LOCAL_DIR", local_dir) + else: + env.set("NVHPC_INSTALL_TYPE", "single") + + def install(self, spec, prefix): + compilers_bin = join_path(self._version_prefix(), "compilers", "bin") + install = Executable("./install") + makelocalrc = Executable(join_path(compilers_bin, "makelocalrc")) + + makelocalrc_args = [ + "-gcc", + self.compiler.cc, + "-gpp", + self.compiler.cxx, + "-g77", + self.compiler.f77, + "-x", + compilers_bin, + ] + if self.spec.variants["install_type"].value == "network": + local_dir = join_path(self._version_prefix(), "share_objects") + makelocalrc_args.extend(["-net", local_dir]) + + # Run install script + install() + + # Update localrc to use Spack gcc + makelocalrc(*makelocalrc_args) + + def setup_run_environment(self, env): + prefix = Prefix( + join_path(self.prefix, "Linux_%s" % self.spec.target.family, self.version, "compilers") + ) + + env.set("CC", join_path(prefix.bin, "nvc")) + env.set("CXX", join_path(prefix.bin, "nvc++")) + env.set("F77", join_path(prefix.bin, "nvfortran")) + env.set("FC", join_path(prefix.bin, "nvfortran")) + + env.prepend_path("PATH", prefix.bin) + env.prepend_path("LIBRARY_PATH", prefix.lib) + env.prepend_path("LD_LIBRARY_PATH", prefix.lib) + env.prepend_path("MANPATH", prefix.man) + + if "+mpi" in self.spec: + mpi_prefix = Prefix( + join_path( + self.prefix, + "Linux_%s" % self.spec.target.family, + self.version, + "comm_libs", + "mpi", + ) + ) + env.prepend_path("PATH", mpi_prefix.bin) + env.prepend_path("LD_LIBRARY_PATH", mpi_prefix.lib) + + def setup_dependent_build_environment(self, env, dependent_spec): + prefix = Prefix( + join_path(self.prefix, "Linux_%s" % self.spec.target.family, self.version, "compilers") + ) + + env.prepend_path("LIBRARY_PATH", prefix.lib) + env.prepend_path("LD_LIBRARY_PATH", prefix.lib) + + if "+mpi" in self.spec: + mpi_prefix = Prefix( + join_path( + self.prefix, + "Linux_%s" % self.spec.target.family, + self.version, + "comm_libs", + "mpi", + ) + ) + + env.prepend_path("LD_LIBRARY_PATH", mpi_prefix.lib) + + def setup_dependent_package(self, module, dependent_spec): + if "+mpi" in self.spec or self.provides("mpi"): + mpi_prefix = Prefix( + join_path( + self.prefix, + "Linux_%s" % self.spec.target.family, + self.version, + "comm_libs", + "mpi", + ) + ) + + self.spec.mpicc = join_path(mpi_prefix.bin, "mpicc") + self.spec.mpicxx = join_path(mpi_prefix.bin, "mpicxx") + self.spec.mpif77 = join_path(mpi_prefix.bin, "mpif77") + self.spec.mpifc = join_path(mpi_prefix.bin, "mpif90") + + @property + def libs(self): + prefix = Prefix( + join_path(self.prefix, "Linux_%s" % self.spec.target.family, self.version, "compilers") + ) + libs = [] + + if "+blas" in self.spec: + libs.append("libblas") + + if "+lapack" in self.spec: + libs.append("liblapack") + libs.append("libnvf") + + return find_libraries(libs, root=prefix, recursive=True) + + # Avoid binding stub libraries by absolute path + non_bindable_shared_objects = ["stubs"] diff --git a/recipes/cp2k/mc/compilers.yaml b/recipes/netcdf-tools/2024/compilers.yaml similarity index 100% rename from recipes/cp2k/mc/compilers.yaml rename to recipes/netcdf-tools/2024/compilers.yaml diff --git a/recipes/netcdf-tools/2024/config.yaml b/recipes/netcdf-tools/2024/config.yaml new file mode 100644 index 00000000..10e6f6c9 --- /dev/null +++ b/recipes/netcdf-tools/2024/config.yaml @@ -0,0 +1,6 @@ +name: netcdf-tools +store: /user-environment +description: utilities used for climate/weather analysis and file manipulation +spack: + repo: https://github.com/spack/spack.git + commit: releases/v0.21 diff --git a/recipes/netcdf-tools/2024/environments.yaml b/recipes/netcdf-tools/2024/environments.yaml new file mode 100644 index 00000000..47131ad7 --- /dev/null +++ b/recipes/netcdf-tools/2024/environments.yaml @@ -0,0 +1,19 @@ +gcc-env: + compiler: + - toolchain: gcc + spec: gcc@11 + mpi: + spec: cray-mpich@8.1.25 + gpu: false + unify: true + specs: + - ncview + - cdo + - nco + - ferret + views: + default: + packages: + - git + - perl + diff --git a/recipes/amdgpu/mi200-hip54/modules.yaml b/recipes/netcdf-tools/2024/modules.yaml similarity index 100% rename from recipes/amdgpu/mi200-hip54/modules.yaml rename to recipes/netcdf-tools/2024/modules.yaml diff --git a/recipes/netcdf-tools/2024/repo/packages/ferret/0001-fix-type-mismatch-between-2-args.patch b/recipes/netcdf-tools/2024/repo/packages/ferret/0001-fix-type-mismatch-between-2-args.patch new file mode 100644 index 00000000..9a28ddc0 --- /dev/null +++ b/recipes/netcdf-tools/2024/repo/packages/ferret/0001-fix-type-mismatch-between-2-args.patch @@ -0,0 +1,56 @@ +From 3ecd491f859e04ffe9aad2466de507ba76bd99fc Mon Sep 17 00:00:00 2001 +From: Simon Pintarelli +Date: Fri, 13 Oct 2023 10:47:39 +0200 +Subject: [PATCH 1/2] fix type mismatch between 2 args + +The error was: +``` +Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/REAL(4)). +``` + +in `IF(TMP_FPEQ(zstd/x, zero))`. +--- + ppl/tmapadds/compute_mnstd.F | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/ppl/tmapadds/compute_mnstd.F b/ppl/tmapadds/compute_mnstd.F +index 0696173b5..a1b08e682 100644 +--- a/ppl/tmapadds/compute_mnstd.F ++++ b/ppl/tmapadds/compute_mnstd.F +@@ -72,8 +72,8 @@ C** + REAL*8 sum, dev, sumsq_dev, variance, tol_lo, tol_hi, zmean2 + + LOGICAL TM_FPEQ_SNGL, TM_FPEQ, zmax_test, zmin_test, ok +- REAL zero, rbad +- REAL*8 x, xmean, sum2, sumc, variance_c, xdelta, ++ REAL rbad ++ REAL*8 x, zero, xmean, sum2, sumc, variance_c, xdelta, + . z_max_tol, z_min_tol, zlo, zhi + INTEGER i, n, n2, nok + +@@ -108,11 +108,11 @@ c If so take those into account + zmax_test = .FALSE. + zmin_test = .FALSE. + +- IF (.NOT. TM_FPEQ_SNGL(lev_max, rbad)) THEN ++ IF (.NOT. TM_FPEQ_SNGL(lev_max, Real(rbad, KIND=8))) THEN + zmax_test = .TRUE. + z_max_tol = DBLE(lev_max) + ENDIF +- IF (.NOT. TM_FPEQ_SNGL(lev_min, rbad)) THEN ++ IF (.NOT. TM_FPEQ_SNGL(lev_min, Real(rbad, KIND=8))) THEN + zmin_test = .TRUE. + z_min_tol = DBLE(lev_min) + ENDIF +@@ -291,7 +291,7 @@ c Once more. + zero = 0. + + IF (need_std) THEN +- IF ( .NOT. TM_FPEQ(zmean, zero) ) THEN ++ IF ( .NOT. TM_FPEQ(Real(zmean, KIND=8), zero) ) THEN + IF (TM_FPEQ_SNGL(zstd/zmean, zero)) GOTO 5010 + ELSE + x = MAX(ABS(zmin), ABS(zmax)) +-- +2.42.0 + diff --git a/recipes/netcdf-tools/2024/repo/packages/ferret/0002-fix-hidden-lenght-argument.patch b/recipes/netcdf-tools/2024/repo/packages/ferret/0002-fix-hidden-lenght-argument.patch new file mode 100644 index 00000000..c285c7d8 --- /dev/null +++ b/recipes/netcdf-tools/2024/repo/packages/ferret/0002-fix-hidden-lenght-argument.patch @@ -0,0 +1,30 @@ +From fe80bcc44be89fe31c484a6bf74a1dd1710c72f9 Mon Sep 17 00:00:00 2001 +From: Simon Pintarelli +Date: Fri, 13 Oct 2023 10:49:26 +0200 +Subject: [PATCH 2/2] fix hidden lenght argument + +passing a hidden length argument (for char string) explicitly does not compile +with recent gfortran +--- + ppl/tmapadds/open_gks_ws.F | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/ppl/tmapadds/open_gks_ws.F b/ppl/tmapadds/open_gks_ws.F +index 352011665..8b062722e 100644 +--- a/ppl/tmapadds/open_gks_ws.F ++++ b/ppl/tmapadds/open_gks_ws.F +@@ -210,9 +210,9 @@ C + CALL GOPWK(WSID,CONID,WSTYPE) + #else + if (ppl_in_ferret) then +- call gesspn ('FERRET_1',8) ++ call gesspn ('FERRET_1') + else +- call gesspn ('PPLP',4) ++ call gesspn ('PPLP') + endif + CALL GOPWK(WSID,6,4) + #endif +-- +2.42.0 + diff --git a/recipes/netcdf-tools/2024/repo/packages/ferret/package.py b/recipes/netcdf-tools/2024/repo/packages/ferret/package.py new file mode 100644 index 00000000..319eda0f --- /dev/null +++ b/recipes/netcdf-tools/2024/repo/packages/ferret/package.py @@ -0,0 +1,208 @@ +# 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 + +from spack.package import * + + +class Ferret(Package): + """Ferret is an interactive computer visualization and analysis environment + designed to meet the needs of oceanographers and meteorologists + analyzing large and complex gridded data sets.""" + + homepage = "https://ferret.pmel.noaa.gov/Ferret/home" + url = "https://github.com/NOAA-PMEL/Ferret/archive/v7.6.0.tar.gz" + + maintainers("RemiLacroix-IDRIS") + + version("7.6.0", sha256="69832d740bd44c9eadd198a5de4d96c4c01ae90ae28c2c3414c1bb9f43e475d1") + version("7.5.0", sha256="2a038c547e6e80e6bd0645a374c3247360cf8c94ea56f6f3444b533257eb16db") + version("7.4", sha256="5167bb9e6ef441ae9cf90da555203d2155e3fcf929e7b8dddb237de0d58c5e5f") + version("7.3", sha256="ae80a732c34156b5287a23696cf4ae4faf4de1dd705ff43cbb4168b05c6faaf4") + version("7.2", sha256="21c339b1bafa6939fc869428d906451f130f7e77e828c532ab9488d51cf43095") + version("6.96", sha256="7eb87156aa586cfe838ab83f08b2102598f9ab62062d540a5da8c9123816331a") + + variant("datasets", default=False, description="Install Ferret standard datasets") + + depends_on("hdf5+hl") + depends_on("netcdf-c") + depends_on("netcdf-fortran") + depends_on("readline") + depends_on("zlib-api") + depends_on("libx11") + depends_on("libxmu") + depends_on("curl") + + # Make Java dependency optional with older versions of Ferret + patch( + "https://github.com/NOAA-PMEL/Ferret/commit/c7eb70a0b17045c8ca7207d586bfea77a5340668.patch?full_index=1", + sha256="6dd0a6b11c103b0097fba3da06d6e655da9770e8f568a15968d9b64a0f3c2315", + level=1, + working_dir="FERRET", + when="@:6", + ) + + resource( + name="datasets", + url="https://github.com/NOAA-PMEL/FerretDatasets/archive/v7.6.tar.gz", + sha256="b2fef758ec1817c1c19e6225857ca3a82c727d209ed7fd4697d45c5533bb2c72", + placement="fer_dsets", + when="+datasets", + ) + + patch("0001-fix-type-mismatch-between-2-args.patch") + patch("0002-fix-hidden-lenght-argument.patch") + + def url_for_version(self, version): + if version <= Version("7.2"): + return "ftp://ftp.pmel.noaa.gov/ferret/pub/source/fer_source.v{0}.tar.gz".format( + version.joined + ) + else: + return "https://github.com/NOAA-PMEL/Ferret/archive/v{0}.tar.gz".format(version) + + def patch(self): + spec = self.spec + hdf5_prefix = spec["hdf5"].prefix + netcdff_prefix = spec["netcdf-fortran"].prefix + readline_prefix = spec["readline"].prefix + libz_prefix = spec["zlib-api"].prefix + + work_dir = "FERRET" if "@:7.2" in spec else "." + with working_dir(work_dir, create=False): + if "@7.3:" in spec: + copy("site_specific.mk.in", "site_specific.mk") + copy( + "external_functions/ef_utility/site_specific.mk.in", + "external_functions/ef_utility/site_specific.mk", + ) + + filter_file( + r"^DIR_PREFIX.+", + "DIR_PREFIX = %s" % self.stage.source_path, + "site_specific.mk", + ) + # Setting this to blank not to force + # using the static version of readline + filter_file(r"^(READLINE_(LIB)?DIR).+", "\\1 = ", "site_specific.mk") + else: + filter_file(r"^LIBZ_DIR.+", "LIBZ_DIR = %s" % libz_prefix, "site_specific.mk") + filter_file(r"^JAVA_HOME.+", " ", "site_specific.mk") + filter_file( + r"^READLINE_DIR.+", "READLINE_DIR = %s" % readline_prefix, "site_specific.mk" + ) + + filter_file(r"^BUILDTYPE.+", "BUILDTYPE = x86_64-linux", "site_specific.mk") + filter_file( + r"^INSTALL_FER_DIR.+", "INSTALL_FER_DIR = %s" % spec.prefix, "site_specific.mk" + ) + filter_file(r"^(HDF5_(LIB)?DIR).+", "\\1 = %s" % hdf5_prefix, "site_specific.mk") + filter_file( + r"^(NETCDF4?_(LIB)?DIR).+", "\\1 = %s" % netcdff_prefix, "site_specific.mk" + ) + + if "@:7.3" in spec: + # Don't force using the static version of libz + filter_file( + r"\$\(LIBZ_DIR\)/lib64/libz.a", "-lz", "platform_specific.mk.x86_64-linux" + ) + + # Don't force using the static version of libgfortran + filter_file( + r"-Wl,-Bstatic -lgfortran -Wl,-Bdynamic", + "-lgfortran", + "platform_specific.mk.x86_64-linux", + ) + + # This prevents the rpaths to be properly set + # by Spack's compiler wrappers + filter_file(r"-v --verbose", "", "platform_specific.mk.x86_64-linux") + + filter_file( + r"^[ \t]*LD[ \t]*=.+", + "LD = %s" % spack_cc, + "platform_specific.mk.x86_64-linux", + ) + else: + # Don't force using the static version of libgfortran + filter_file(r"-static-libgfortran", "", "platform_specific.mk.x86_64-linux") + + if "@:7.4" in spec: + compilers_spec_file = "platform_specific.mk.x86_64-linux" + else: + compilers_spec_file = "site_specific.mk" + + # Make sure Ferret uses Spack's compiler wrappers + filter_file(r"^[ \t]*CC[ \t]*=.+", "CC = %s" % spack_cc, compilers_spec_file) + filter_file(r"^[ \t]*CXX[ \t]*=.+", "CXX = %s" % spack_cxx, compilers_spec_file) + filter_file(r"^[ \t]*FC[ \t]*=.+", "FC = %s" % spack_fc, compilers_spec_file) + filter_file(r"^[ \t]*F77[ \t]*=.+", "F77 = %s" % spack_f77, compilers_spec_file) + filter_file(r"^[ \t]*FFLAGS[\t]*=.+", "FFLAGS= -m64 -fPIC -fallow-argument-mismatch -fallow-invalid-boz\\", "platform_specific.mk.x86_64-linux") + filter_file(r"^[ \t]*PPLUS_FFLAGS[\t]*=.+", "PPLUS_FFLAGS= -m64 -fPIC -fallow-argument-mismatch -fallow-invalid-boz\\", "platform_specific.mk.x86_64-linux") + + filter_file( + r"\$\(NETCDF4?_(LIB)?DIR\).*/libnetcdff.a", + "-L%s -lnetcdff" % spec["netcdf-fortran"].prefix.lib, + "platform_specific.mk.x86_64-linux", + ) + filter_file( + r"\$\(NETCDF4?_(LIB)?DIR\).*/libnetcdf.a", + "-L%s -lnetcdf" % spec["netcdf-c"].prefix.lib, + "platform_specific.mk.x86_64-linux", + ) + filter_file( + r"\$\(HDF5_(LIB)?DIR\).*/libhdf5_hl.a", + "-L%s -lhdf5_hl" % spec["hdf5"].prefix.lib, + "platform_specific.mk.x86_64-linux", + ) + filter_file( + r"\$\(HDF5_(LIB)?DIR\).*/libhdf5.a", + "-L%s -lhdf5" % spec["hdf5"].prefix.lib, + "platform_specific.mk.x86_64-linux", + ) + + def install(self, spec, prefix): + if "LDFLAGS" in env and env["LDFLAGS"]: + env["LDFLAGS"] += " " + "-lquadmath" + else: + env["LDFLAGS"] = "-lquadmath" + + work_dir = "FERRET" if "@:7.2" in self.spec else "." + with working_dir(work_dir, create=False): + os.environ["LD_X11"] = "-L%s -lX11" % spec["libx11"].prefix.lib + os.environ["HOSTTYPE"] = "x86_64-linux" + make(parallel=False) + make("install") + + if "+datasets" in self.spec: + mkdir(self.prefix.fer_dsets) + install_tree("fer_dsets", self.prefix.fer_dsets) + + def setup_run_environment(self, env): + env.set("FER_DIR", self.prefix) + env.set( + "FER_GO", " ".join([".", self.prefix.go, self.prefix.examples, self.prefix.contrib]) + ) + env.set("FER_EXTERNAL_FUNCTIONS", self.prefix.ext_func.libs) + env.set("FER_PALETTE", " ".join([".", self.prefix.ppl])) + env.set("FER_FONTS", self.prefix.ppl.fonts) + + fer_data = ["."] + fer_descr = ["."] + fer_grids = ["."] + + if "+datasets" in self.spec: + env.set("FER_DSETS", self.prefix.fer_dsets) + + fer_data.append(self.prefix.fer_dsets.data) + fer_descr.append(self.prefix.fer_dsets.descr) + fer_grids.append(self.prefix.fer_dsets.grids) + + fer_data.extend([self.prefix.go, self.prefix.examples]) + env.set("FER_DATA", " ".join(fer_data)) + env.set("FER_DESCR", " ".join(fer_descr)) + env.set("FER_GRIDS", " ".join(fer_grids)) diff --git a/recipes/quantumespresso/ci.yml b/recipes/quantumespresso/ci.yml deleted file mode 100644 index c4c0a661..00000000 --- a/recipes/quantumespresso/ci.yml +++ /dev/null @@ -1,25 +0,0 @@ -include: '/ci/common.yml' - -build-a100: - extends: .stack-build-hohgant-a100 - variables: - STACK_NAME: quantumespresso-a100 - STACK_RECIPE: recipes/quantumespresso/a100 - -build-cpu: - extends: .stack-build-hohgant-cpu - variables: - STACK_NAME: quantumespresso-cpu - STACK_RECIPE: recipes/quantumespresso/cpu - -test-a100: - extends: .run-reframe-hohgant-a100 - variables: - STACK_NAME: quantumespresso-a100 - -test-cpu: - extends: .run-reframe-hohgant-cpu - needs: ["build-cpu"] - variables: - STACK_NAME: quantumespresso-cpu - diff --git a/recipes/quantumespresso/a100/compilers.yaml b/recipes/quantumespresso/v7.1/a100/compilers.yaml similarity index 100% rename from recipes/quantumespresso/a100/compilers.yaml rename to recipes/quantumespresso/v7.1/a100/compilers.yaml diff --git a/recipes/quantumespresso/a100/config.yaml b/recipes/quantumespresso/v7.1/a100/config.yaml similarity index 100% rename from recipes/quantumespresso/a100/config.yaml rename to recipes/quantumespresso/v7.1/a100/config.yaml diff --git a/recipes/quantumespresso/a100/environments.yaml b/recipes/quantumespresso/v7.1/a100/environments.yaml similarity index 100% rename from recipes/quantumespresso/a100/environments.yaml rename to recipes/quantumespresso/v7.1/a100/environments.yaml diff --git a/recipes/quantumespresso/a100/extra/reframe.yaml b/recipes/quantumespresso/v7.1/a100/extra/reframe.yaml similarity index 100% rename from recipes/quantumespresso/a100/extra/reframe.yaml rename to recipes/quantumespresso/v7.1/a100/extra/reframe.yaml diff --git a/recipes/quantumespresso/a100/modules.yaml b/recipes/quantumespresso/v7.1/a100/modules.yaml similarity index 100% rename from recipes/quantumespresso/a100/modules.yaml rename to recipes/quantumespresso/v7.1/a100/modules.yaml diff --git a/recipes/quantumespresso/cpu/compilers.yaml b/recipes/quantumespresso/v7.1/mc/compilers.yaml similarity index 100% rename from recipes/quantumespresso/cpu/compilers.yaml rename to recipes/quantumespresso/v7.1/mc/compilers.yaml diff --git a/recipes/quantumespresso/cpu/config.yaml b/recipes/quantumespresso/v7.1/mc/config.yaml similarity index 100% rename from recipes/quantumespresso/cpu/config.yaml rename to recipes/quantumespresso/v7.1/mc/config.yaml diff --git a/recipes/quantumespresso/cpu/environments.yaml b/recipes/quantumespresso/v7.1/mc/environments.yaml similarity index 100% rename from recipes/quantumespresso/cpu/environments.yaml rename to recipes/quantumespresso/v7.1/mc/environments.yaml diff --git a/recipes/quantumespresso/cpu/extra/reframe.yaml b/recipes/quantumespresso/v7.1/mc/extra/reframe.yaml similarity index 100% rename from recipes/quantumespresso/cpu/extra/reframe.yaml rename to recipes/quantumespresso/v7.1/mc/extra/reframe.yaml diff --git a/recipes/quantumespresso/cpu/modules.yaml b/recipes/quantumespresso/v7.1/mc/modules.yaml similarity index 100% rename from recipes/quantumespresso/cpu/modules.yaml rename to recipes/quantumespresso/v7.1/mc/modules.yaml diff --git a/run-reframe b/run-reframe index 1a2b7b4d..aa53c76c 100755 --- a/run-reframe +++ b/run-reframe @@ -10,7 +10,7 @@ red () { echo "\e[1;31m$1\e[m"; } yellow () { echo "\e[1;33m$1\e[m"; } log () { printf "$(yellow "[log $(datetime)]") $1\n"; } err () { printf "$(red "[error $(datetime)]") $1\n"; exit 1; } -exit_without_error () { printf "$(yellow "[log $(datetime)]") $1\n"; exit 1; } +exit_without_error () { printf "$(yellow "[log $(datetime)]") $1\n"; exit 0; } usage () { echo "usage: reframe-run -n name -s system -m mount"