forked from tenstream/tenstream
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
95 lines (86 loc) · 2.91 KB
/
.gitlab-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
84
85
86
87
88
89
90
91
92
93
94
95
stages:
- build
.template_build_PETSC: &template_build_PETSC
- export PETSC_DIR=$CI_PROJECT_DIR/$PETSC_DIR
- echo "Installing Petsc in ${PETSC_DIR}/${PETSC_ARCH}"
- git clone -q --depth=1 https://gitlab.com/petsc/petsc.git $PETSC_DIR
- cd $PETSC_DIR
- >
CMD="./configure
--with-fortran
--with-fortran-interfaces
--with-precision=$PETSC_PRECISION
--with-64-bit-indices=$PETSC_64_INTEGERS
--with-debugging=$PETSC_DEBUGGING"
- echo $CMD && $CMD && make PETSC_DIR=$PETSC_DIR PETSC_ARCH=$PETSC_ARCH all
- cd $CI_PROJECT_DIR
# Build Stage
.build:default:
stage: build
script:
- if [ ! -z "$MODULES" ]; then module load $MODULES || exit 1; module list; fi
- mkdir -p build && cd build
- cmake -DCMAKE_BUILD_TYPE="$BUILD_TYPE" -DCTEST_MPIRUN_FLAGS="$MPIRUN_FLAGS" -DMPIEXEC="$MPIEXEC" .. || exit 1
- make all -j || exit 2
- CMD="ctest $CTEST_ARGS"
- echo $CMD && $CMD || exit 3
variables:
CTEST_ARGS: "-V -E 'boxmc|LUT'"
BUILD_TYPE: RELEASE
MPIEXEC: "mpirun"
MPIRUN_FLAGS: '' #--allow-run-as-root;-A;bm0974;-p;shared
build:docker:ubuntu-rolling:
extends: .build:default
image: ubuntu:rolling
before_script:
- DEBIAN_FRONTEND=noninteractive apt-get -qq update
- DEBIAN_FRONTEND=noninteractive apt-get -qq install -fy build-essential cmake gfortran git libhdf5-mpi-dev libnetcdf-dev libnetcdff-dev libopenblas-dev libopenmpi-dev m4 openmpi-bin python wget
- *template_build_PETSC
tags:
- docker.meteo.physik.lmu.de
variables:
CTEST_ARGS: '-V -E boxmc|LUT|pfunit_test_pprts_symmetry|pfunit_test_rrtm_lw_Bsrfc|pfunit_test_rrtm_lw_sw'
MPIRUN_FLAGS: "--allow-run-as-root;--oversubscribe"
PETSC_DIR: petsc
PETSC_ARCH: default
PETSC_PRECISION: double
PETSC_64_INTEGERS: 0
PETSC_DEBUGGING: 1
BUILD_TYPE: DEBUG
# MIM runs
.build:mim:default:
extends: .build:default
before_script:
- mkdir -p $CI_PROJECT_DIR/LUT; cp -rsn /project/meteo/homepages/Fabian.Jakub/TenstreamLUT/* $CI_PROJECT_DIR/LUT/
tags:
- slurm.meteo.physik.lmu.de
variables:
LUT_BASENAME: "$CI_PROJECT_DIR/LUT/LUT"
SRUN_OPTIONS: "--time 02:00:00 --mem 4G -n 9"
MPIEXEC: "srun"
MPIRUN_FLAGS: '--mpi=pmix'
CTEST_ARGS: '-V -E boxmc|LUT'
# INTEL
build:mim:icc:single:
extends: .build:mim:default
variables:
MODULES: "petsc/single-icc-19 localflock"
SRUN_OPTIONS: "--time 02:00:00 --mem 8G -n 9"
PETSC_OPTIONS: "-vecscatter_type mpi1"
build:mim:icc:debug:
extends: .build:mim:default
variables:
MODULES: "petsc/single-icc-19 localflock"
SRUN_OPTIONS: "--time 02:00:00 --mem 8G -n 9"
PETSC_OPTIONS: "-vecscatter_type mpi1"
BUILD_TYPE: DEBUG
# GCC
build:mim:gcc:single:
extends: .build:mim:default
variables:
MODULES: "petsc/single-gcc-9 localflock"
build:mim:gcc:debug:
extends: .build:mim:default
variables:
MODULES: "petsc/debug-gcc-9 localflock"
BUILD_TYPE: DEBUG