forked from alperaltuntas/MOM6
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
242 lines (219 loc) · 7.95 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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
stages:
- merge+setup
- builds
- run
- tests
- cleanup
# Merges MOM6 with dev/gfdl. Changes directory to test directory, if it exists.
before_script:
- MOM6_SRC=$CI_PROJECT_DIR
- echo Cache directory set to ${CACHE_DIR:=/lustre/f2/scratch/oar.gfdl.ogrp-account/runner/cache/}
- git pull --no-edit https://github.com/NOAA-GFDL/MOM6.git dev/gfdl && git submodule init && git submodule update
- pwd ; ls
# Tests that merge with dev/gfdl works.
merge:
stage: merge+setup
tags:
- ncrc4
script:
- pwd ; ls
- git pull --no-edit https://github.com/NOAA-GFDL/MOM6.git dev/gfdl
# Clones regression repo, if necessary, pulls latest of everything, and sets up working space
setup:
stage: merge+setup
tags:
- ncrc4
script:
- pwd ; ls
# Clone regressions directory
- git clone --recursive http://gitlab.gfdl.noaa.gov/ogrp/Gaea-stats-MOM6-examples.git tests && cd tests
# Install / update testing scripts
- git clone https://github.com/adcroft/MRS.git MRS
- (cd MRS ; git checkout xanadu-fms)
# Update MOM6-examples and submodules
- (cd MOM6-examples && git checkout . && git checkout dev/gfdl && git pull && git submodule init && git submodule update)
- (cd MOM6-examples/src/MOM6 && git submodule update)
- test -d MOM6-examples/src/LM3 || make -f MRS/Makefile.clone clone_gfdl -s
- make -f MRS/Makefile.clone MOM6-examples/.datasets -s
#- (cd MOM6-examples/src/mkmf && git pull https://github.com/adcroft/mkmf.git add_coverage_mode)
- env > gitlab_session.log
# Cache everything under tests to unpack for each subsequent stage
- cd ../ ; time tar zcf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz tests
# Compiles
gnu:repro:
stage: builds
tags:
- ncrc4
script:
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
- time make -f MRS/Makefile.build MOM6_SRC=../ build_gnu -s -j
- time make -f MRS/Makefile.build MOM6_SRC=../ static_gnu -s -j
- time tar zvcf $CACHE_DIR/build-gnu-repro-$CI_PIPELINE_ID.tgz `find build/gnu -name MOM6`
gnu:ocean-only-nolibs:
stage: builds
tags:
- ncrc4
script:
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
- make -f MRS/Makefile.build build/gnu/env && cd build/gnu
# mkdir -p build/gnu/repro/symmetric_dynamic/ocean_only && cd build/gnu/repro/symmetric_dynamic/ocean_only
- ../../MOM6-examples/src/mkmf/bin/list_paths -l ../../../config_src/{solo_driver,dynamic_symmetric} ../../../src ../../MOM6-examples/src/FMS
- sed -i '/FMS\/.*\/test_/d' path_names
- ../../MOM6-examples/src/mkmf/bin/mkmf -t ../../MOM6-examples/src/mkmf/templates/ncrc-gnu.mk -p MOM6 -c"-Duse_libMPI -Duse_netCDF" path_names
- time (source ./env ; make NETCDF=3 REPRO=1 MOM6 -s -j)
gnu:ice-ocean-nolibs:
stage: builds
tags:
- ncrc4
script:
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
- make -f MRS/Makefile.build build/gnu/env && cd build/gnu
# mkdir -p build/gnu/repro/symmetric_dynamic/ocean_only && cd build/gnu/repro/symmetric_dynamic/ocean_only
- ../../MOM6-examples/src/mkmf/bin/list_paths -l ../../../config_src/{coupled_driver,dynamic} ../../../src ../../MOM6-examples/src/{FMS,coupler,SIS2,icebergs,ice_param,land_null,atmos_null}
- sed -i '/FMS\/.*\/test_/d' path_names
- ../../MOM6-examples/src/mkmf/bin/mkmf -t ../../MOM6-examples/src/mkmf/templates/ncrc-gnu.mk -p MOM6 -c"-Duse_libMPI -Duse_netCDF -D_USE_LEGACY_LAND_ -Duse_AM3_physics" path_names
- time (source ./env ; make NETCDF=3 REPRO=1 MOM6 -s -j)
intel:repro:
stage: builds
tags:
- ncrc4
script:
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
- make -f MRS/Makefile.build MOM6_SRC=../ build_intel -s -j
- time tar zvcf $CACHE_DIR/build-intel-repro-$CI_PIPELINE_ID.tgz `find build/intel -name MOM6`
pgi:repro:
stage: builds
tags:
- ncrc4
script:
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
- make -f MRS/Makefile.build MOM6_SRC=../ build_pgi -s -j
- time tar zvcf $CACHE_DIR/build-pgi-repro-$CI_PIPELINE_ID.tgz `find build/pgi -name MOM6`
gnu:debug:
stage: builds
tags:
- ncrc4
script:
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
- make -f MRS/Makefile.build MOM6_SRC=../ debug_gnu -s -j
- time tar zvcf $CACHE_DIR/build-gnu-debug-$CI_PIPELINE_ID.tgz `find build/gnu -name MOM6`
# Runs
run:
stage: run
tags:
- ncrc4
script:
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
- time tar zxf $CACHE_DIR/build-gnu-repro-$CI_PIPELINE_ID.tgz
- time tar zxf $CACHE_DIR/build-intel-repro-$CI_PIPELINE_ID.tgz
- time tar zxf $CACHE_DIR/build-pgi-repro-$CI_PIPELINE_ID.tgz
# time tar zxf $CACHE_DIR/build-gnu-debug-$CI_PIPELINE_ID.tgz
- (echo '#!/bin/tcsh';echo 'make -f MRS/Makefile.tests all -B') > job.sh
- sbatch --clusters=c3,c4 --nodes=29 --time=0:34:00 --account=gfdl_o --qos=debug --job-name=mom6_regressions --output=log.$CI_PIPELINE_ID --wait job.sh
- cat log.$CI_PIPELINE_ID
- test -f restart_results_gnu.tar.gz
- time tar zvcf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz *.tar.gz
# Tests
gnu:non-symmetric:
stage: tests
tags:
- ncrc4
script:
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
- time tar zxf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz
- make -f MRS/Makefile.tests gnu_non_symmetric
intel:non-symmetric:
stage: tests
tags:
- ncrc4
script:
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
- time tar zxf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz
- make -f MRS/Makefile.tests intel_non_symmetric
pgi:non-symmetric:
stage: tests
tags:
- ncrc4
script:
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
- time tar zxf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz
- make -f MRS/Makefile.tests pgi_non_symmetric
gnu:symmetric:
stage: tests
tags:
- ncrc4
script:
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
- time tar zxf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz
- make -f MRS/Makefile.tests gnu_symmetric
intel:symmetric:
stage: tests
tags:
- ncrc4
script:
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
- time tar zxf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz
- make -f MRS/Makefile.tests intel_symmetric
pgi:symmetric:
stage: tests
tags:
- ncrc4
script:
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
- time tar zxf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz
- make -f MRS/Makefile.tests pgi_symmetric
gnu:layout:
stage: tests
tags:
- ncrc4
script:
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
- time tar zxf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz
- make -f MRS/Makefile.tests gnu_layout
intel:layout:
stage: tests
tags:
- ncrc4
script:
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
- time tar zxf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz
- make -f MRS/Makefile.tests intel_layout
pgi:layout:
stage: tests
tags:
- ncrc4
script:
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
- time tar zxf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz
- make -f MRS/Makefile.tests pgi_layout
gnu:static:
stage: tests
tags:
- ncrc4
script:
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
- time tar zxf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz
- make -f MRS/Makefile.tests gnu_static
gnu:restart:
stage: tests
tags:
- ncrc4
script:
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
- time tar zxf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz
- make -f MRS/Makefile.tests gnu_check_restarts
gnu:params:
stage: tests
tags:
- ncrc4
script:
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
- time tar zxf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz
- make -f MRS/Makefile.tests params_gnu_symmetric
allow_failure: true
cleanup:
stage: cleanup
tags:
- ncrc4
script:
- rm $CACHE_DIR/*$CI_PIPELINE_ID.tgz