|
1 | 1 | stages: |
2 | | - - merge |
3 | | - - setup |
| 2 | + - merge+setup |
4 | 3 | - builds |
5 | 4 | - run |
6 | 5 | - tests |
| 6 | + - cleanup |
7 | 7 |
|
8 | | -# Moves to re-used workspace |
| 8 | +# Merges MOM6 with dev/gfdl. Changes directory to test directory, if it exists. |
9 | 9 | before_script: |
10 | 10 | - MOM6_SRC=$CI_PROJECT_DIR |
11 | | - - WORKSPACE=`pwd | sed 's:/[0-9]/:/:'` |
12 | | - - git pull --no-edit https://github.com/NOAA-GFDL/MOM6.git dev/gfdl |
13 | | - - test -d $WORKSPACE/tests && cd $WORKSPACE/tests |
| 11 | + - CACHE_DIR=/lustre/f1/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 |
14 | 14 |
|
15 | | -# Merge |
| 15 | +# Tests that merge with dev/gfdl works. |
16 | 16 | merge: |
17 | | - stage: merge |
| 17 | + stage: merge+setup |
18 | 18 | tags: |
19 | 19 | - ncrc3 |
20 | 20 | script: |
21 | | - - cd $CI_PROJECT_DIR |
| 21 | + - pwd ; ls |
22 | 22 | - git pull --no-edit https://github.com/NOAA-GFDL/MOM6.git dev/gfdl |
23 | 23 |
|
24 | 24 | # Clones regression repo, if necessary, pulls latest of everything, and sets up working space |
25 | 25 | setup: |
26 | | - stage: setup |
| 26 | + stage: merge+setup |
27 | 27 | tags: |
28 | 28 | - ncrc3 |
29 | 29 | script: |
30 | | - - mkdir -p $WORKSPACE && cd $WORKSPACE |
31 | | - - ln -sf $MOM6_SRC/{config_src,src,pkg} . |
32 | | - - test -d tests || (git clone --recursive http://gitlab.gfdl.noaa.gov/ogrp/Gaea_c3-stats-MOM6-examples.git tests) |
33 | | - - cd tests |
34 | | - - git checkout . && git checkout dev/gfdl |
35 | | - - git pull |
36 | | - - git status |
37 | | - - bash Gitlab/before_script.sh |
38 | | - - (cd MOM6-examples/src/mkmf && git pull https://github.com/adcroft/mkmf.git add_coverage_mode) |
| 30 | + - pwd ; ls |
| 31 | + # Clone regressions directory |
| 32 | + - git clone --recursive http://gitlab.gfdl.noaa.gov/ogrp/Gaea_c3-stats-MOM6-examples.git tests && cd tests |
| 33 | + # Install / update testing scripts |
| 34 | + - git clone 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 | + - test -d MOM6-examples/src/LM3 || make -f MRS/Makefile.clone clone_gfdl -s |
| 38 | + - make -f MRS/Makefile.clone MOM6-examples/.datasets -s |
| 39 | + #- (cd MOM6-examples/src/mkmf && git pull https://github.com/adcroft/mkmf.git add_coverage_mode) |
| 40 | + - env > gitlab_session.log |
| 41 | + - cd ../ ; time tar zcf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz tests |
39 | 42 |
|
40 | 43 | # Compiles |
41 | 44 | gnu:repro: |
42 | 45 | stage: builds |
43 | 46 | tags: |
44 | 47 | - ncrc3 |
45 | 48 | script: |
46 | | - - make -f Gitlab/Makefile.build MOM6_SRC=../ build_gnu -s -j |
47 | | - - make -f Gitlab/Makefile.build MOM6_SRC=../ static_gnu -s -j #coverage_gnu |
| 49 | + - time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests |
| 50 | + - time make -f MRS/Makefile.build MOM6_SRC=../ build_gnu -s -j |
| 51 | + - time make -f MRS/Makefile.build MOM6_SRC=../ static_gnu -s -j |
| 52 | + - time tar zvcf $CACHE_DIR/build-gnu-repro-$CI_PIPELINE_ID.tgz `find build/gnu -name MOM6` |
48 | 53 |
|
49 | 54 | intel:repro: |
50 | 55 | stage: builds |
51 | 56 | tags: |
52 | 57 | - ncrc3 |
53 | 58 | script: |
54 | | - - make -f Gitlab/Makefile.build MOM6_SRC=../ build_intel -s -j |
| 59 | + - time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests |
| 60 | + - make -f MRS/Makefile.build MOM6_SRC=../ build_intel -s -j |
| 61 | + - time tar zvcf $CACHE_DIR/build-intel-repro-$CI_PIPELINE_ID.tgz `find build/intel -name MOM6` |
55 | 62 |
|
56 | 63 | pgi:repro: |
57 | 64 | stage: builds |
58 | 65 | tags: |
59 | 66 | - ncrc3 |
60 | 67 | script: |
61 | | - - make -f Gitlab/Makefile.build MOM6_SRC=../ build_pgi -s -j |
| 68 | + - time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests |
| 69 | + - make -f MRS/Makefile.build MOM6_SRC=../ build_pgi -s -j |
| 70 | + - time tar zvcf $CACHE_DIR/build-pgi-repro-$CI_PIPELINE_ID.tgz `find build/pgi -name MOM6` |
62 | 71 |
|
63 | 72 | gnu:debug: |
64 | 73 | stage: builds |
65 | 74 | tags: |
66 | 75 | - ncrc3 |
67 | 76 | script: |
68 | | - - make -f Gitlab/Makefile.build MOM6_SRC=../ debug_gnu -s -j |
| 77 | + - time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests |
| 78 | + - make -f MRS/Makefile.build MOM6_SRC=../ debug_gnu -s -j |
| 79 | + - time tar zvcf $CACHE_DIR/build-gnu-debug-$CI_PIPELINE_ID.tgz `find build/gnu -name MOM6` |
69 | 80 |
|
70 | 81 | # Runs |
71 | 82 | run: |
72 | 83 | stage: run |
73 | 84 | tags: |
74 | 85 | - ncrc3 |
75 | 86 | script: |
76 | | - - rm -f MOM6-examples/*.tar |
77 | | - - bash Gitlab/run_stage.sh |
| 87 | + - time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests |
| 88 | + - time tar zxf $CACHE_DIR/build-gnu-repro-$CI_PIPELINE_ID.tgz |
| 89 | + - time tar zxf $CACHE_DIR/build-intel-repro-$CI_PIPELINE_ID.tgz |
| 90 | + - time tar zxf $CACHE_DIR/build-pgi-repro-$CI_PIPELINE_ID.tgz |
| 91 | + # time tar zxf $CACHE_DIR/build-gnu-debug-$CI_PIPELINE_ID.tgz |
| 92 | + - echo "make -f MRS/Makefile.tests all -B" > job.sh |
| 93 | + - msub -l partition=c3,nodes=29,walltime=00:24:00,qos=norm -q debug -S /bin/tcsh -j oe -A gfdl_o -z -o log.$CI_PIPELINE_ID -N mom6_regression -K job.sh |
| 94 | + - cat log.$CI_PIPELINE_ID |
| 95 | + - time tar zvcf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz *.tar.gz |
78 | 96 |
|
79 | 97 | # Tests |
80 | | -gnu:regressions: |
| 98 | +gnu:non-symmetric: |
81 | 99 | stage: tests |
82 | 100 | tags: |
83 | 101 | - ncrc3 |
84 | 102 | script: |
85 | | - - cd regressions && git checkout . |
86 | | - - md5sum `find . -name ocean.stats.gnu` > all_gnu.md5 && find . -name ocean.stats.gnu -exec rm {} \; |
87 | | - - echo "Regression results for non-symmetric gnu executables" |
88 | | - - tar xf ../MOM6-examples/non_symmetric_gnu.tar && md5sum -c all_gnu.md5 && rm all_gnu.md5 |
| 103 | + - time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests |
| 104 | + - time tar zxf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz |
| 105 | + - make -f MRS/Makefile.tests gnu_non_symmetric |
89 | 106 |
|
90 | | -intel:regressions: |
| 107 | +intel:non-symmetric: |
91 | 108 | stage: tests |
92 | 109 | tags: |
93 | 110 | - ncrc3 |
94 | 111 | script: |
95 | | - - cd regressions && git checkout . |
96 | | - - md5sum `find . -name ocean.stats.intel` > all_intel.md5 && find . -name ocean.stats.intel -exec rm {} \; |
97 | | - - echo "Regression results for non-symmetric intel executables" |
98 | | - - tar xf ../MOM6-examples/non_symmetric_intel.tar && md5sum -c all_intel.md5 && rm all_intel.md5 |
| 112 | + - time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests |
| 113 | + - time tar zxf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz |
| 114 | + - make -f MRS/Makefile.tests intel_non_symmetric |
99 | 115 |
|
100 | | -pgi:regressions: |
| 116 | +pgi:non-symmetric: |
101 | 117 | stage: tests |
102 | 118 | tags: |
103 | 119 | - ncrc3 |
104 | 120 | script: |
105 | | - - cd regressions && git checkout . |
106 | | - - md5sum `find . -name ocean.stats.pgi` > all_pgi.md5 && find . -name ocean.stats.pgi -exec rm {} \; |
107 | | - - echo "Regression results for non-symmetric pgi executables" |
108 | | - - tar xf ../MOM6-examples/non_symmetric_pgi.tar && md5sum -c all_pgi.md5 && rm all_pgi.md5 |
| 121 | + - time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests |
| 122 | + - time tar zxf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz |
| 123 | + - make -f MRS/Makefile.tests pgi_non_symmetric |
109 | 124 |
|
110 | 125 | gnu:symmetric: |
111 | 126 | stage: tests |
112 | 127 | tags: |
113 | 128 | - ncrc3 |
114 | 129 | script: |
115 | | - - mkdir -p _gnu && cd _gnu |
116 | | - - tar xf ../MOM6-examples/non_symmetric_gnu.tar && md5sum `find . -name ocean.stats.gnu` > all_gnu.md5 && find . -name ocean.stats.gnu -exec rm {} \; |
117 | | - - echo "Regression results for symmetric executables" |
118 | | - - tar xf ../MOM6-examples/symmetric_gnu.tar && md5sum -c all_gnu.md5 && rm all_gnu.md5 |
| 130 | + - time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests |
| 131 | + - time tar zxf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz |
| 132 | + - make -f MRS/Makefile.tests gnu_symmetric |
119 | 133 |
|
120 | 134 | intel:symmetric: |
121 | 135 | stage: tests |
122 | 136 | tags: |
123 | 137 | - ncrc3 |
124 | 138 | script: |
125 | | - - mkdir -p _intel && cd _intel |
126 | | - - tar xf ../MOM6-examples/non_symmetric_intel.tar && md5sum `find . -name ocean.stats.intel` > all_intel.md5 && find . -name ocean.stats.intel -exec rm {} \; |
127 | | - - echo "Regression results for symmetric executables" |
128 | | - - tar xf ../MOM6-examples/symmetric_intel.tar && md5sum -c all_intel.md5 && rm all_intel.md5 |
| 139 | + - time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests |
| 140 | + - time tar zxf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz |
| 141 | + - make -f MRS/Makefile.tests intel_symmetric |
129 | 142 |
|
130 | 143 | pgi:symmetric: |
131 | 144 | stage: tests |
132 | 145 | tags: |
133 | 146 | - ncrc3 |
134 | 147 | script: |
135 | | - - mkdir -p _pgi && cd _pgi |
136 | | - - tar xf ../MOM6-examples/non_symmetric_pgi.tar && md5sum `find . -name ocean.stats.pgi` > all_pgi.md5 && find . -name ocean.stats.pgi -exec rm {} \; |
137 | | - - echo "Regression results for symmetric executables" |
138 | | - - tar xf ../MOM6-examples/symmetric_pgi.tar && md5sum -c all_pgi.md5 && rm all_pgi.md5 |
| 148 | + - time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests |
| 149 | + - time tar zxf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz |
| 150 | + - make -f MRS/Makefile.tests pgi_symmetric |
| 151 | + |
| 152 | +gnu:layout: |
| 153 | + stage: tests |
| 154 | + tags: |
| 155 | + - ncrc3 |
| 156 | + script: |
| 157 | + - time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests |
| 158 | + - time tar zxf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz |
| 159 | + - make -f MRS/Makefile.tests gnu_layout |
| 160 | + |
| 161 | +intel:layout: |
| 162 | + stage: tests |
| 163 | + tags: |
| 164 | + - ncrc3 |
| 165 | + script: |
| 166 | + - time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests |
| 167 | + - time tar zxf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz |
| 168 | + - make -f MRS/Makefile.tests intel_layout |
| 169 | + |
| 170 | +pgi:layout: |
| 171 | + stage: tests |
| 172 | + tags: |
| 173 | + - ncrc3 |
| 174 | + script: |
| 175 | + - time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests |
| 176 | + - time tar zxf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz |
| 177 | + - make -f MRS/Makefile.tests pgi_layout |
| 178 | + |
| 179 | +gnu:static: |
| 180 | + stage: tests |
| 181 | + tags: |
| 182 | + - ncrc3 |
| 183 | + script: |
| 184 | + - time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests |
| 185 | + - time tar zxf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz |
| 186 | + - make -f MRS/Makefile.tests gnu_static |
| 187 | + |
| 188 | +gnu:restart: |
| 189 | + stage: tests |
| 190 | + tags: |
| 191 | + - ncrc3 |
| 192 | + script: |
| 193 | + - time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests |
| 194 | + - time tar zxf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz |
| 195 | + - make -f MRS/Makefile.tests gnu_check_restarts |
| 196 | + |
| 197 | +cleanup: |
| 198 | + stage: cleanup |
| 199 | + tags: |
| 200 | + - ncrc3 |
| 201 | + script: |
| 202 | + - rm $CACHE_DIR/*_$CI_PIPELINE_ID.tgz |
0 commit comments