Skip to content

Commit 1e75685

Browse files
committed
Extension of ATOS CI. Add arch files for Intel/Gnu Atos.
1 parent 3d259a2 commit 1e75685

File tree

5 files changed

+414
-13
lines changed

5 files changed

+414
-13
lines changed

.github/workflows/build-hpc.yml

Lines changed: 158 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,30 +21,46 @@ on:
2121
types: [labeled]
2222

2323
jobs:
24-
ci-hpc:
25-
name: ci-hpc
24+
ci-hpc-nvhpc:
25+
name: ci-hpc-nvhpc
2626
if: ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}
2727

2828
strategy:
2929
fail-fast: false # false: try to complete all jobs
3030

3131
matrix:
32-
cuda: [False, True]
33-
openmp: [False, True]
32+
build_type: [RelWithDebInfo]
3433
name:
3534
- ac-gpu nvhpc
3635

36+
cuda: [False, True]
37+
openmp: [False, True]
38+
3739
include:
3840
- name: ac-gpu nvhpc
3941
site: ac-batch
42+
compiler_cc: mpicc
43+
compiler_cxx: mpic++
44+
compiler_fc: mpifort
4045
sbatch_options: |
4146
#SBATCH --time=00:20:00
4247
#SBATCH --nodes=1
43-
#SBATCH --ntasks=1
48+
#SBATCH --ntasks=2
4449
#SBATCH --cpus-per-task=32
4550
#SBATCH --gpus-per-task=1
4651
#SBATCH --mem=100G
4752
#SBATCH --qos=dg
53+
modules:
54+
- cmake
55+
- ninja
56+
- ecbuild
57+
- prgenv/nvidia
58+
- nvidia/24.5
59+
- hpcx-openmpi/2.19.0-cuda
60+
- hdf5/1.14.3
61+
- python3
62+
gpu: 1
63+
toolchain: arch/ecmwf/hpc2020/nvhpc/24.5/toolchain.cmake
4864

4965
runs-on: [self-hosted, linux, hpc]
5066
env:
@@ -56,32 +72,161 @@ jobs:
5672
troika_user: ${{ secrets.HPC_CI_SSH_USER }}
5773
sbatch_options: ${{ matrix.sbatch_options }}
5874
template_data: |
75+
cmake_options:
76+
- -DENABLE_OMP_OFFLOAD=${{ matrix.openmp }}
77+
- -DENABLE_CUDA=${{ matrix.cuda }}
78+
- -DENABLE_HDF5=ON
79+
- -DENABLE_SINGLE_PRECISION=ON
80+
- -DENABLE_DOUBLE_PRECISION=ON
81+
- -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }}
82+
- -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
83+
dependencies:
84+
ecmwf/fckit:
85+
version: 0.13.0
86+
cmake_options:
87+
- -DENABLE_TESTS=OFF
88+
- -DENABLE_FCKIT_VENV=ON
89+
- -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
90+
ecmwf-ifs/fiat:
91+
version: 1.5.0
92+
cmake_options:
93+
- -DENABLE_MPI=ON
94+
- -DENABLE_TESTS=OFF
95+
- -DENABLE_SINGLE_PRECISION=ON
96+
- -DENABLE_DOUBLE_PRECISION=ON
97+
- -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
98+
template: |
99+
{% for module in "${{ join(matrix.modules, ',') }}".split(',') %}
100+
module load {{module}}
101+
{% endfor %}
102+
BASEDIR=$PWD
103+
{% for name, options in dependencies.items() %}
104+
mkdir -p {{name}}
105+
pushd {{name}}
106+
git init
107+
git remote add origin ${{ github.server_url }}/{{name}}
108+
git fetch origin {{options['version']}}
109+
git reset --hard FETCH_HEAD
110+
cmake -G Ninja -S . -B build \
111+
{% for name in dependencies %}
112+
{% set org, proj = name.split('/') %}
113+
-D{{proj}}_ROOT=$BASEDIR/{{name}}/installation \
114+
{% endfor %}
115+
{{ options['cmake_options']|join(' ') }}
116+
cmake --build build
117+
cmake --install build --prefix installation
118+
popd
119+
{% endfor %}
120+
REPO=${{ github.event.pull_request.head.repo.full_name || github.repository }}
121+
SHA=${{ github.event.pull_request.head.sha || github.sha }}
122+
mkdir -p $REPO
123+
pushd $REPO
124+
git init
125+
git remote add origin ${{ github.server_url }}/$REPO
126+
git fetch origin $SHA
127+
git reset --hard FETCH_HEAD
128+
popd
129+
cmake -G Ninja -S $REPO -B build \
130+
{% for name in dependencies %}
131+
{% set org, proj = name.split('/') %}
132+
-D{{proj}}_ROOT=$BASEDIR/{{name}}/installation \
133+
{% endfor %}
134+
{{ cmake_options|join(' ') }}
135+
cmake --build build
136+
ctest --test-dir build --output-on-failure
137+
138+
ci-hpc-gnuintel:
139+
name: ci-hpc
140+
if: ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}
141+
142+
strategy:
143+
fail-fast: false # false: try to complete all jobs
144+
145+
matrix:
146+
build_type: [RelWithDebInfo]
147+
name:
148+
- ac-cpu intel
149+
- ac-cpu gnu
150+
151+
include:
152+
153+
- name: ac-cpu intel
154+
site: ac-batch
155+
compiler: intel-classic
156+
sbatch_options: |
157+
#SBATCH --time=00:20:00
158+
#SBATCH --nodes=1
159+
#SBATCH --ntasks=2
160+
#SBATCH --cpus-per-task=32
161+
#SBATCH --hint=nomultithread
162+
#SBATCH --qos=np
59163
modules:
60164
- cmake
61165
- ninja
62166
- ecbuild
63-
- prgenv/nvidia
64-
- nvidia/24.5
167+
- prgenv/intel
168+
- intel/2023.2.0
169+
- hpcx-openmpi/2.9.0
170+
- hdf5/1.14.3
171+
- python3
172+
gpu: 0
173+
toolchain: arch/ecmwf/hpc2020/intel/2021.4.0/toolchain.cmake
174+
175+
- name: ac-cpu gnu
176+
site: ac-batch
177+
compiler: gnu-14
178+
sbatch_options: |
179+
#SBATCH --time=00:20:00
180+
#SBATCH --nodes=1
181+
#SBATCH --ntasks=2
182+
#SBATCH --cpus-per-task=32
183+
#SBATCH --hint=nomultithread
184+
#SBATCH --qos=np
185+
modules:
186+
- cmake
187+
- ninja
188+
- ecbuild
189+
- prgenv/gnu
190+
- gcc/14.2.0
191+
- openmpi/4.1.1.1
192+
- hdf5/1.14.3
65193
- python3
194+
gpu: 0
195+
toolchain: arch/ecmwf/hpc2020/gnu/11.2.0/toolchain.cmake
196+
197+
runs-on: [self-hosted, linux, hpc]
198+
env:
199+
GH_TOKEN: ${{ github.token }}
200+
steps:
201+
- uses: ecmwf-actions/reusable-workflows/ci-hpc-generic@v2
202+
with:
203+
site: ${{ matrix.site }}
204+
troika_user: ${{ secrets.HPC_CI_SSH_USER }}
205+
sbatch_options: ${{ matrix.sbatch_options }}
206+
template_data: |
66207
cmake_options:
67-
- -DENABLE_OMP_OFFLOAD=${{ matrix.openmp }}
68-
- -DENABLE_CUDA=${{ matrix.cuda }}
69208
- -DENABLE_SINGLE_PRECISION=ON
70209
- -DENABLE_DOUBLE_PRECISION=ON
71-
- -DCMAKE_TOOLCHAIN_FILE=arch/ecmwf/hpc2020/nvhpc/24.5/toolchain.cmake
210+
- -DENABLE_HDF5=ON
211+
- -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }}
212+
- -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
72213
dependencies:
73214
ecmwf/fckit:
74215
version: 0.13.0
75216
cmake_options:
76217
- -DENABLE_TESTS=OFF
77218
- -DENABLE_FCKIT_VENV=ON
219+
- -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
78220
ecmwf-ifs/fiat:
79-
version: 1.4.1
221+
version: 1.5.0
80222
cmake_options:
223+
- -DENABLE_MPI=ON
224+
- -DENABLE_TESTS=OFF
81225
- -DENABLE_SINGLE_PRECISION=ON
82226
- -DENABLE_DOUBLE_PRECISION=ON
227+
- -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
83228
template: |
84-
{% for module in modules %}
229+
{% for module in "${{ join(matrix.modules, ',') }}".split(',') %}
85230
module load {{module}}
86231
{% endfor %}
87232
BASEDIR=$PWD
@@ -118,4 +263,4 @@ jobs:
118263
{% endfor %}
119264
{{ cmake_options|join(' ') }}
120265
cmake --build build
121-
ctest --test-dir build
266+
ctest --test-dir build --output-on-failure
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# (C) Copyright 1988- ECMWF.
2+
#
3+
# This software is licensed under the terms of the Apache Licence Version 2.0
4+
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
5+
# In applying this licence, ECMWF does not waive the privileges and immunities
6+
# granted to it by virtue of its status as an intergovernmental organisation
7+
# nor does it submit to any jurisdiction.
8+
9+
# Store tracing and disable (module is *way* too verbose)
10+
{ tracing_=${-//[^x]/}; set +x; } 2>/dev/null
11+
12+
module_load() {
13+
echo "+ module load $1"
14+
module load $1
15+
}
16+
module_unload() {
17+
echo "+ module unload $1"
18+
module unload $1
19+
}
20+
21+
# Unload all modules to be certain
22+
module purge
23+
24+
# Load modules
25+
module_load prgenv/gnu
26+
module_load gcc/11.2.0
27+
module_load hpcx-openmpi/2.10.0
28+
module_load boost/1.71.0
29+
module_load hdf5/1.10.6
30+
module_load cmake/3.28.3
31+
module_load python3/3.11.10-01
32+
module_load java/11.0.6
33+
module_load ninja/1.11.1
34+
35+
# Restore tracing to stored setting
36+
{ if [[ -n "$tracing_" ]]; then set -x; else set +x; fi } 2>/dev/null
37+
38+
export ECBUILD_TOOLCHAIN="./toolchain.cmake"
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# (C) Copyright 1988- ECMWF.
2+
#
3+
# This software is licensed under the terms of the Apache Licence Version 2.0
4+
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
5+
# In applying this licence, ECMWF does not waive the privileges and immunities
6+
# granted to it by virtue of its status as an intergovernmental organisation
7+
# nor does it submit to any jurisdiction.
8+
9+
####################################################################
10+
# Compiler FLAGS
11+
####################################################################
12+
13+
# General Flags (add to default)
14+
set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -ffpe-trap=invalid,zero,overflow")
15+
set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -fstack-arrays")
16+
set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -fconvert=big-endian")
17+
set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -fbacktrace")
18+
set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -fno-second-underscore")
19+
set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -ffast-math")
20+
set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -fno-unsafe-math-optimizations")
21+
set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -march=znver2")
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# (C) Copyright 1988- ECMWF.
2+
#
3+
# This software is licensed under the terms of the Apache Licence Version 2.0
4+
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
5+
# In applying this licence, ECMWF does not waive the privileges and immunities
6+
# granted to it by virtue of its status as an intergovernmental organisation
7+
# nor does it submit to any jurisdiction.
8+
9+
# Source me to get the correct configure/build/run environment
10+
11+
# Store tracing and disable (module is *way* too verbose)
12+
{ tracing_=${-//[^x]/}; set +x; } 2>/dev/null
13+
14+
module_load() {
15+
echo "+ module load $1"
16+
module load $1
17+
}
18+
module_unload() {
19+
echo "+ module unload $1"
20+
module unload $1
21+
}
22+
23+
# Unload all modules to be certain
24+
module_unload intel
25+
module_unload openmpi
26+
module_unload hpcx-openmpi
27+
module_unload boost
28+
module_unload hdf5
29+
module_unload cmake
30+
module_unload python3
31+
module_unload java
32+
33+
# Load modules
34+
module_load prgenv/intel
35+
module_load intel/2021.4.0
36+
module_load hpcx-openmpi/2.10.0
37+
module_load boost/1.71.0
38+
module_load hdf5/1.10.6
39+
module_load cmake/3.20.2
40+
module_load python3/3.8.8-01
41+
module_load java/11.0.6
42+
43+
set -x
44+
45+
# Restore tracing to stored setting
46+
{ if [[ -n "$tracing_" ]]; then set -x; else set +x; fi } 2>/dev/null
47+
48+
export ECBUILD_TOOLCHAIN="./toolchain.cmake"

0 commit comments

Comments
 (0)