pipelines: simplify and lint aws-pcluster-* (#47989)

This commit is contained in:
Massimiliano Culpo 2024-12-10 12:16:51 +01:00 committed by GitHub
parent 30c00353d4
commit b50dbb8604
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 59 additions and 163 deletions

View File

@ -416,10 +416,12 @@ def dump_config(data, stream, *, default_flow_style=False, blame=False):
if blame: if blame:
handler = ConfigYAML(yaml_type=YAMLType.ANNOTATED_SPACK_CONFIG_FILE) handler = ConfigYAML(yaml_type=YAMLType.ANNOTATED_SPACK_CONFIG_FILE)
handler.yaml.default_flow_style = default_flow_style handler.yaml.default_flow_style = default_flow_style
handler.yaml.width = maxint
return _dump_annotated(handler, data, stream) return _dump_annotated(handler, data, stream)
handler = ConfigYAML(yaml_type=YAMLType.SPACK_CONFIG_FILE) handler = ConfigYAML(yaml_type=YAMLType.SPACK_CONFIG_FILE)
handler.yaml.default_flow_style = default_flow_style handler.yaml.default_flow_style = default_flow_style
handler.yaml.width = maxint
return handler.dump(data, stream) return handler.dump(data, stream)

View File

@ -1,6 +1,5 @@
spack: spack:
view: false view: false
definitions: definitions:
- apps: - apps:
- gromacs - gromacs
@ -9,11 +8,9 @@ spack:
- openfoam - openfoam
- quantum-espresso - quantum-espresso
- wrf - wrf
- targets: - targets:
- 'target=neoverse_v1' - target=neoverse_v1
- 'target=neoverse_n1' - target=neoverse_n1
specs: specs:
- matrix: - matrix:
- [$apps] - [$apps]
@ -21,8 +18,8 @@ spack:
ci: ci:
pipeline-gen: pipeline-gen:
- build-job: - build-job:
image: { "name": "ghcr.io/spack/pcluster-amazonlinux-2:v2024-10-07", "entrypoint": [""] } image: {name: ghcr.io/spack/pcluster-amazonlinux-2:v2024-10-07, entrypoint: ['']}
tags: ["aarch64"] tags: [aarch64]
before_script: before_script:
- - . "./share/spack/setup-env.sh" - - . "./share/spack/setup-env.sh"
- . /etc/profile.d/modules.sh - . /etc/profile.d/modules.sh
@ -34,24 +31,9 @@ spack:
# Do not distribute Intel & ARM binaries # Do not distribute Intel & ARM binaries
- - for i in $(aws s3 ls --recursive ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/ | grep intel-oneapi | awk '{print $4}' | sed -e 's?^.*build_cache/??g'); do aws s3 rm ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/$i; done - - for i in $(aws s3 ls --recursive ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/ | grep intel-oneapi | awk '{print $4}' | sed -e 's?^.*build_cache/??g'); do aws s3 rm ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/$i; done
- for i in $(aws s3 ls --recursive ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/ | grep armpl | awk '{print $4}' | sed -e 's?^.*build_cache/??g'); do aws s3 rm ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/$i; done - for i in $(aws s3 ls --recursive ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/ | grep armpl | awk '{print $4}' | sed -e 's?^.*build_cache/??g'); do aws s3 rm ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/$i; done
cdash: cdash:
build-group: AWS Packages build-group: AWS Packages
compilers: compilers:
- compiler:
environment: {}
extra_rpaths: []
flags: {}
modules: []
operating_system: amzn2
paths:
cc: /usr/bin/gcc
cxx: /usr/bin/g++
f77: /usr/bin/gfortran
fc: /usr/bin/gfortran
spec: gcc@=7.3.1
target: aarch64
- compiler: - compiler:
environment: {} environment: {}
extra_rpaths: [] extra_rpaths: []
@ -65,41 +47,34 @@ spack:
fc: /home/software/spack/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeh/linux-amzn2-aarch64/gcc-7.3.1/gcc-12.4.0-v6wxye6ijzrxnzxftcwnpu3psohsjl2b/bin/gfortran fc: /home/software/spack/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeh/linux-amzn2-aarch64/gcc-7.3.1/gcc-12.4.0-v6wxye6ijzrxnzxftcwnpu3psohsjl2b/bin/gfortran
spec: gcc@=12.4.0 spec: gcc@=12.4.0
target: aarch64 target: aarch64
packages: packages:
acfl: acfl:
require: require:
- one_of: ["%gcc target=aarch64"] - '%gcc target=aarch64'
message: "Clang based compilers need GCC libraries and they should be made available for the wide range of CPUs they actually support.
Edit $SPACK_ROOT/etc/spack/packages.yaml to change this default."
gromacs: gromacs:
require: require:
- one_of: - gromacs@2024.3 %gcc ^armpl-gcc ^openmpi
- "gromacs@2024.3 %arm ^fftw ^openmpi"
- "gromacs@2024.3 %gcc ^armpl-gcc ^openmpi"
libfabric: libfabric:
buildable: true buildable: true
externals: externals:
- prefix: /opt/amazon/efa/ - prefix: /opt/amazon/efa/
spec: libfabric@1.17.0 spec: libfabric@1.17.0
require: ['fabrics=shm,efa'] require:
- fabrics=shm,efa
llvm: llvm:
variants: ~lldb variants: ~lldb
mpas-model: mpas-model:
require: require:
- one_of: - precision=single %gcc ^parallelio+pnetcdf
- "precision=single make_target=llvm %arm ^parallelio+pnetcdf"
- "precision=single %gcc ^parallelio+pnetcdf"
mpich: mpich:
require: "mpich pmi=pmi2 device=ch4 netmod=ofi +slurm" require:
- mpich pmi=pmi2 device=ch4 netmod=ofi +slurm
nvhpc: nvhpc:
require: require:
- one_of: - nvhpc %gcc target=aarch64
- "nvhpc %gcc target=aarch64"
message: "NVHPC should be built with GCC and should be made available for the wide range of CPUs they actually support.
Edit $SPACK_ROOT/etc/spack/packages.yaml to change this default."
openfoam: openfoam:
require: "openfoam %gcc ^scotch@6.0.9" require:
- openfoam ^scotch@6.0.9
openmpi: openmpi:
variants: ~atomics ~cuda ~cxx ~cxx_exceptions ~internal-hwloc ~java +legacylaunchers ~lustre ~memchecker +pmi +romio ~singularity +vt +wrapper-rpath fabrics=ofi schedulers=slurm variants: ~atomics ~cuda ~cxx ~cxx_exceptions ~internal-hwloc ~java +legacylaunchers ~lustre ~memchecker +pmi +romio ~singularity +vt +wrapper-rpath fabrics=ofi schedulers=slurm
require: '@4:' require: '@4:'
@ -108,19 +83,15 @@ spack:
# require: # require:
# - one_of: ["palace cxxflags=\"-include cstdint\" ^fmt@9.1.0"] # - one_of: ["palace cxxflags=\"-include cstdint\" ^fmt@9.1.0"]
pmix: pmix:
require: "pmix@3:" require: 'pmix@3:'
quantum-espresso: quantum-espresso:
require: "quantum-espresso@6.6 %gcc ^armpl-gcc" require:
- quantum-espresso@6.6 %gcc ^armpl-gcc
slurm: slurm:
buildable: false buildable: false
externals: externals:
- prefix: /opt/slurm - prefix: /opt/slurm
spec: slurm@22.05.8 +pmix spec: slurm@22.05.8 +pmix
wrf:
require:
- one_of:
- "wrf%arm"
- "wrf%gcc"
all: all:
compiler: [gcc, arm, nvhpc, clang] compiler: [gcc, arm, nvhpc, clang]
providers: providers:

View File

@ -1,6 +1,5 @@
spack: spack:
view: false view: false
definitions: definitions:
- apps: - apps:
- gromacs %oneapi - gromacs %oneapi
@ -13,11 +12,9 @@ spack:
# - quantum-espresso %oneapi # - quantum-espresso %oneapi
- openmpi %oneapi - openmpi %oneapi
- wrf %oneapi - wrf %oneapi
- targets: - targets:
- 'target=x86_64_v4' - target=x86_64_v4
- 'target=x86_64_v3' - target=x86_64_v3
specs: specs:
- matrix: - matrix:
- [$apps] - [$apps]
@ -25,7 +22,7 @@ spack:
ci: ci:
pipeline-gen: pipeline-gen:
- build-job: - build-job:
image: { "name": "ghcr.io/spack/pcluster-amazonlinux-2:v2024-10-07", "entrypoint": [""] } image: {name: ghcr.io/spack/pcluster-amazonlinux-2:v2024-10-07, entrypoint: ['']}
before_script: before_script:
- - . "./share/spack/setup-env.sh" - - . "./share/spack/setup-env.sh"
- . /etc/profile.d/modules.sh - . /etc/profile.d/modules.sh
@ -37,10 +34,8 @@ spack:
# Do not distribute Intel & ARM binaries # Do not distribute Intel & ARM binaries
- - for i in $(aws s3 ls --recursive ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/ | grep intel-oneapi | awk '{print $4}' | sed -e 's?^.*build_cache/??g'); do aws s3 rm ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/$i; done - - for i in $(aws s3 ls --recursive ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/ | grep intel-oneapi | awk '{print $4}' | sed -e 's?^.*build_cache/??g'); do aws s3 rm ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/$i; done
- for i in $(aws s3 ls --recursive ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/ | grep armpl | awk '{print $4}' | sed -e 's?^.*build_cache/??g'); do aws s3 rm ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/$i; done - for i in $(aws s3 ls --recursive ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/ | grep armpl | awk '{print $4}' | sed -e 's?^.*build_cache/??g'); do aws s3 rm ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/$i; done
cdash: cdash:
build-group: AWS Packages build-group: AWS Packages
compilers: compilers:
- compiler: - compiler:
environment: {} environment: {}
@ -69,113 +64,51 @@ spack:
fc: /home/software/spack/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeh/linux-amzn2-x86_64_v3/gcc-12.4.0/intel-oneapi-compilers-2024.1.0-f5u3psfhbwscasajkn324igtupn3blop/compiler/2024.1/bin/ifx fc: /home/software/spack/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeh/linux-amzn2-x86_64_v3/gcc-12.4.0/intel-oneapi-compilers-2024.1.0-f5u3psfhbwscasajkn324igtupn3blop/compiler/2024.1/bin/ifx
spec: oneapi@=2024.1.0 spec: oneapi@=2024.1.0
target: x86_64 target: x86_64
packages: packages:
cpio:
require:
- one_of:
- "cflags=-std=c18 target=x86_64_v4"
- "cflags=-std=c18 target=x86_64_v3"
when: "%intel"
gettext: gettext:
# Newer gettext cannot build with gcc@12 and old AL2 glibc headers # Newer gettext cannot build with gcc@12 and old AL2 glibc headers
# Older gettext versions do not build correctly with oneapi. # Older gettext versions do not build correctly with oneapi.
require: require:
- one_of: - one_of: ['@:0.20 %gcc', '%oneapi']
- '@:0.20'
- '%oneapi'
gromacs: gromacs:
require: require:
- one_of: - +intel_provided_gcc ^intel-oneapi-mkl
- "+intel_provided_gcc ^intel-oneapi-mkl target=x86_64_v4"
- "+intel_provided_gcc ^intel-oneapi-mkl target=x86_64_v3"
when: "%intel"
- one_of:
- "+intel_provided_gcc target=x86_64_v4 ^intel-oneapi-mkl"
- "+intel_provided_gcc target=x86_64_v3 ^intel-oneapi-mkl"
when: "%oneapi"
intel-oneapi-compilers:
require: "intel-oneapi-compilers %gcc target=x86_64_v3"
intel-oneapi-mpi: intel-oneapi-mpi:
variants: +external-libfabric generic-names=True variants: +external-libfabric generic-names=True
lammps: lammps:
require: require:
- one_of: - lammps_sizes=bigbig +molecule +kspace +rigid +asphere +opt +openmp +openmp-package fft=mkl ^intel-oneapi-mkl
- "lammps_sizes=bigbig +molecule +kspace +rigid +asphere +opt +openmp +openmp-package +intel fft=mkl ^intel-oneapi-mkl target=x86_64_v4" - one_of: [+intel target=x86_64_v4, target=x86_64_v3]
- "lammps_sizes=bigbig +molecule +kspace +rigid +asphere +opt +openmp +openmp-package fft=mkl ^intel-oneapi-mkl target=x86_64_v3"
when: "%intel"
- one_of:
- "lammps_sizes=bigbig +molecule +kspace +rigid +asphere +opt +openmp +openmp-package +intel fft=mkl ^intel-oneapi-mkl target=x86_64_v4"
- "lammps_sizes=bigbig +molecule +kspace +rigid +asphere +opt +openmp +openmp-package fft=mkl ^intel-oneapi-mkl target=x86_64_v3"
when: "%oneapi"
libidn2:
require:
- one_of:
- "cflags=-std=c18 target=x86_64_v4"
- "cflags=-std=c18 target=x86_64_v3"
when: "%intel"
libfabric: libfabric:
buildable: true buildable: true
externals: externals:
- prefix: /opt/amazon/efa/ - prefix: /opt/amazon/efa/
spec: libfabric@1.17.0 spec: libfabric@1.17.0
require: ['fabrics=shm,efa']
libunistring:
require: require:
- one_of: - fabrics=shm,efa
- "cflags=-std=c18 target=x86_64_v4"
- "cflags=-std=c18 target=x86_64_v3"
when: "%intel"
mpas-model: mpas-model:
require: require:
- one_of: - spec: precision=single ^parallelio+pnetcdf
- "precision=single ^parallelio+pnetcdf target=x86_64_v4" when: '%oneapi'
- "precision=single ^parallelio+pnetcdf target=x86_64_v3"
when: "%intel"
- one_of:
- "precision=single ^parallelio+pnetcdf target=x86_64_v4"
- "precision=single ^parallelio+pnetcdf target=x86_64_v3"
when: "%oneapi"
mpich: mpich:
require: require:
- one_of: - mpich pmi=pmi2 device=ch4 netmod=ofi +slurm
- "mpich pmi=pmi2 device=ch4 netmod=ofi +slurm target=x86_64_v4"
- "mpich pmi=pmi2 device=ch4 netmod=ofi +slurm target=x86_64_v3"
openfoam: openfoam:
require: require:
- one_of: - openfoam %gcc ^scotch@6.0.9
- "openfoam %gcc ^scotch@6.0.9 target=x86_64_v4"
- "openfoam %gcc ^scotch@6.0.9 target=x86_64_v3"
openmpi: openmpi:
variants: ~atomics ~cuda ~cxx ~cxx_exceptions ~internal-hwloc ~java +legacylaunchers ~lustre ~memchecker +pmi +romio ~singularity +vt +wrapper-rpath fabrics=ofi schedulers=slurm variants: ~atomics ~cuda ~cxx ~cxx_exceptions ~internal-hwloc ~java +legacylaunchers ~lustre ~memchecker +pmi +romio ~singularity +vt +wrapper-rpath fabrics=ofi schedulers=slurm
require: require:
- one_of: - 'openmpi @4:'
- "openmpi @4: target=x86_64_v4"
- "openmpi @4: target=x86_64_v3"
palace: palace:
require: require:
- one_of: - palace ^fmt@9.1.0
- "palace ^fmt@9.1.0 target=x86_64_v4"
- "palace ^fmt@9.1.0 target=x86_64_v3"
when: "%oneapi"
- one_of:
- "palace ^fmt@9.1.0"
when: "%gcc"
pmix: pmix:
require: require:
- one_of: - 'pmix@3:'
- "pmix@3: target=x86_64_v4"
- "pmix@3: target=x86_64_v3"
quantum-espresso: quantum-espresso:
require: require:
- one_of: - quantum-espresso@6.6 ^intel-oneapi-mkl+cluster
- "quantum-espresso@6.6 ^intel-oneapi-mkl+cluster target=x86_64_v4"
- "quantum-espresso@6.6 ^intel-oneapi-mkl+cluster target=x86_64_v3"
when: "%intel"
- one_of:
- "quantum-espresso@6.6 ^intel-oneapi-mkl+cluster target=x86_64_v4"
- "quantum-espresso@6.6 ^intel-oneapi-mkl+cluster target=x86_64_v3"
when: "%oneapi"
slurm: slurm:
buildable: false buildable: false
externals: externals:
@ -183,17 +116,7 @@ spack:
spec: slurm@22.05.8 +pmix spec: slurm@22.05.8 +pmix
wrf: wrf:
require: require:
- one_of: - wrf@4 build_type=dm+sm
- "wrf@4 build_type=dm+sm target=x86_64_v4"
- "wrf@4 build_type=dm+sm target=x86_64_v3"
- "wrf@4.2.2 +netcdf_classic fflags=\"-fp-model fast=2 -no-heap-arrays -no-prec-div -no-prec-sqrt -fno-common\" build_type=dm+sm target=x86_64_v3"
when: "%intel"
- one_of:
- "wrf@4 build_type=dm+sm target=x86_64_v4"
- "wrf@4 build_type=dm+sm target=x86_64_v3"
- "wrf@4.2.2 +netcdf_classic fflags=\"-fp-model fast=2 -no-heap-arrays -no-prec-div -no-prec-sqrt -fno-common\" build_type=dm+sm target=x86_64_v3"
when: "%oneapi"
all: all:
compiler: [oneapi, gcc] compiler: [oneapi, gcc]
permissions: permissions: