forked from mom-ocean/MOM6
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
214 lines (188 loc) · 5.65 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
stages:
- builds
- run
- tests
- cleanup
variables:
CACHE_DIR: "/lustre/f2/scratch/oar.gfdl.ogrp-account/runner/cache/"
# Merges MOM6 with dev/gfdl. Changes directory to test directory, if it exists.
# - set cache location
# - get MOM6-examples/tools/MRS scripts by cloning Gaea-stats and then MOM6-examples
# - set working directory to MOM6-examples
# - pull down latest of dev/gfdl (MOM6-examples might be ahead of Gaea-stats)
before_script:
- echo Cache directory set to $CACHE_DIR
- echo -e "\e[0Ksection_start:`date +%s`:before[collapsed=true]\r\e[0KPre-script"
- git clone https://gitlab.gfdl.noaa.gov/ogrp/Gaea-stats-MOM6-examples.git tests
- cd tests && git submodule init && git submodule update
- cd MOM6-examples && git checkout dev/gfdl && git pull
- echo -e "\e[0Ksection_end:`date +%s`:before\r\e[0K"
# Tests that merge with dev/gfdl works.
merge:
stage: builds
tags:
- ncrc4
script:
- cd $CI_PROJECT_DIR
- git pull --no-edit https://github.com/NOAA-GFDL/MOM6.git dev/gfdl
# Compiles
gnu:repro:
stage: builds
tags:
- ncrc4
script:
- time make -f tools/MRS/Makefile MOM6_SRC=../.. pipeline-build-repro-gnu -s -j
- time make -f tools/MRS/Makefile MOM6_SRC=../.. pipeline-build-static-gnu -s -j
gnu:ocean-only-nolibs:
stage: builds
tags:
- ncrc4
script:
- make -f tools/MRS/Makefile pipeline-build-gnu-oceanonly-nolibs
gnu:ice-ocean-nolibs:
stage: builds
tags:
- ncrc4
script:
- make -f tools/MRS/Makefile pipeline-build-gnu-iceocean-nolibs
intel:repro:
stage: builds
tags:
- ncrc4
script:
- time make -f tools/MRS/Makefile MOM6_SRC=../.. pipeline-build-repro-intel -s -j
pgi:repro:
stage: builds
tags:
- ncrc4
script:
- time make -f tools/MRS/Makefile MOM6_SRC=../.. pipeline-build-repro-pgi -s -j
gnu:debug:
stage: builds
tags:
- ncrc4
script:
- time make -f tools/MRS/Makefile MOM6_SRC=../.. pipeline-build-debug-gnu -s -j
# Runs
run:
stage: run
tags:
- ncrc4
script:
- make -f tools/MRS/Makefile mom6-pipeline-run
gnu.testing:
stage: run
tags:
- ncrc4
before_script:
- echo -e "\e[0Ksection_start:`date +%s`:submodules[collapsed=true]\r\e[0KCloning submodules"
- git submodule init ; git submodule update
- echo -e "\e[0Ksection_end:`date +%s`:submodules\r\e[0K"
script:
- echo -e "\e[0Ksection_start:`date +%s`:compile[collapsed=true]\r\e[0KCompiling executables"
- cd .testing
- module unload PrgEnv-pgi PrgEnv-intel PrgEnv-gnu darshan ; module load PrgEnv-gnu ; module unload netcdf gcc ; module load gcc/7.3.0 cray-hdf5 cray-netcdf
- make work/local-env
- make -s -j
- echo -e "\e[0Ksection_end:`date +%s`:compile\r\e[0K"
- (echo '#!/bin/bash';echo '. ./work/local-env/bin/activate';echo 'make MPIRUN="srun -mblock --exclusive" test -s -j') > job.sh
- sbatch --clusters=c3,c4 --nodes=5 --time=0:05:00 --account=gfdl_o --qos=debug --job-name=MOM6.gnu.testing --output=log.$CI_PIPELINE_ID --wait job.sh && make test || cat log.$CI_PIPELINE_ID
intel.testing:
stage: run
tags:
- ncrc4
before_script:
- echo -e "\e[0Ksection_start:`date +%s`:submodules[collapsed=true]\r\e[0KCloning submodules"
- git submodule init ; git submodule update
- echo -e "\e[0Ksection_end:`date +%s`:submodules\r\e[0K"
script:
- echo -e "\e[0Ksection_start:`date +%s`:compile[collapsed=true]\r\e[0KCompiling executables"
- cd .testing
- module unload PrgEnv-pgi PrgEnv-intel PrgEnv-gnu darshan; module load PrgEnv-intel; module unload netcdf intel; module load intel/18.0.6.288 cray-hdf5 cray-netcdf
- make work/local-env
- make -s -j
- echo -e "\e[0Ksection_end:`date +%s`:compile\r\e[0K"
- (echo '#!/bin/bash';echo '. ./work/local-env/bin/activate';echo 'make MPIRUN="srun -mblock --exclusive" test -s -j') > job.sh
- sbatch --clusters=c3,c4 --nodes=5 --time=0:05:00 --account=gfdl_o --qos=debug --job-name=MOM6.gnu.testing --output=log.$CI_PIPELINE_ID --wait job.sh && make test || cat log.$CI_PIPELINE_ID
# Tests
gnu:non-symmetric:
stage: tests
tags:
- ncrc4
script:
- make -f tools/MRS/Makefile mom6-pipeline-test-gnu_non_symmetric
gnu:symmetric:
stage: tests
tags:
- ncrc4
script:
- make -f tools/MRS/Makefile mom6-pipeline-test-gnu_symmetric
gnu:memory:
stage: tests
tags:
- ncrc4
script:
- make -f tools/MRS/Makefile mom6-pipeline-test-gnu_memory
gnu:static:
stage: tests
tags:
- ncrc4
script:
- make -f tools/MRS/Makefile mom6-pipeline-test-gnu_static
gnu:restart:
stage: tests
tags:
- ncrc4
script:
- make -f tools/MRS/Makefile mom6-pipeline-test-gnu_restarts
gnu:params:
stage: tests
tags:
- ncrc4
script:
- make -f tools/MRS/Makefile mom6-pipeline-test-params_gnu_symmetric
allow_failure: true
intel:symmetric:
stage: tests
tags:
- ncrc4
script:
- make -f tools/MRS/Makefile mom6-pipeline-test-intel_symmetric
intel:non-symmetric:
stage: tests
tags:
- ncrc4
script:
- make -f tools/MRS/Makefile mom6-pipeline-test-intel_non_symmetric
intel:memory:
stage: tests
tags:
- ncrc4
script:
- make -f tools/MRS/Makefile mom6-pipeline-test-intel_memory
pgi:symmetric:
stage: tests
tags:
- ncrc4
script:
- make -f tools/MRS/Makefile mom6-pipeline-test-pgi_symmetric
pgi:non-symmetric:
stage: tests
tags:
- ncrc4
script:
- make -f tools/MRS/Makefile mom6-pipeline-test-pgi_non_symmetric
pgi:memory:
stage: tests
tags:
- ncrc4
script:
- make -f tools/MRS/Makefile mom6-pipeline-test-pgi_memory
cleanup:
stage: cleanup
tags:
- ncrc4
before_script:
- echo Skipping submodule update
script:
- rm $CACHE_DIR/*$CI_PIPELINE_ID.tgz