Skip to content

Commit 16e6af0

Browse files
committed
update to dev/emc
2 parents 237a510 + caa2323 commit 16e6af0

105 files changed

Lines changed: 10785 additions & 2636 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitlab-ci.yml

Lines changed: 64 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -1,265 +1,214 @@
11
stages:
2-
- merge+setup
32
- builds
43
- run
54
- tests
65
- cleanup
76

7+
variables:
8+
CACHE_DIR: "/lustre/f2/scratch/oar.gfdl.ogrp-account/runner/cache/"
9+
10+
811
# Merges MOM6 with dev/gfdl. Changes directory to test directory, if it exists.
12+
# - set cache location
13+
# - get MOM6-examples/tools/MRS scripts by cloning Gaea-stats and then MOM6-examples
14+
# - set working directory to MOM6-examples
15+
# - pull down latest of dev/gfdl (MOM6-examples might be ahead of Gaea-stats)
916
before_script:
10-
- MOM6_SRC=$CI_PROJECT_DIR
11-
- echo Cache directory set to ${CACHE_DIR:=/lustre/f2/scratch/oar.gfdl.ogrp-account/runner/cache/}
12-
- git pull --no-edit https://github.com/NOAA-GFDL/MOM6.git dev/gfdl && git submodule init && git submodule update
13-
- pwd ; ls
17+
- echo Cache directory set to $CACHE_DIR
18+
- echo -e "\e[0Ksection_start:`date +%s`:before[collapsed=true]\r\e[0KPre-script"
19+
- git clone https://gitlab.gfdl.noaa.gov/ogrp/Gaea-stats-MOM6-examples.git tests
20+
- cd tests && git submodule init && git submodule update
21+
- cd MOM6-examples && git checkout dev/gfdl && git pull
22+
- echo -e "\e[0Ksection_end:`date +%s`:before\r\e[0K"
1423

1524
# Tests that merge with dev/gfdl works.
1625
merge:
17-
stage: merge+setup
26+
stage: builds
1827
tags:
1928
- ncrc4
2029
script:
21-
- pwd ; ls
30+
- cd $CI_PROJECT_DIR
2231
- git pull --no-edit https://github.com/NOAA-GFDL/MOM6.git dev/gfdl
2332

24-
# Clones regression repo, if necessary, pulls latest of everything, and sets up working space
25-
setup:
26-
stage: merge+setup
27-
tags:
28-
- ncrc4
29-
script:
30-
- pwd ; ls
31-
# Clone regressions directory
32-
- git clone --recursive http://gitlab.gfdl.noaa.gov/ogrp/Gaea-stats-MOM6-examples.git tests && cd tests
33-
# Install / update testing scripts
34-
- git clone -b new-code-struct https://github.com/adcroft/MRS.git MRS
35-
# Update MOM6-examples and submodules
36-
- (cd MOM6-examples && git checkout . && git checkout dev/gfdl && git pull && git submodule init && git submodule update)
37-
- (cd MOM6-examples/src/MOM6 && git submodule update)
38-
- test -d MOM6-examples/src/LM3 || make -f MRS/Makefile.clone clone_gfdl -s
39-
- make -f MRS/Makefile.clone MOM6-examples/.datasets -s
40-
- env > gitlab_session.log
41-
# Cache everything under tests to unpack for each subsequent stage
42-
- cd ../ ; time tar zcf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz tests
43-
4433
# Compiles
4534
gnu:repro:
4635
stage: builds
4736
tags:
4837
- ncrc4
4938
script:
50-
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
51-
- time make -f MRS/Makefile.build MOM6_SRC=../ build_gnu -s -j
52-
- time make -f MRS/Makefile.build MOM6_SRC=../ static_gnu -s -j
53-
- time tar zvcf $CACHE_DIR/build-gnu-repro-$CI_PIPELINE_ID.tgz `find build/gnu -name MOM6`
39+
- time make -f tools/MRS/Makefile MOM6_SRC=../.. pipeline-build-repro-gnu -s -j
40+
- time make -f tools/MRS/Makefile MOM6_SRC=../.. pipeline-build-static-gnu -s -j
5441

5542
gnu:ocean-only-nolibs:
5643
stage: builds
5744
tags:
5845
- ncrc4
5946
script:
60-
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
61-
- make -f MRS/Makefile.build build/gnu/env && cd build/gnu
62-
# mkdir -p build/gnu/repro/symmetric_dynamic/ocean_only && cd build/gnu/repro/symmetric_dynamic/ocean_only
63-
- ../../MOM6-examples/src/mkmf/bin/list_paths -l ../../../config_src/{drivers/solo_driver,memory/dynamic_symmetric,infra/FMS1,ext*} ../../../src ../../MOM6-examples/src/FMS
64-
- sed -i '/FMS\/.*\/test_/d' path_names
65-
- ../../MOM6-examples/src/mkmf/bin/mkmf -t ../../MOM6-examples/src/mkmf/templates/ncrc-gnu.mk -p MOM6 -c"-Duse_libMPI -Duse_netCDF" path_names
66-
- time (source ./env ; make NETCDF=3 REPRO=1 MOM6 -s -j)
47+
- make -f tools/MRS/Makefile pipeline-build-gnu-oceanonly-nolibs
6748

6849
gnu:ice-ocean-nolibs:
6950
stage: builds
7051
tags:
7152
- ncrc4
7253
script:
73-
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
74-
- make -f MRS/Makefile.build build/gnu/env && cd build/gnu
75-
# mkdir -p build/gnu/repro/symmetric_dynamic/ocean_only && cd build/gnu/repro/symmetric_dynamic/ocean_only
76-
- ../../MOM6-examples/src/mkmf/bin/list_paths -l ../../../config_src/{drivers/FMS_cap,memory/dynamic_nonsymmetric,infra/FMS1,ext*} ../../../src ../../MOM6-examples/src/{FMS,coupler,SIS2,icebergs,ice_param,land_null,atmos_null}
77-
- sed -i '/FMS\/.*\/test_/d' path_names
78-
- ../../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
79-
- time (source ./env ; make NETCDF=3 REPRO=1 MOM6 -s -j)
54+
- make -f tools/MRS/Makefile pipeline-build-gnu-iceocean-nolibs
8055

8156
intel:repro:
8257
stage: builds
8358
tags:
8459
- ncrc4
8560
script:
86-
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
87-
- make -f MRS/Makefile.build MOM6_SRC=../ build_intel -s -j
88-
- time tar zvcf $CACHE_DIR/build-intel-repro-$CI_PIPELINE_ID.tgz `find build/intel -name MOM6`
61+
- time make -f tools/MRS/Makefile MOM6_SRC=../.. pipeline-build-repro-intel -s -j
8962

9063
pgi:repro:
9164
stage: builds
9265
tags:
9366
- ncrc4
9467
script:
95-
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
96-
- make -f MRS/Makefile.build MOM6_SRC=../ build_pgi -s -j
97-
- time tar zvcf $CACHE_DIR/build-pgi-repro-$CI_PIPELINE_ID.tgz `find build/pgi -name MOM6`
68+
- time make -f tools/MRS/Makefile MOM6_SRC=../.. pipeline-build-repro-pgi -s -j
9869

9970
gnu:debug:
10071
stage: builds
10172
tags:
10273
- ncrc4
10374
script:
104-
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
105-
- make -f MRS/Makefile.build MOM6_SRC=../ debug_gnu -s -j
106-
- time tar zvcf $CACHE_DIR/build-gnu-debug-$CI_PIPELINE_ID.tgz `find build/gnu -name MOM6`
75+
- time make -f tools/MRS/Makefile MOM6_SRC=../.. pipeline-build-debug-gnu -s -j
10776

10877
# Runs
10978
run:
11079
stage: run
11180
tags:
11281
- ncrc4
11382
script:
114-
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
115-
- time tar zxf $CACHE_DIR/build-gnu-repro-$CI_PIPELINE_ID.tgz
116-
- time tar zxf $CACHE_DIR/build-intel-repro-$CI_PIPELINE_ID.tgz
117-
- time tar zxf $CACHE_DIR/build-pgi-repro-$CI_PIPELINE_ID.tgz
118-
# time tar zxf $CACHE_DIR/build-gnu-debug-$CI_PIPELINE_ID.tgz
119-
- (echo '#!/bin/tcsh';echo 'make -f MRS/Makefile.tests all') > job.sh
120-
- 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 || MJOB_RETURN_STATE=Fail
121-
- cat log.$CI_PIPELINE_ID
122-
- test -z "$MJOB_RETURN_STATE"
123-
- test -f restart_results_gnu.tar.gz
124-
- time tar zvcf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz *.tar.gz
83+
- make -f tools/MRS/Makefile mom6-pipeline-run
12584

12685
gnu.testing:
12786
stage: run
12887
tags:
12988
- ncrc4
89+
before_script:
90+
- echo -e "\e[0Ksection_start:`date +%s`:submodules[collapsed=true]\r\e[0KCloning submodules"
91+
- git submodule init ; git submodule update
92+
- echo -e "\e[0Ksection_end:`date +%s`:submodules\r\e[0K"
13093
script:
94+
- echo -e "\e[0Ksection_start:`date +%s`:compile[collapsed=true]\r\e[0KCompiling executables"
13195
- cd .testing
13296
- 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
13397
- make work/local-env
13498
- make -s -j
99+
- echo -e "\e[0Ksection_end:`date +%s`:compile\r\e[0K"
135100
- (echo '#!/bin/bash';echo '. ./work/local-env/bin/activate';echo 'make MPIRUN="srun -mblock --exclusive" test -s -j') > job.sh
136-
- 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 || cat log.$CI_PIPELINE_ID && make test
101+
- 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
137102

138103
intel.testing:
139104
stage: run
140105
tags:
141106
- ncrc4
107+
before_script:
108+
- echo -e "\e[0Ksection_start:`date +%s`:submodules[collapsed=true]\r\e[0KCloning submodules"
109+
- git submodule init ; git submodule update
110+
- echo -e "\e[0Ksection_end:`date +%s`:submodules\r\e[0K"
142111
script:
112+
- echo -e "\e[0Ksection_start:`date +%s`:compile[collapsed=true]\r\e[0KCompiling executables"
143113
- cd .testing
144114
- 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
145115
- make work/local-env
146116
- make -s -j
117+
- echo -e "\e[0Ksection_end:`date +%s`:compile\r\e[0K"
147118
- (echo '#!/bin/bash';echo '. ./work/local-env/bin/activate';echo 'make MPIRUN="srun -mblock --exclusive" test -s -j') > job.sh
148-
- 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 || cat log.$CI_PIPELINE_ID && make test
119+
- 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
149120

150121
# Tests
151122
gnu:non-symmetric:
152123
stage: tests
153124
tags:
154125
- ncrc4
155126
script:
156-
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
157-
- time tar zxf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz
158-
- make -f MRS/Makefile.tests gnu_non_symmetric
127+
- make -f tools/MRS/Makefile mom6-pipeline-test-gnu_non_symmetric
159128

160-
intel:non-symmetric:
129+
gnu:symmetric:
161130
stage: tests
162131
tags:
163132
- ncrc4
164133
script:
165-
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
166-
- time tar zxf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz
167-
- make -f MRS/Makefile.tests intel_non_symmetric
134+
- make -f tools/MRS/Makefile mom6-pipeline-test-gnu_symmetric
168135

169-
pgi:non-symmetric:
136+
gnu:memory:
170137
stage: tests
171138
tags:
172139
- ncrc4
173140
script:
174-
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
175-
- time tar zxf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz
176-
- make -f MRS/Makefile.tests pgi_non_symmetric
141+
- make -f tools/MRS/Makefile mom6-pipeline-test-gnu_memory
177142

178-
gnu:symmetric:
143+
gnu:static:
179144
stage: tests
180145
tags:
181146
- ncrc4
182147
script:
183-
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
184-
- time tar zxf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz
185-
- make -f MRS/Makefile.tests gnu_symmetric
148+
- make -f tools/MRS/Makefile mom6-pipeline-test-gnu_static
186149

187-
intel:symmetric:
150+
gnu:restart:
188151
stage: tests
189152
tags:
190153
- ncrc4
191154
script:
192-
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
193-
- time tar zxf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz
194-
- make -f MRS/Makefile.tests intel_symmetric
155+
- make -f tools/MRS/Makefile mom6-pipeline-test-gnu_restarts
195156

196-
pgi:symmetric:
157+
gnu:params:
197158
stage: tests
198159
tags:
199160
- ncrc4
200161
script:
201-
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
202-
- time tar zxf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz
203-
- make -f MRS/Makefile.tests pgi_symmetric
162+
- make -f tools/MRS/Makefile mom6-pipeline-test-params_gnu_symmetric
163+
allow_failure: true
204164

205-
gnu:layout:
165+
intel:symmetric:
206166
stage: tests
207167
tags:
208168
- ncrc4
209169
script:
210-
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
211-
- time tar zxf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz
212-
- make -f MRS/Makefile.tests gnu_layout
170+
- make -f tools/MRS/Makefile mom6-pipeline-test-intel_symmetric
213171

214-
intel:layout:
172+
intel:non-symmetric:
215173
stage: tests
216174
tags:
217175
- ncrc4
218176
script:
219-
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
220-
- time tar zxf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz
221-
- make -f MRS/Makefile.tests intel_layout
177+
- make -f tools/MRS/Makefile mom6-pipeline-test-intel_non_symmetric
222178

223-
pgi:layout:
179+
intel:memory:
224180
stage: tests
225181
tags:
226182
- ncrc4
227183
script:
228-
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
229-
- time tar zxf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz
230-
- make -f MRS/Makefile.tests pgi_layout
184+
- make -f tools/MRS/Makefile mom6-pipeline-test-intel_memory
231185

232-
gnu:static:
186+
pgi:symmetric:
233187
stage: tests
234188
tags:
235189
- ncrc4
236190
script:
237-
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
238-
- time tar zxf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz
239-
- make -f MRS/Makefile.tests gnu_static
191+
- make -f tools/MRS/Makefile mom6-pipeline-test-pgi_symmetric
240192

241-
gnu:restart:
193+
pgi:non-symmetric:
242194
stage: tests
243195
tags:
244196
- ncrc4
245197
script:
246-
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
247-
- time tar zxf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz
248-
- make -f MRS/Makefile.tests gnu_check_restarts
198+
- make -f tools/MRS/Makefile mom6-pipeline-test-pgi_non_symmetric
249199

250-
gnu:params:
200+
pgi:memory:
251201
stage: tests
252202
tags:
253203
- ncrc4
254204
script:
255-
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
256-
- time tar zxf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz
257-
- make -f MRS/Makefile.tests params_gnu_symmetric
258-
allow_failure: true
205+
- make -f tools/MRS/Makefile mom6-pipeline-test-pgi_memory
259206

260207
cleanup:
261208
stage: cleanup
262209
tags:
263210
- ncrc4
211+
before_script:
212+
- echo Skipping submodule update
264213
script:
265214
- rm $CACHE_DIR/*$CI_PIPELINE_ID.tgz

.testing/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ endif
193193
# Rules
194194

195195
.PHONY: all build.regressions
196-
all: $(foreach b,$(BUILDS),build/$(b)/MOM6)
196+
all: $(foreach b,$(BUILDS),build/$(b)/MOM6) $(VENV_PATH)
197197
build.regressions: $(foreach b,symmetric target,build/$(b)/MOM6)
198198

199199
# Executable
@@ -361,6 +361,7 @@ check_mom6_api_mct: build/mct/mom_ocean_model_mct.o
361361
work/local-env:
362362
python3 -m venv $@
363363
. $@/bin/activate \
364+
&& python3 -m pip install --upgrade pip \
364365
&& pip3 install wheel \
365366
&& pip3 install cython \
366367
&& pip3 install numpy \

0 commit comments

Comments
 (0)