Skip to content

Commit fc08964

Browse files
authored
Merge branch 'develop' into weekly_build
2 parents 8ac1e30 + 8b32642 commit fc08964

File tree

17 files changed

+325
-15
lines changed

17 files changed

+325
-15
lines changed
Lines changed: 245 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,245 @@
1+
name: ubuntu-ci-c6a-x86_64-oneapi-ifx-build
2+
on:
3+
pull_request:
4+
workflow_dispatch:
5+
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
8+
cancel-in-progress: true
9+
10+
defaults:
11+
run:
12+
shell: bash
13+
14+
jobs:
15+
ubuntu-ci-c6a-x86_64-oneapi-ifx-build:
16+
runs-on: [ubuntu-ci-c6a-x86_64]
17+
18+
steps:
19+
- name: cleanup
20+
run: |
21+
pwd
22+
ls -lart
23+
set +e
24+
find ./* -type d -exec chmod u+xw {} \;
25+
set -e
26+
rm -fr *
27+
28+
- name: checkout
29+
uses: actions/checkout@v4
30+
with:
31+
submodules: true
32+
33+
- name: prepare-directories
34+
run: |
35+
mkdir -p /home/ubuntu/spack-stack/build-cache/
36+
mkdir -p /home/ubuntu/spack-stack/source-cache/
37+
38+
- name: create-buildcache
39+
run: |
40+
# Get day of week to decide whether to use build caches or not
41+
DOW=$(date +%u)
42+
# Monday is 1 ... Sunday is 7
43+
if [[ $DOW == 7 ]]; then
44+
export USE_BINARY_CACHE=false
45+
echo "Ignore existing binary cache for creating buildcache environment"
46+
else
47+
export USE_BINARY_CACHE=true
48+
echo "Use existing binary cache for creating buildcache environment"
49+
fi
50+
51+
# Set up spack-stack
52+
source ./setup.sh
53+
export ENVNAME=ue-oneapi-ifx-2024.2.0-buildcache
54+
export ENVDIR=$PWD/envs/${ENVNAME}
55+
spack stack create env --site linux.default --template unified-dev --name ${ENVNAME} --compiler oneapi
56+
spack env activate ${ENVDIR}
57+
export SPACK_SYSTEM_CONFIG_PATH="${ENVDIR}/site"
58+
59+
# Find external packages
60+
spack external find --scope system \
61+
--exclude bison --exclude openssl \
62+
--exclude curl --exclude python \
63+
--exclude gmake
64+
spack external find --scope system sed
65+
spack external find --scope system perl
66+
spack external find --scope system wget
67+
spack external find --scope system texlive
68+
spack external find --scope system mysql
69+
70+
# Find compilers
71+
spack compiler find --scope system
72+
73+
# For Intel oneAPI
74+
echo "" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml
75+
echo "- compiler:" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml
76+
echo " spec: [email protected]" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml
77+
echo " paths:" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml
78+
echo " cc: /opt/intel/oneapi/compiler/2024.2/bin/icx" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml
79+
echo " cxx: /opt/intel/oneapi/compiler/2024.2/bin/icpx" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml
80+
echo " f77: /opt/intel/oneapi/compiler/2024.2/bin/ifx" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml
81+
echo " fc: /opt/intel/oneapi/compiler/2024.2/bin/ifx" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml
82+
echo " flags: {}" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml
83+
echo " operating_system: ubuntu22.04" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml
84+
echo " target: x86_64" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml
85+
echo " modules: []" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml
86+
echo " environment: {}" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml
87+
echo " extra_rpaths: []" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml
88+
89+
# Need to find external Intel MPI and annotate with the
90+
# correct compiler, no way to do that with spack commands.
91+
echo "" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
92+
echo " intel-oneapi-mpi:" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
93+
echo " buildable: false" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
94+
echo " externals:" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
95+
echo " - spec: [email protected]%[email protected]" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
96+
echo " prefix: /opt/intel/oneapi" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
97+
98+
# Add external Intel MKL and oneAPI runtime
99+
echo "" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
100+
echo " intel-oneapi-mkl:" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
101+
echo " externals:" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
102+
echo " - spec: [email protected]%[email protected]" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
103+
echo " prefix: /opt/intel/oneapi" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
104+
echo " intel-oneapi-runtime:" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
105+
echo " externals:" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
106+
echo " - spec: [email protected]%[email protected]" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
107+
echo " prefix: /opt/intel/oneapi" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
108+
109+
export -n SPACK_SYSTEM_CONFIG_PATH
110+
111+
# For buildcaches
112+
spack config add config:install_tree:padded_length:200
113+
114+
# Set compiler and MPI specs
115+
spack config add "packages:all:providers:mpi:[[email protected]]"
116+
spack config add "packages:all:compiler:[[email protected],[email protected]]"
117+
118+
# Add additional variants for MET packages, different from config/common/packages.yaml
119+
spack config add "packages:met:variants:+python +grib2 +graphics +lidar2nc +modis"
120+
121+
# Switch providers for blas, lapack, fftw-api
122+
spack config add "packages:all:providers:mpi:[intel-oneapi-mpi]"
123+
spack config add "packages:all:providers:blas:[intel-oneapi-mkl]"
124+
spack config add "packages:all:providers:fftw-api:[intel-oneapi-mkl]"
125+
spack config add "packages:all:providers:lapack:[intel-oneapi-mkl]"
126+
spack config add "packages:ectrans:require:'+mkl ~fftw'"
127+
spack config add "packages:gsibec:require:'+mkl'"
128+
spack config add "packages:py-numpy:require:['^intel-oneapi-mkl']"
129+
130+
# Pin gmake to avoid duplicate packages (excluded gmake from spack external find above)
131+
spack config add "packages:gmake:require:'@:4.2'"
132+
133+
# Remove wgrib2 from all virtual packages, since it doesn't build with oneAPI
134+
sed -i 's/depends_on("wgrib2")/#depends_on("wgrib2")/g' `grep -lRie wgrib2 spack-ext/`
135+
136+
# Don't generate ecflow module when using external package
137+
spack config add "modules:default:tcl:exclude:[ecflow]"
138+
139+
# Concretize and check for duplicates
140+
spack concretize 2>&1 | tee log.concretize.oneapi-ifx-2024.2.0-buildcache
141+
${SPACK_STACK_DIR}/util/show_duplicate_packages.py -d log.concretize.oneapi-ifx-2024.2.0-buildcache -i fms -i crtm -i esmf -i mapl
142+
143+
# Add and update source cache
144+
spack mirror add local-source file:///home/ubuntu/spack-stack/source-cache/
145+
spack mirror create -a -d /home/ubuntu/spack-stack/source-cache/
146+
147+
# Add binary cache if requested
148+
if [ "$USE_BINARY_CACHE" = true ] ; then
149+
set +e
150+
spack mirror add local-binary file:///home/ubuntu/spack-stack/build-cache/
151+
spack buildcache update-index local-binary || (echo "No valid binary cache found, proceed without" && spack mirror rm local-binary)
152+
set +e
153+
echo "Packages in spack binary cache:"
154+
spack buildcache list
155+
fi
156+
157+
# Break installation up in pieces and create build caches in between
158+
# This allows us to "spin up" builds that altogether take longer than
159+
# six hours, and/or fail later in the build process.
160+
161+
# base-env
162+
echo "base-env ..."
163+
spack install --fail-fast --source --no-check-signature base-env 2>&1 | tee log.install.oneapi-ifx-2024.2.0-buildcache.base-env
164+
spack buildcache create -u /home/ubuntu/spack-stack/build-cache/ base-env
165+
166+
# jedi-base-env
167+
echo "jedi-base-env ..."
168+
spack install --fail-fast --source --no-check-signature jedi-base-env 2>&1 | tee log.install.oneapi-ifx-2024.2.0-buildcache.jedi-base-env
169+
spack buildcache create -u /home/ubuntu/spack-stack/build-cache/ jedi-base-env
170+
171+
# jedi-ufs-env
172+
echo "jedi-ufs-env ..."
173+
spack install --fail-fast --source --no-check-signature jedi-ufs-env 2>&1 | tee log.install.oneapi-ifx-2024.2.0-buildcache.jedi-ufs-env
174+
spack buildcache create -u /home/ubuntu/spack-stack/build-cache/ jedi-ufs-env
175+
176+
# the rest
177+
echo "unified-env ..."
178+
spack install --fail-fast --source --no-check-signature 2>&1 | tee log.install.oneapi-ifx-2024.2.0-buildcache.unified-env
179+
spack buildcache create -u /home/ubuntu/spack-stack/build-cache/
180+
181+
# Remove binary cache for next round of concretization
182+
if [ "$USE_BINARY_CACHE" = true ] ; then
183+
spack mirror rm local-binary
184+
fi
185+
186+
# Remove buildcache config settings
187+
spack config remove config:install_tree:padded_length
188+
189+
# Next steps: synchronize source and build cache to a central/combined mirror?
190+
191+
# Cleanup
192+
spack clean -a
193+
spack env deactivate
194+
195+
- name: create-env
196+
run: |
197+
# Set up spack-stack
198+
source ./setup.sh
199+
export BUILDCACHE_ENVNAME=ue-oneapi-ifx-2024.2.0-buildcache
200+
export BUILDCACHE_ENVDIR=$PWD/envs/${BUILDCACHE_ENVNAME}
201+
export ENVNAME=ue-oneapi-ifx-2024.2.0
202+
export ENVDIR=$PWD/envs/${ENVNAME}
203+
rsync -av --exclude='install' --exclude='spack.lock' --exclude='.spack_db' ${BUILDCACHE_ENVDIR}/ ${ENVDIR}/
204+
spack env activate ${ENVDIR}
205+
206+
# Concretize and check for duplicates
207+
spack concretize --force 2>&1 | tee log.concretize.oneapi-ifx-2024.2.0
208+
${SPACK_STACK_DIR}/util/show_duplicate_packages.py -d log.concretize.oneapi-ifx-2024.2.0 -i fms -i crtm -i esmf -i mapl
209+
210+
# Add binary cache back in
211+
spack mirror add local-binary file:///home/ubuntu/spack-stack/build-cache/
212+
echo "Packages in combined spack build caches:"
213+
spack buildcache list
214+
215+
# Install from cache
216+
spack install --fail-fast --source --no-check-signature 2>&1 | tee log.install.oneapi-ifx-2024.2.0.unified-env
217+
218+
# Check shared libraries
219+
${SPACK_STACK_DIR}/util/ldd_check.py $SPACK_ENV 2>&1 | tee log.ldd_check
220+
221+
# Create modules
222+
spack clean -a
223+
spack module tcl refresh -y
224+
spack stack setup-meta-modules
225+
spack env deactivate
226+
227+
- name: test-env
228+
run: |
229+
source /etc/profile.d/modules.sh
230+
module use /home/ubuntu/spack-stack/modulefiles
231+
232+
export ENVNAME=ue-oneapi-ifx-2024.2.0
233+
export ENVDIR=$PWD/envs/${ENVNAME}
234+
ls -l ${ENVDIR}/install/modulefiles/Core
235+
236+
module use ${ENVDIR}/install/modulefiles/Core
237+
module load stack-oneapi/2024.2.0
238+
module load stack-intel-oneapi-mpi/2021.13
239+
module load stack-python/3.11.7
240+
module available
241+
242+
module load jedi-ufs-env
243+
module load ewok-env
244+
module load soca-env
245+
module list

configs/sites/tier1/atlantis/packages_intel.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ packages:
77
buildable: False
88
intel-oneapi-mpi:
99
externals:
10-
10+
- spec: [email protected]%[email protected] +classic-names
1111
prefix: /cm/shared/apps/intel/oneapi
1212
modules:
1313
- mpi/2021.6.0

configs/sites/tier1/aws-pcluster/packages_intel.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ packages:
1111
buildable: False
1212
intel-oneapi-mpi:
1313
externals:
14-
14+
- spec: [email protected]%[email protected] +classic-names
1515
prefix: /opt/intel/oneapi
1616
modules:
1717
- libfabric-aws/1.19.0amzn4.0

configs/sites/tier1/discover-scu16/packages_intel.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ packages:
77
buildable: False
88
intel-oneapi-mpi:
99
externals:
10-
10+
- spec: [email protected]%[email protected] +classic-names
1111
prefix: /usr/local/intel/oneapi/2021
1212
modules:
1313
- mpi/impi/2021.6.0

configs/sites/tier1/discover-scu17/packages_intel.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ packages:
77
buildable: False
88
intel-oneapi-mpi:
99
externals:
10-
- spec: [email protected]%intel@=2021.10.0
10+
- spec: [email protected]%intel@=2021.10.0 +classic-names
1111
prefix: /usr/local/intel/oneapi/2021
1212
modules:
1313
- mpi/impi/2021.10.0

configs/sites/tier1/hera/packages_intel.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ packages:
1111
buildable: False
1212
intel-oneapi-mpi:
1313
externals:
14-
14+
- spec: [email protected]%[email protected] +classic-names
1515
modules:
1616
- impi/2022.1.2
1717
prefix: /apps/oneapi

configs/sites/tier1/hercules/packages_intel.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ packages:
1111
buildable: False
1212
intel-oneapi-mpi:
1313
externals:
14-
14+
- spec: [email protected]%[email protected] +classic-names
1515
modules:
1616
- intel-oneapi-mpi/2021.9.0
1717
intel-oneapi-mkl:

configs/sites/tier1/jet/packages_intel.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ packages:
77
buildable: False
88
intel-oneapi-mpi:
99
externals:
10-
10+
- spec: [email protected]%[email protected] +classic-names
1111
modules:
1212
- impi/2022.1.2
1313
prefix: /apps/oneapi

configs/sites/tier1/nautilus/compilers.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,31 @@ compilers:
5959
append_path:
6060
CPATH: '/p/app/projects/NEPTUNE/spack-stack/oneapi-2024.2.1/compiler/2024.2/opt/compiler/include/intel64'
6161
extra_rpaths: []
62+
#- compiler:
63+
64+
# paths:
65+
# cc: /p/app/projects/NEPTUNE/spack-stack/oneapi-2025.0.0/compiler/2025.0/bin/icx
66+
# cxx: /p/app/projects/NEPTUNE/spack-stack/oneapi-2025.0.0/compiler/2025.0/bin/icpx
67+
# f77: /p/app/projects/NEPTUNE/spack-stack/oneapi-2025.0.0/compiler/2025.0/bin/ifx
68+
# fc: /p/app/projects/NEPTUNE/spack-stack/oneapi-2025.0.0/compiler/2025.0/bin/ifx
69+
# flags: {}
70+
# operating_system: rhel8
71+
# target: x86_64
72+
# modules:
73+
# - slurm
74+
# - tbb/2022.0
75+
# - compiler-rt/2025.0.0
76+
# - umf/0.9.0
77+
# - compiler-intel-llvm/2025.0.0
78+
# environment:
79+
# prepend_path:
80+
# PATH: '/opt/rh/gcc-toolset-11/root/usr/bin'
81+
# CPATH: '/opt/rh/gcc-toolset-11/root/usr/include'
82+
# LD_LIBRARY_PATH: '/opt/scyld/slurm/lib64:/opt/scyld/slurm/lib64/slurm:/opt/rh/gcc-toolset-11/root/usr/lib64:/opt/rh/gcc-toolset-11/root/usr/lib'
83+
# MODULEPATH: '/p/app/projects/NEPTUNE/spack-stack/oneapi-2025.0.0/modulefiles'
84+
# append_path:
85+
# CPATH: '/p/app/projects/NEPTUNE/spack-stack/oneapi-2025.0.0/compiler/2025.0/opt/compiler/include/intel64'
86+
# extra_rpaths: []
6287
- compiler:
6388
6489
paths:

configs/sites/tier1/nautilus/packages_oneapi.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
packages:
22
all:
33
4+
45
providers:
56
7+
68
mpi:
79
buildable: False
810
intel-oneapi-mpi:
@@ -11,22 +13,39 @@ packages:
1113
prefix: /p/app/projects/NEPTUNE/spack-stack/oneapi-2024.2.1
1214
modules:
1315
- mpi/2021.13
16+
17+
# prefix: /p/app/projects/NEPTUNE/spack-stack/oneapi-2025.0.0
18+
# modules:
19+
# - mpi/2021.14
1420
intel-oneapi-mkl:
1521
externals:
1622
1723
prefix: /p/app/projects/NEPTUNE/spack-stack/oneapi-2024.2.1
1824
modules:
1925
- mkl/2024.2
26+
27+
# prefix: /p/app/projects/NEPTUNE/spack-stack/oneapi-2025.0.0
28+
# modules:
29+
# - mkl/2025.0
2030
intel-oneapi-tbb:
2131
externals:
2232
2333
prefix: /p/app/projects/NEPTUNE/spack-stack/oneapi-2024.2.1
2434
modules:
2535
- tbb/2021.13
36+
37+
# prefix: /p/app/projects/NEPTUNE/spack-stack/oneapi-2025.0.0
38+
# modules:
39+
# - tbb/2022.0
2640
intel-oneapi-runtime:
2741
externals:
2842
2943
prefix: /p/app/projects/NEPTUNE/spack-stack/oneapi-2024.2.1
3044
modules:
3145
- tbb/2021.13
3246
- compiler-rt/2024.2.1
47+
48+
# prefix: /p/app/projects/NEPTUNE/spack-stack/oneapi-2025.0.0
49+
# modules:
50+
# - tbb/2022.0
51+
# - compiler-rt/2025.0.0

0 commit comments

Comments
 (0)