Skip to content

Commit

Permalink
ci: refactor gitlab-ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
skosukhin committed Dec 23, 2024
1 parent 5a9162c commit 274101c
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 35 deletions.
26 changes: 16 additions & 10 deletions .gitlab/common.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,33 @@
.dp:
variables:
FPMODEL: DP
RTE_ENABLE_SP: OFF
FAILURE_THRESHOLD: "7.e-4"

.sp:
variables:
FPMODEL: SP
RTE_ENABLE_SP: ON
FAILURE_THRESHOLD: "3.5e-1"

.common:
variables:
# Make variables:
MAKEFLAGS: -j8
RRTMGP_ROOT: ${CI_PROJECT_DIR}
RRTMGP_DATA_TAG: v1.8.2
CMAKE_BUILD_PARALLEL_LEVEL: 8
VERBOSE:
# TODO: add missing test dependencies and run them in parallel:
# CTEST_PARALLEL_LEVEL: 8
CTEST_OUTPUT_ON_FAILURE: 1
script:
#
# Build libraries, examples and tests
#
# - $FC -v
- cmake -S . -B build -DCMAKE_Fortran_COMPILER=$FC -DCMAKE_Fortran_FLAGS="$FCFLAGS" -DRRTMGP_DATA_VERSION=$RRTMGP_DATA_TAG -DPRECISION=$FPMODEL -DUSE_C_BOOL=$RTE_CBOOL -DKERNEL_MODE=$RTE_KERNELS -DENABLE_TESTS=ON -DFAILURE_THRESHOLD=$FAILURE_THRESHOLD
- cmake --build build --config Release -- -j8
- |
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=None \
-DRTE_ENABLE_SP=$RTE_ENABLE_SP \
-DKERNEL_MODE=$KERNEL_MODE \
-DBUILD_TESTING=ON \
-DFAILURE_THRESHOLD=$FAILURE_THRESHOLD
- cmake --build build
#
# Run examples, tests and checks
#
- ctest -V --test-dir build
- ctest --test-dir build
27 changes: 7 additions & 20 deletions .gitlab/levante.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,38 +29,25 @@ variables:
.nvhpc:
variables:
# Core variables:
# FC: /sw/spack-levante/nvhpc-22.5-v4oky3/Linux_x86_64/22.5/compilers/bin/nvfortran
FC: /sw/spack-levante/nvhpc-24.9-p7iohv/Linux_x86_64/24.9/compilers/bin/nvfortran
# Convenience variables:
VERSION_FCFLAGS: --version
NFHOME: /sw/spack-levante/netcdf-fortran-4.5.4-syv4qr
NCHOME: /sw/spack-levante/netcdf-c-4.9.0-gc7kgj
NetCDF_Fortran_ROOT: /sw/spack-levante/netcdf-fortran-4.6.1-4wu5wt

.nag:
variables:
# Core variables:
FC: /sw/spack-levante/nag-7.1-lqjbej/bin/nagfor
# Convenience variables:
VERSION_FCFLAGS: -V
NFHOME: /sw/spack-levante/netcdf-fortran-4.5.3-5di6qe
NCHOME: /sw/spack-levante/netcdf-c-4.8.1-vbnli5
NetCDF_Fortran_ROOT: /sw/spack-levante/netcdf-fortran-4.5.3-5di6qe

.common-levante:
extends: .common
variables:
PYHOME: /sw/spack-levante/mambaforge-22.9.0-2-Linux-x86_64-kptncg
# Suppress an irrelevant but annoying error message:
PROJ_LIB: ${PYHOME}/share/proj
# Make variables:
FCINCLUDE: -I${NFHOME}/include
LDFLAGS: -L${NFHOME}/lib -L${NCHOME}/lib
before_script:
- module purge
- module load git
# Extend the existing environment variables:
- export PATH="${PYHOME}/bin:${PATH}"
- export LD_LIBRARY_PATH="${NFHOME}/lib:${NCHOME}/lib:${LD_LIBRARY_PATH-}"
# Some tests require a large stack:
- ulimit -s unlimited

Expand All @@ -71,8 +58,8 @@ variables:
- .common-levante
variables:
# Compiler flags used for ICON model:
FCFLAGS: -g -O2 -Mrecursive -Mallocatable=03 -Mstack_arrays -Minfo=accel,inline -acc=gpu,verystrict -gpu=cc80,cuda11.8 -DRTE_USE_${FPMODEL}
RTE_KERNELS: accel
FFLAGS: -g -O2 -Mrecursive -Mallocatable=03 -Mstack_arrays -Minfo=accel,inline -acc=gpu,verystrict -gpu=cc80,cuda12.6
KERNEL_MODE: accel

.nag-cpu:
extends:
Expand All @@ -81,17 +68,17 @@ variables:
- .common-levante
variables:
# Compiler flags used for ICON model:
FCFLAGS: -Wc=/sw/spack-levante/gcc-11.2.0-bcn7mb/bin/gcc -f2008 -colour -w=uep -g -gline -O0 -float-store -nan -Wc,-g -Wc,-pipe -Wc,--param,max-vartrack-size=200000000 -Wc,-mno-fma -C=all -DRTE_USE_CBOOL -DRTE_USE_${FPMODEL}
FFLAGS: -Wc=/sw/spack-levante/gcc-11.2.0-bcn7mb/bin/gcc -f2008 -colour -w=uep -g -gline -O0 -float-store -nan -Wc,-g -Wc,-pipe -Wc,--param,max-vartrack-size=200000000 -Wc,-mno-fma -C=all

.nag-cpu-default:
extends: .nag-cpu
variables:
RTE_KERNELS: default
KERNEL_MODE: default

.nag-cpu-accel:
extends: .nag-cpu
variables:
RTE_KERNELS: accel
KERNEL_MODE: accel

nvhpc-gpu-openacc-DP:
extends:
Expand Down
7 changes: 2 additions & 5 deletions .gitlab/lumi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,7 @@ variables:
.cce:
variables:
# Core variables:
FC: ftn
# Convenience variables:
VERSION_FCFLAGS: -V
COMPILER_MODULES: PrgEnv-cray cce/16.0.1 craype-x86-milan

#
Expand Down Expand Up @@ -91,8 +88,8 @@ setup-python:
- .common-lumi
variables:
# Compiler flags used for ICON model:
FCFLAGS: -hacc -hadd_paren -Ktrap=divz,ovf,inv -hflex_mp=intolerant -hfp1 -g -DRTE_USE_${FPMODEL}
RTE_KERNELS: accel
FFLAGS: -hacc -hadd_paren -Ktrap=divz,ovf,inv -hflex_mp=intolerant -hfp1 -g
KERNEL_MODE: accel
# Convenience variables:
EXTRA_COMPILER_MODULES: craype-accel-amd-gfx90a rocm

Expand Down

0 comments on commit 274101c

Please sign in to comment.