forked from earth-system-radiation/rte-rrtmgp
-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (81 loc) · 2.52 KB
/
self-hosted-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Self-hosted CI
on: [push, pull_request, workflow_dispatch]
jobs:
CI:
runs-on: daint
strategy:
matrix:
include:
- config_name: pgi_default_gpu
compiler_base: pgi
compiler_module: pgi
accel_module: craype-accel-nvidia60
# Generic accelerator flag
FCFLAGS: "-O3 -acc -Mallocatable=03 -gopt"
RTE_KERNELS: openacc
- config_name: cce-cpu-icon-production
compiler_base: cray
compiler_module: cce-icon/11.0.0
accel_module: ""
# Production flags for Icon model
RTE_KERNELS: default
FCFLAGS: "-hadd_paren -r am -Ktrap=divz,ovf,inv -hflex_mp=intolerant -hfp1 -hnoacc -O1,cache0"
- config_name: cce-openmp
compiler_base: cray
compiler_module: cce/11.0.0
accel_module: craype-accel-nvidia60
# OpenMP flags from Nichols Romero (Argonne)
FCFLAGS: "-hnoacc -homp -O0"
RTE_KERNELS: openacc
env:
FCFLAGS: ${{ matrix.FCFLAGS }}
RTE_KERNELS: ${{ matrix.RTE_KERNELS }}
RUN_CMD: "srun -C gpu -A pr55 -p cscsci -t 15:00"
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Create module environment
run: |
set -e
echo '
module load daint-gpu
export PATH=$CRAY_BINUTILS_BIN:$PATH
module swap PrgEnv-cray PrgEnv-${{ matrix.compiler_base }}
module swap ${{ matrix.compiler_base }} ${{ matrix.compiler_module }}
module load ${{ matrix.accel_module }}
module load cray-netcdf cray-hdf5
export LD_LIBRARY_PATH=$CRAY_LD_LIBRARY_PATH:$LD_LIBRARY_PATH
export CUDA_HOME=$CUDATOOLKIT_HOME
echo Compiler Environment:
module list
echo LD_LIBRARY_PATH is:
echo $LD_LIBRARY_PATH
' > compiler_modules
- name: Stage files
run: |
set -e
cd examples/rfmip-clear-sky
source ./stage_files.sh
- name: Make
run: |
set -e
source compiler_modules
export RRTMGP_ROOT=$PWD
export FC=ftn
make clean
make libs
- name: Run
run: |
set -e
source compiler_modules
module load cray-python
export RRTMGP_ROOT=$PWD
make tests
- name: Check results
run: |
set -e
module load daint-gpu
export RRTMGP_ROOT=$PWD
# This module will unload some of the build modules, so do the checks separately
module load netcdf-python
make check