Skip to content

Commit 125c20b

Browse files
Add aws-plcuster[-aarch64] stacks (spack#37627)
Add aws-plcuster[-aarch64] stacks. These stacks build packages defined in https://github.com/spack/spack-configs/tree/main/AWS/parallelcluster They use a custom container from https://github.com/spack/gitlab-runners which includes necessary ParallelCluster software to link and build as well as an upstream spack installation with current GCC and dependencies. Intel and ARM software is installed and used during the build stage but removed from the buildcache before the signing stage. Files `configs/linux/{arch}/ci.yaml` select the necessary providers in order to build for specific architectures (icelake, skylake, neoverse_{n,v}1).
1 parent f7696a4 commit 125c20b

File tree

9 files changed

+394
-0
lines changed

9 files changed

+394
-0
lines changed

share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml

+120
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,26 @@ default:
1414
SPACK_TARGET_PLATFORM: "linux"
1515
SPACK_TARGET_ARCH: "x86_64_v3"
1616

17+
.linux_skylake:
18+
variables:
19+
SPACK_TARGET_PLATFORM: "linux"
20+
SPACK_TARGET_ARCH: "skylake_avx512"
21+
22+
.linux_icelake:
23+
variables:
24+
SPACK_TARGET_PLATFORM: "linux"
25+
SPACK_TARGET_ARCH: "icelake"
26+
27+
.linux_neoverse_n1:
28+
variables:
29+
SPACK_TARGET_PLATFORM: "linux"
30+
SPACK_TARGET_ARCH: "neoverse_n1"
31+
32+
.linux_neoverse_v1:
33+
variables:
34+
SPACK_TARGET_PLATFORM: "linux"
35+
SPACK_TARGET_ARCH: "neoverse_v1"
36+
1737
.linux_aarch64:
1838
variables:
1939
SPACK_TARGET_PLATFORM: "linux"
@@ -762,3 +782,103 @@ deprecated-ci-build:
762782
needs:
763783
- artifacts: True
764784
job: deprecated-ci-generate
785+
786+
########################################
787+
# AWS PCLUSTER
788+
########################################
789+
790+
.aws-pcluster-generate-image:
791+
image: { "name": "ghcr.io/spack/pcluster-amazonlinux-2:latest", "entrypoint": [""] }
792+
793+
.aws-pcluster-generate:
794+
before_script:
795+
# Setup postinstall Spack as upstream installation
796+
- - . "./share/spack/setup-env.sh"
797+
- . /etc/profile.d/modules.sh
798+
- if [[ -f /bootstrap/spack/etc/spack/packages.yaml ]]; then cp /bootstrap/spack/etc/spack/packages.yaml ./etc/spack/; fi
799+
- if [[ -f /bootstrap/spack/etc/spack/config.yaml ]]; then cp /bootstrap/spack/etc/spack/config.yaml ./etc/spack/; fi
800+
- if [[ -f /bootstrap/spack/etc/spack/modules.xyaml ]]; then cp /bootstrap/spack/etc/spack/modules.yaml ./etc/spack/; fi
801+
- if [[ -f /bootstrap/spack/etc/spack/mirrors.yaml ]]; then cp /bootstrap/spack/etc/spack/mirrors.yaml ./etc/spack/; fi
802+
- if [[ -d /bootstrap/spack/opt/spack ]]; then spack config add "upstreams:postinstall:install_tree:/bootstrap/spack/opt/spack"; fi
803+
- cd "${CI_PROJECT_DIR}" && curl -sOL https://raw.githubusercontent.com/spack/spack-configs/main/AWS/parallelcluster/postinstall.sh
804+
- sed -i -e '/nohup/s/&$//' -e 's/nohup//' -e "s/spack arch -t/echo ${SPACK_TARGET_ARCH}/g" postinstall.sh
805+
- /bin/bash postinstall.sh -fg
806+
- spack config --scope site add "packages:all:target:\"target=${SPACK_TARGET_ARCH}\""
807+
after_script:
808+
- - mv "${CI_PROJECT_DIR}/postinstall.sh" "${CI_PROJECT_DIR}/jobs_scratch_dir/"
809+
810+
# Icelake (one pipeline per target)
811+
.aws-pcluster-icelake:
812+
variables:
813+
SPACK_CI_STACK_NAME: aws-pcluster-icelake
814+
815+
aws-pcluster-generate-icelake:
816+
extends: [ ".linux_icelake", ".aws-pcluster-icelake", ".generate", ".tags-x86_64_v4", ".aws-pcluster-generate", ".aws-pcluster-generate-image" ]
817+
818+
aws-pcluster-build-icelake:
819+
extends: [ ".linux_icelake", ".aws-pcluster-icelake", ".build" ]
820+
trigger:
821+
include:
822+
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
823+
job: aws-pcluster-generate-icelake
824+
strategy: depend
825+
needs:
826+
- artifacts: True
827+
job: aws-pcluster-generate-icelake
828+
829+
# Skylake_avx512 (one pipeline per target)
830+
.aws-pcluster-skylake:
831+
variables:
832+
SPACK_CI_STACK_NAME: aws-pcluster-skylake
833+
834+
aws-pcluster-generate-skylake:
835+
extends: [ ".linux_skylake", ".aws-pcluster-skylake", ".generate", ".tags-x86_64_v4", ".aws-pcluster-generate", ".aws-pcluster-generate-image" ]
836+
837+
aws-pcluster-build-skylake:
838+
extends: [ ".linux_skylake", ".aws-pcluster-skylake", ".build" ]
839+
trigger:
840+
include:
841+
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
842+
job: aws-pcluster-generate-skylake
843+
strategy: depend
844+
needs:
845+
- artifacts: True
846+
job: aws-pcluster-generate-skylake
847+
848+
# Neoverse_n1 (one pipeline per target)
849+
.aws-pcluster-neoverse_n1:
850+
variables:
851+
SPACK_CI_STACK_NAME: aws-pcluster-neoverse_n1
852+
853+
aws-pcluster-generate-neoverse_n1:
854+
extends: [ ".linux_neoverse_n1", ".aws-pcluster-neoverse_n1", ".generate-aarch64", ".aws-pcluster-generate", ".aws-pcluster-generate-image" ]
855+
856+
aws-pcluster-build-neoverse_n1:
857+
extends: [ ".linux_neoverse_n1", ".aws-pcluster-neoverse_n1", ".build" ]
858+
trigger:
859+
include:
860+
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
861+
job: aws-pcluster-generate-neoverse_n1
862+
strategy: depend
863+
needs:
864+
- artifacts: True
865+
job: aws-pcluster-generate-neoverse_n1
866+
867+
# Neoverse_v1 (one pipeline per target)
868+
.aws-pcluster-neoverse_v1:
869+
variables:
870+
SPACK_CI_STACK_NAME: aws-pcluster-neoverse_v1
871+
872+
aws-pcluster-generate-neoverse_v1:
873+
extends: [ ".linux_neoverse_v1", ".aws-pcluster-neoverse_v1", ".generate-aarch64", ".aws-pcluster-generate", ".aws-pcluster-generate-image" ]
874+
875+
aws-pcluster-build-neoverse_v1:
876+
extends: [ ".linux_neoverse_v1", ".aws-pcluster-neoverse_v1", ".build" ]
877+
trigger:
878+
include:
879+
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
880+
job: aws-pcluster-generate-neoverse_v1
881+
strategy: depend
882+
needs:
883+
- artifacts: True
884+
job: aws-pcluster-generate-neoverse_v1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
ci:
2+
pipeline-gen:
3+
- any-job:
4+
variables:
5+
SPACK_TARGET_ARCH: icelake
6+
- build-job:
7+
before_script:
8+
- - curl -LfsS "https://github.com/JuliaBinaryWrappers/GNUMake_jll.jl/releases/download/GNUMake-v4.3.0+1/GNUMake.v4.3.0.x86_64-linux-gnu.tar.gz" -o gmake.tar.gz
9+
- printf "fef1f59e56d2d11e6d700ba22d3444b6e583c663d6883fd0a4f63ab8bd280f0f gmake.tar.gz" | sha256sum --check --strict --quiet
10+
- tar -xzf gmake.tar.gz -C /usr bin/make 2> /dev/null
11+
tags: ["x86_64_v4"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
ci:
2+
pipeline-gen:
3+
- any-job:
4+
variables:
5+
SPACK_TARGET_ARCH: neoverse_n1
6+
- build-job:
7+
tags: ["aarch64", "graviton2"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
ci:
2+
pipeline-gen:
3+
- any-job:
4+
variables:
5+
SPACK_TARGET_ARCH: neoverse_v1
6+
- build-job:
7+
tags: ["aarch64", "graviton3"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
ci:
2+
pipeline-gen:
3+
- any-job:
4+
variables:
5+
SPACK_TARGET_ARCH: skylake_avx512
6+
- build-job:
7+
before_script:
8+
- - curl -LfsS "https://github.com/JuliaBinaryWrappers/GNUMake_jll.jl/releases/download/GNUMake-v4.3.0+1/GNUMake.v4.3.0.x86_64-linux-gnu.tar.gz" -o gmake.tar.gz
9+
- printf "fef1f59e56d2d11e6d700ba22d3444b6e583c663d6883fd0a4f63ab8bd280f0f gmake.tar.gz" | sha256sum --check --strict --quiet
10+
- tar -xzf gmake.tar.gz -C /usr bin/make 2> /dev/null
11+
tags: ["x86_64_v4"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
spack:
2+
view: false
3+
4+
definitions:
5+
- compiler_specs:
6+
- gcc
7+
- gettext
8+
9+
- compiler_target:
10+
- '%[email protected] target=x86_64_v3'
11+
12+
- optimized_configs:
13+
# - gromacs
14+
- lammps
15+
# - mpas-model
16+
- openfoam
17+
# - palace
18+
# - py-devito
19+
# - quantum-espresso
20+
# - wrf
21+
22+
- optimized_libs:
23+
- mpich
24+
- openmpi
25+
26+
specs:
27+
- matrix:
28+
- - $compiler_specs
29+
- - $compiler_target
30+
- $optimized_configs
31+
# - $optimized_libs
32+
33+
mirrors: { "mirror": "s3://spack-binaries/develop/aws-pcluster-icelake" }
34+
35+
ci:
36+
pipeline-gen:
37+
- build-job:
38+
image: { "name": "ghcr.io/spack/pcluster-amazonlinux-2:latest", "entrypoint": [""] }
39+
before_script:
40+
- - . "./share/spack/setup-env.sh"
41+
- . /etc/profile.d/modules.sh
42+
- spack --version
43+
- spack arch
44+
# Setup postinstall Spack as upstream installation
45+
- - if [[ -f /bootstrap/spack/etc/spack/packages.yaml ]]; then cp /bootstrap/spack/etc/spack/packages.yaml ./etc/spack/; fi
46+
- if [[ -f /bootstrap/spack/etc/spack/config.yaml ]]; then cp /bootstrap/spack/etc/spack/config.yaml ./etc/spack/; fi
47+
- if [[ -f /bootstrap/spack/etc/spack/modules.yaml ]]; then cp /bootstrap/spack/etc/spack/modules.yaml ./etc/spack/; fi
48+
- if [[ -f /bootstrap/spack/etc/spack/mirrors.yaml ]]; then cp /bootstrap/spack/etc/spack/mirrors.yaml ./etc/spack/; fi
49+
- if [[ -d /bootstrap/spack/opt/spack ]]; then spack config add "upstreams:postinstall:install_tree:/bootstrap/spack/opt/spack"; fi
50+
- - /bin/bash "${SPACK_ARTIFACTS_ROOT}/postinstall.sh" -fg
51+
- spack config --scope site add "packages:all:target:\"target=${SPACK_TARGET_ARCH}\""
52+
- signing-job:
53+
before_script:
54+
# Do not distribute Intel & ARM binaries
55+
- - 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
56+
- 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
57+
cdash:
58+
build-group: AWS Packages
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
spack:
2+
view: false
3+
4+
definitions:
5+
- compiler_specs:
6+
- gcc
7+
- gettext
8+
9+
- compiler_target:
10+
- '%[email protected] target=aarch64'
11+
12+
- optimized_configs:
13+
- gromacs
14+
# - lammps
15+
# - mpas-model
16+
- openfoam
17+
- palace
18+
# - py-devito
19+
- quantum-espresso
20+
# - wrf
21+
22+
- optimized_libs:
23+
- mpich
24+
- openmpi
25+
26+
specs:
27+
- matrix:
28+
- - $compiler_specs
29+
- - $compiler_target
30+
- $optimized_configs
31+
- $optimized_libs
32+
33+
34+
mirrors: { "mirror": "s3://spack-binaries/develop/aws-pcluster-neoverse_n1" }
35+
36+
ci:
37+
pipeline-gen:
38+
- build-job:
39+
image: { "name": "ghcr.io/spack/pcluster-amazonlinux-2:latest", "entrypoint": [""] }
40+
tags: ["aarch64"]
41+
before_script:
42+
- - . "./share/spack/setup-env.sh"
43+
- . /etc/profile.d/modules.sh
44+
- spack --version
45+
- spack arch
46+
# Setup postinstall Spack as upstream installation
47+
- - if [[ -f /bootstrap/spack/etc/spack/packages.yaml ]]; then cp /bootstrap/spack/etc/spack/packages.yaml ./etc/spack/; fi
48+
- if [[ -f /bootstrap/spack/etc/spack/config.yaml ]]; then cp /bootstrap/spack/etc/spack/config.yaml ./etc/spack/; fi
49+
- if [[ -f /bootstrap/spack/etc/spack/modules.yaml ]]; then cp /bootstrap/spack/etc/spack/modules.yaml ./etc/spack/; fi
50+
- if [[ -f /bootstrap/spack/etc/spack/mirrors.yaml ]]; then cp /bootstrap/spack/etc/spack/mirrors.yaml ./etc/spack/; fi
51+
- if [[ -d /bootstrap/spack/opt/spack ]]; then spack config add "upstreams:postinstall:install_tree:/bootstrap/spack/opt/spack"; fi
52+
- - /bin/bash "${SPACK_ARTIFACTS_ROOT}/postinstall.sh" -fg
53+
- spack config --scope site add "packages:all:target:\"target=${SPACK_TARGET_ARCH}\""
54+
- signing-job:
55+
before_script:
56+
# Do not distribute Intel & ARM binaries
57+
- - 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
58+
- 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
59+
60+
cdash:
61+
build-group: AWS Packages
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
spack:
2+
view: false
3+
4+
definitions:
5+
- compiler_specs:
6+
- gcc
7+
- gettext
8+
9+
- compiler_target:
10+
- '%[email protected] target=aarch64'
11+
12+
- optimized_configs:
13+
- gromacs
14+
# - lammps
15+
# - mpas-model
16+
- openfoam
17+
- palace
18+
# - py-devito
19+
- quantum-espresso
20+
# - wrf
21+
22+
- optimized_libs:
23+
- mpich
24+
- openmpi
25+
26+
specs:
27+
- matrix:
28+
- - $compiler_specs
29+
- - $compiler_target
30+
- $optimized_configs
31+
- $optimized_libs
32+
33+
34+
mirrors: { "mirror": "s3://spack-binaries/develop/aws-pcluster-neoverse_v1" }
35+
36+
ci:
37+
pipeline-gen:
38+
- build-job:
39+
image: { "name": "ghcr.io/spack/pcluster-amazonlinux-2:latest", "entrypoint": [""] }
40+
tags: ["aarch64"]
41+
before_script:
42+
- - . "./share/spack/setup-env.sh"
43+
- . /etc/profile.d/modules.sh
44+
- spack --version
45+
- spack arch
46+
# Setup postinstall Spack as upstream installation
47+
- - if [[ -f /bootstrap/spack/etc/spack/packages.yaml ]]; then cp /bootstrap/spack/etc/spack/packages.yaml ./etc/spack/; fi
48+
- if [[ -f /bootstrap/spack/etc/spack/config.yaml ]]; then cp /bootstrap/spack/etc/spack/config.yaml ./etc/spack/; fi
49+
- if [[ -f /bootstrap/spack/etc/spack/modules.yaml ]]; then cp /bootstrap/spack/etc/spack/modules.yaml ./etc/spack/; fi
50+
- if [[ -f /bootstrap/spack/etc/spack/mirrors.yaml ]]; then cp /bootstrap/spack/etc/spack/mirrors.yaml ./etc/spack/; fi
51+
- if [[ -d /bootstrap/spack/opt/spack ]]; then spack config add "upstreams:postinstall:install_tree:/bootstrap/spack/opt/spack"; fi
52+
- - /bin/bash "${SPACK_ARTIFACTS_ROOT}/postinstall.sh" -fg
53+
- spack config --scope site add "packages:all:target:\"target=${SPACK_TARGET_ARCH}\""
54+
- signing-job:
55+
before_script:
56+
# Do not distribute Intel & ARM binaries
57+
- - 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
58+
- 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
59+
60+
cdash:
61+
build-group: AWS Packages

0 commit comments

Comments
 (0)