|
1 | 1 | stages: |
2 | | - - merge+setup |
3 | 2 | - builds |
4 | 3 | - run |
5 | 4 | - tests |
6 | 5 | - cleanup |
7 | 6 |
|
| 7 | +variables: |
| 8 | + CACHE_DIR: "/lustre/f2/scratch/oar.gfdl.ogrp-account/runner/cache/" |
| 9 | + |
| 10 | + |
8 | 11 | # 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) |
9 | 16 | 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" |
14 | 23 |
|
15 | 24 | # Tests that merge with dev/gfdl works. |
16 | 25 | merge: |
17 | | - stage: merge+setup |
| 26 | + stage: builds |
18 | 27 | tags: |
19 | 28 | - ncrc4 |
20 | 29 | script: |
21 | | - - pwd ; ls |
| 30 | + - cd $CI_PROJECT_DIR |
22 | 31 | - git pull --no-edit https://github.com/NOAA-GFDL/MOM6.git dev/gfdl |
23 | 32 |
|
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 | | - |
44 | 33 | # Compiles |
45 | 34 | gnu:repro: |
46 | 35 | stage: builds |
47 | 36 | tags: |
48 | 37 | - ncrc4 |
49 | 38 | 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 |
54 | 41 |
|
55 | 42 | gnu:ocean-only-nolibs: |
56 | 43 | stage: builds |
57 | 44 | tags: |
58 | 45 | - ncrc4 |
59 | 46 | 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 |
67 | 48 |
|
68 | 49 | gnu:ice-ocean-nolibs: |
69 | 50 | stage: builds |
70 | 51 | tags: |
71 | 52 | - ncrc4 |
72 | 53 | 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 |
80 | 55 |
|
81 | 56 | intel:repro: |
82 | 57 | stage: builds |
83 | 58 | tags: |
84 | 59 | - ncrc4 |
85 | 60 | 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 |
89 | 62 |
|
90 | 63 | pgi:repro: |
91 | 64 | stage: builds |
92 | 65 | tags: |
93 | 66 | - ncrc4 |
94 | 67 | 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 |
98 | 69 |
|
99 | 70 | gnu:debug: |
100 | 71 | stage: builds |
101 | 72 | tags: |
102 | 73 | - ncrc4 |
103 | 74 | 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 |
107 | 76 |
|
108 | 77 | # Runs |
109 | 78 | run: |
110 | 79 | stage: run |
111 | 80 | tags: |
112 | 81 | - ncrc4 |
113 | 82 | 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 |
125 | 84 |
|
126 | 85 | gnu.testing: |
127 | 86 | stage: run |
128 | 87 | tags: |
129 | 88 | - 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" |
130 | 93 | script: |
| 94 | + - echo -e "\e[0Ksection_start:`date +%s`:compile[collapsed=true]\r\e[0KCompiling executables" |
131 | 95 | - cd .testing |
132 | 96 | - 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 |
133 | 97 | - make work/local-env |
134 | 98 | - make -s -j |
| 99 | + - echo -e "\e[0Ksection_end:`date +%s`:compile\r\e[0K" |
135 | 100 | - (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 |
137 | 102 |
|
138 | 103 | intel.testing: |
139 | 104 | stage: run |
140 | 105 | tags: |
141 | 106 | - 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" |
142 | 111 | script: |
| 112 | + - echo -e "\e[0Ksection_start:`date +%s`:compile[collapsed=true]\r\e[0KCompiling executables" |
143 | 113 | - cd .testing |
144 | 114 | - 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 |
145 | 115 | - make work/local-env |
146 | 116 | - make -s -j |
| 117 | + - echo -e "\e[0Ksection_end:`date +%s`:compile\r\e[0K" |
147 | 118 | - (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 |
149 | 120 |
|
150 | 121 | # Tests |
151 | 122 | gnu:non-symmetric: |
152 | 123 | stage: tests |
153 | 124 | tags: |
154 | 125 | - ncrc4 |
155 | 126 | 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 |
159 | 128 |
|
160 | | -intel:non-symmetric: |
| 129 | +gnu:symmetric: |
161 | 130 | stage: tests |
162 | 131 | tags: |
163 | 132 | - ncrc4 |
164 | 133 | 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 |
168 | 135 |
|
169 | | -pgi:non-symmetric: |
| 136 | +gnu:memory: |
170 | 137 | stage: tests |
171 | 138 | tags: |
172 | 139 | - ncrc4 |
173 | 140 | 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 |
177 | 142 |
|
178 | | -gnu:symmetric: |
| 143 | +gnu:static: |
179 | 144 | stage: tests |
180 | 145 | tags: |
181 | 146 | - ncrc4 |
182 | 147 | 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 |
186 | 149 |
|
187 | | -intel:symmetric: |
| 150 | +gnu:restart: |
188 | 151 | stage: tests |
189 | 152 | tags: |
190 | 153 | - ncrc4 |
191 | 154 | 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 |
195 | 156 |
|
196 | | -pgi:symmetric: |
| 157 | +gnu:params: |
197 | 158 | stage: tests |
198 | 159 | tags: |
199 | 160 | - ncrc4 |
200 | 161 | 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 |
204 | 164 |
|
205 | | -gnu:layout: |
| 165 | +intel:symmetric: |
206 | 166 | stage: tests |
207 | 167 | tags: |
208 | 168 | - ncrc4 |
209 | 169 | 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 |
213 | 171 |
|
214 | | -intel:layout: |
| 172 | +intel:non-symmetric: |
215 | 173 | stage: tests |
216 | 174 | tags: |
217 | 175 | - ncrc4 |
218 | 176 | 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 |
222 | 178 |
|
223 | | -pgi:layout: |
| 179 | +intel:memory: |
224 | 180 | stage: tests |
225 | 181 | tags: |
226 | 182 | - ncrc4 |
227 | 183 | 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 |
231 | 185 |
|
232 | | -gnu:static: |
| 186 | +pgi:symmetric: |
233 | 187 | stage: tests |
234 | 188 | tags: |
235 | 189 | - ncrc4 |
236 | 190 | 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 |
240 | 192 |
|
241 | | -gnu:restart: |
| 193 | +pgi:non-symmetric: |
242 | 194 | stage: tests |
243 | 195 | tags: |
244 | 196 | - ncrc4 |
245 | 197 | 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 |
249 | 199 |
|
250 | | -gnu:params: |
| 200 | +pgi:memory: |
251 | 201 | stage: tests |
252 | 202 | tags: |
253 | 203 | - ncrc4 |
254 | 204 | 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 |
259 | 206 |
|
260 | 207 | cleanup: |
261 | 208 | stage: cleanup |
262 | 209 | tags: |
263 | 210 | - ncrc4 |
| 211 | + before_script: |
| 212 | + - echo Skipping submodule update |
264 | 213 | script: |
265 | 214 | - rm $CACHE_DIR/*$CI_PIPELINE_ID.tgz |
0 commit comments