1 | #!/bin/bash |
---|
2 | ############################################################ |
---|
3 | # Author : Simona Flavoni for NEMO |
---|
4 | # Contact: sflod@locean-ipsl.upmc.fr |
---|
5 | # |
---|
6 | # sette_test-cases.sh : principal script of SET TEsts for NEMO (SETTE) |
---|
7 | # : this script : compiles, run and tests TEST_CASES |
---|
8 | # |
---|
9 | # : TO DO: test if nitend is equal to end of run.stat |
---|
10 | # ---------------------------------------------------------------------- |
---|
11 | # NEMO/SETTE , NEMO Consortium (2018) |
---|
12 | # Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
13 | # ---------------------------------------------------------------------- |
---|
14 | # |
---|
15 | ############################################################# |
---|
16 | #set -vx |
---|
17 | set -o posix |
---|
18 | #set -u |
---|
19 | #set -e |
---|
20 | # =========== |
---|
21 | # DESCRIPTION |
---|
22 | # =========== |
---|
23 | # |
---|
24 | # Variables to be checked by user: |
---|
25 | # |
---|
26 | # COMPILER : name of compiler as defined in NEMOGCM/ARCH directory |
---|
27 | # BATCH_COMMAND_PAR : name of the command for submitting parallel batch jobs |
---|
28 | # BATCH_COMMAND_SEQ : name of the command for submitting sequential batch jobs |
---|
29 | # INTERACT_FLAG : flag to run in interactive mode "yes" |
---|
30 | # to run in batch mode "no" |
---|
31 | # MPIRUN_FLAG : flag to run in parallel (MPI) "yes" |
---|
32 | # to run in sequential mode (NB_PROC = 1) "no" |
---|
33 | # USING_XIOS : flag to control the activation of key_xios |
---|
34 | # "yes" to compile using key_xios and link to the external XIOS library |
---|
35 | # "no" to compile without key_xios and link to the old IOIPSL library |
---|
36 | # USING_MPMD : flag to control the use of stand-alone IO servers |
---|
37 | # requires USING_XIOS="yes" |
---|
38 | # "yes" to run in MPMD (detached) mode with stand-alone IO servers |
---|
39 | # "no" to run in SPMD (attached) mode without separate IO servers |
---|
40 | # NUM_XIOSERVERS : number of stand-alone IO servers to employ |
---|
41 | # set to zero if USING_MPMD="no" |
---|
42 | # USING_MPI3 : flag to control the activation of key_mpi3 |
---|
43 | # "yes" to use the MPI3 neighbourhood collectives for halo exchange |
---|
44 | # "no" to use standard point-to-point communications for halo exchange |
---|
45 | # USING_LOOP_FUSION : flag to control the activation of key_loop_fusion |
---|
46 | # "yes" to use the loop fusion adv routines when halo = 2 |
---|
47 | # "no" to use standard adv routines |
---|
48 | # |
---|
49 | # Principal script is sette_test-cases.sh, that calls |
---|
50 | # |
---|
51 | # makenemo : to create successive exectuables in ${CONFIG_NAME}/BLD/bin/nemo.exe |
---|
52 | # and links to nemo in ${CONFIG_NAME}/EXP00) |
---|
53 | # |
---|
54 | # param.cfg : sets and loads following directories: |
---|
55 | # This will have been run by the parent sette.sh and values exported here |
---|
56 | # |
---|
57 | # FORCING_DIR : is the directory for forcing files (tarfile) |
---|
58 | # INPUT_DIR : is the directory for input files storing |
---|
59 | # TMPDIR : is the temporary directory (if needed) |
---|
60 | # NEMO_VALIDATION_DIR : is the validation directory |
---|
61 | # |
---|
62 | # (NOTE: this file is the same for all configrations to be tested with sette_test-cases.sh) |
---|
63 | # |
---|
64 | # all_functions.sh : loads functions used by sette (note: new functions can be added here) |
---|
65 | # set_namelist : function declared in all_functions that sets namelist parameters |
---|
66 | # post_test_tidyup : creates validation storage directory and copies required output files |
---|
67 | # (run.stat and ocean.output) in it after execution of test. |
---|
68 | # |
---|
69 | # VALIDATION tree is: |
---|
70 | # |
---|
71 | # NEMO_VALIDATION_DIR/WCONFIG_NAME/WCOMPILER_NAME/TEST_NAME/REVISION_NUMBER(or DATE) |
---|
72 | # |
---|
73 | # prepare_exe_dir.sh : defines and creates directory where the test is executed |
---|
74 | # execution directory takes name of TEST_NAME defined for every test |
---|
75 | # in sette_test-cases.sh. (each test in executed in its own directory) |
---|
76 | # |
---|
77 | # set_valid_dir : rename ocean.output/run.stat and tracer.stat to avoid checking them in the report |
---|
78 | # |
---|
79 | # clean_valid_dir : rename ocean.output/run.stat and tracer.stat to avoid checking them in the report |
---|
80 | # ( not doing it could lead to false positive ) |
---|
81 | # |
---|
82 | # prepare_job.sh : to generate the script run_job.sh |
---|
83 | # |
---|
84 | # fcm_job.sh : run in batch (INTERACT_FLAG="no") or interactive (INTERACT_FLAG="yes") |
---|
85 | # see sette_test-cases.sh and BATCH_TEMPLATE directory |
---|
86 | # |
---|
87 | # NOTE: jobs requiring initial or forcing data need to have an input_CONFIG.cfg in which |
---|
88 | # can be found paths to the input tar file) |
---|
89 | # NOTE: if job is not launched for any reason you have the executable ready in ${EXE_DIR} |
---|
90 | # directory |
---|
91 | # NOTE: the changed namelists are left in ${EXE_DIR} directory whereas original namelists |
---|
92 | # remain in ${NEW_CONF}/EXP00 |
---|
93 | # |
---|
94 | # NOTE: a log file, output.sette, is created in ${SETTE_DIR} with the echoes of |
---|
95 | # executed commands |
---|
96 | # |
---|
97 | # NOTE: if sette_test-cases.sh is stopped in output.sette there is written the last command |
---|
98 | # executed by sette_test-cases.sh |
---|
99 | # |
---|
100 | # example use: ./sette_test-cases.sh |
---|
101 | ######################################################################################### |
---|
102 | # |
---|
103 | # LOAD param value |
---|
104 | SETTE_DIR=$(cd $(dirname "$0"); pwd) |
---|
105 | MAIN_DIR=$(dirname $SETTE_DIR) |
---|
106 | |
---|
107 | export BATCH_COMMAND_PAR=${BATCH_CMD} |
---|
108 | export BATCH_COMMAND_SEQ=${BATCH_CMD} |
---|
109 | export INTERACT_FLAG="no" |
---|
110 | export MPIRUN_FLAG="yes" |
---|
111 | # |
---|
112 | export ADD_KEYS="" |
---|
113 | export DEL_KEYS="" |
---|
114 | if [ ${USING_XIOS} == "yes" ] |
---|
115 | then |
---|
116 | export ADD_KEYS="${ADD_KEYS} key_xios" |
---|
117 | else |
---|
118 | export DEL_KEYS="${DEL_KEYS} key_xios" |
---|
119 | fi |
---|
120 | # |
---|
121 | if [ ${ADD_NOSIGNEDZERO} == "yes" ] |
---|
122 | then |
---|
123 | export ADD_KEYS="${ADD_KEYS} key_nosignedzero" |
---|
124 | else |
---|
125 | export DEL_KEYS="${DEL_KEYS} key_nosignedzero" |
---|
126 | fi |
---|
127 | # |
---|
128 | if [ ${USING_MPI3} == "yes" ] |
---|
129 | then |
---|
130 | export ADD_KEYS="${ADD_KEYS} key_mpi3" |
---|
131 | fi |
---|
132 | # |
---|
133 | if [ ${USING_LOOP_FUSION} == "yes" ] |
---|
134 | then |
---|
135 | export ADD_KEYS="${ADD_KEYS} key_loop_fusion" |
---|
136 | fi |
---|
137 | # |
---|
138 | if [ ${NOT_USING_QCO} == "yes" ] |
---|
139 | then |
---|
140 | export DEL_KEYS="${DEL_KEYS} key_qco key_linssh" |
---|
141 | fi |
---|
142 | # |
---|
143 | # Settings which control the use of stand alone servers (only relevant if using xios) |
---|
144 | # |
---|
145 | export NUM_XIOSERVERS=4 |
---|
146 | export JOB_PREFIX=${JOB_PREFIX_MPMD} |
---|
147 | # |
---|
148 | if [ ${USING_MPMD} == "no" ] |
---|
149 | then |
---|
150 | export NUM_XIOSERVERS=0 |
---|
151 | export JOB_PREFIX=${JOB_PREFIX_NOMPMD} |
---|
152 | fi |
---|
153 | # |
---|
154 | # |
---|
155 | if [ ${USING_MPMD} == "yes" ] && [ ${USING_XIOS} == "no" ] |
---|
156 | then |
---|
157 | echo "Incompatible choices. MPMD mode requires the XIOS server" |
---|
158 | exit |
---|
159 | fi |
---|
160 | |
---|
161 | # Directory to run the tests |
---|
162 | CONFIG_DIR0=${MAIN_DIR}/cfgs |
---|
163 | TOOLS_DIR=${MAIN_DIR}/tools |
---|
164 | |
---|
165 | CMP_NAM=${1:-$COMPILER} |
---|
166 | # Copy job_batch_COMPILER file for specific compiler into job_batch_template |
---|
167 | cd ${SETTE_DIR} |
---|
168 | cp BATCH_TEMPLATE/${JOB_PREFIX}-${COMPILER} job_batch_template || exit |
---|
169 | # Description of configuration tested: |
---|
170 | # OVERFLOW : TEST s-coordinates : (tracers) Advection schemes: FCT2, FCT4, ubs |
---|
171 | # & (dynamics) advection schemes: flux form (ubs, centered), vector form (een) |
---|
172 | # zps-coordinates : (tracers) Advection schemes: FCT2, FCT4, ubs |
---|
173 | # & (dynamics) advection schemes: flux form (ubs, centered), vector form (een, and een + Hollingsworth correction) |
---|
174 | # LOCK_EXCHANGE : |
---|
175 | # VORTEX : |
---|
176 | # ICE_AGRIF : |
---|
177 | # ISOMIP+ : |
---|
178 | # WAD |
---|
179 | |
---|
180 | for config in ${TEST_CONFIGS[@]} |
---|
181 | do |
---|
182 | |
---|
183 | # --------- |
---|
184 | # OVERFLOW |
---|
185 | # --------- |
---|
186 | if [ ${config} == "OVERFLOW" ] && [ ${DO_RESTART} == "1" ] ; then |
---|
187 | ## Restartability tests for OVERFLOW |
---|
188 | if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] |
---|
189 | then |
---|
190 | ITEND=12 |
---|
191 | else |
---|
192 | ITEND=120 |
---|
193 | fi |
---|
194 | ITRST=$( printf "%08d" $(( ${ITEND} / 2 )) ) |
---|
195 | export TEST_NAME="LONG" |
---|
196 | cd ${MAIN_DIR} |
---|
197 | # |
---|
198 | . ${SETTE_DIR}/all_functions.sh |
---|
199 | # |
---|
200 | clean_config OVERFLOW OVERFLOW_ST 'tests' |
---|
201 | # |
---|
202 | sync_config OVERFLOW OVERFLOW_ST 'tests' |
---|
203 | # |
---|
204 | . ./makenemo -m ${CMP_NAM} -n OVERFLOW_ST -a OVERFLOW -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}" |
---|
205 | cd ${SETTE_DIR} |
---|
206 | . ./param.cfg |
---|
207 | . ./all_functions.sh |
---|
208 | . ./prepare_exe_dir.sh |
---|
209 | set_valid_dir |
---|
210 | clean_valid_dir |
---|
211 | JOB_FILE=${EXE_DIR}/run_job.sh |
---|
212 | NPROC=1 |
---|
213 | if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi |
---|
214 | cd ${EXE_DIR} |
---|
215 | set_namelist namelist_cfg cn_exp \"OVF_LONG\" |
---|
216 | set_namelist namelist_cfg nn_it000 1 |
---|
217 | set_namelist namelist_cfg nn_itend ${ITEND} |
---|
218 | set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 )) |
---|
219 | set_namelist namelist_cfg sn_cfctl%l_runstat .true. |
---|
220 | if [ ${SETTE_TIMING} == "yes" ] ; then set_namelist namelist_cfg ln_timing .true. ; fi |
---|
221 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
222 | set_xio_using_server iodef.xml true |
---|
223 | else |
---|
224 | set_xio_using_server iodef.xml false |
---|
225 | fi |
---|
226 | cd ${SETTE_DIR} |
---|
227 | . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} |
---|
228 | |
---|
229 | cd ${SETTE_DIR} |
---|
230 | export TEST_NAME="SHORT" |
---|
231 | . ./prepare_exe_dir.sh |
---|
232 | set_valid_dir |
---|
233 | clean_valid_dir |
---|
234 | cd ${EXE_DIR} |
---|
235 | set_namelist namelist_cfg cn_exp \"OVF_SHORT\" |
---|
236 | set_namelist namelist_cfg nn_it000 $(( ${ITEND} / 2 + 1 )) |
---|
237 | set_namelist namelist_cfg nn_itend ${ITEND} |
---|
238 | set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 )) |
---|
239 | set_namelist namelist_cfg sn_cfctl%l_runstat .true. |
---|
240 | set_namelist namelist_cfg ln_rstart .true. |
---|
241 | set_namelist namelist_cfg nn_rstctl 2 |
---|
242 | set_namelist namelist_cfg cn_ocerst_in \"OVF_LONG_${ITRST}_restart\" |
---|
243 | if [ ${SETTE_TIMING} == "yes" ] ; then set_namelist namelist_cfg ln_timing .true. ; fi |
---|
244 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
245 | set_xio_using_server iodef.xml true |
---|
246 | else |
---|
247 | set_xio_using_server iodef.xml false |
---|
248 | fi |
---|
249 | ln -sf ../LONG/OVF_LONG_${ITRST}_restart.nc . |
---|
250 | |
---|
251 | cd ${SETTE_DIR} |
---|
252 | . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} |
---|
253 | cd ${SETTE_DIR} |
---|
254 | . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} |
---|
255 | |
---|
256 | |
---|
257 | fi |
---|
258 | |
---|
259 | if [ ${config} == "OVERFLOW" ] && [ ${DO_PHYOPTS} == "1" ] ; then |
---|
260 | ## Test for all advection, vert. coordinates, vector form, flux form: test runability and complete all time steps |
---|
261 | ## Needed namelist-xxxx for every type of run tested |
---|
262 | if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] |
---|
263 | then |
---|
264 | ITEND=12 |
---|
265 | else |
---|
266 | ITEND=6120 |
---|
267 | fi |
---|
268 | cd ${CONFIG_DIR}/${NEW_CONF}/EXP00 |
---|
269 | |
---|
270 | for file in $(echo `ls namelist_*_cfg `) ; do |
---|
271 | TEST_NAME=`echo $file | sed -e "s/namelist_//" | sed -e "s/_cfg//"` |
---|
272 | TEST_NAME="EXP-${TEST_NAME}" |
---|
273 | if [ ! -d ${CONFIG_DIR}/${NEW_CONF}/${TEST_NAME} ] ; then mkdir ${CONFIG_DIR}/${NEW_CONF}/${TEST_NAME} ; fi |
---|
274 | export TEST_NAME="${TEST_NAME}" |
---|
275 | ## |
---|
276 | cd ${SETTE_DIR} |
---|
277 | . ./param.cfg |
---|
278 | . ./all_functions.sh |
---|
279 | . ./prepare_exe_dir.sh |
---|
280 | set_valid_dir |
---|
281 | clean_valid_dir |
---|
282 | JOB_FILE=${EXE_DIR}/run_job.sh |
---|
283 | NPROC=1 |
---|
284 | if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi |
---|
285 | cd ${EXE_DIR} |
---|
286 | rm namelist_*_*_*_* |
---|
287 | cp -pL ${CONFIG_DIR}/${NEW_CONF}/EXP00/$file namelist_cfg |
---|
288 | set_namelist namelist_cfg nn_it000 1 |
---|
289 | set_namelist namelist_cfg nn_itend ${ITEND} |
---|
290 | if [ ${SETTE_TIMING} == "yes" ] ; then set_namelist namelist_cfg ln_timing .true. ; fi |
---|
291 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
292 | set_xio_using_server iodef.xml true |
---|
293 | else |
---|
294 | set_xio_using_server iodef.xml false |
---|
295 | fi |
---|
296 | cd ${SETTE_DIR} |
---|
297 | . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} |
---|
298 | cd ${SETTE_DIR} |
---|
299 | . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} |
---|
300 | ## |
---|
301 | done |
---|
302 | fi |
---|
303 | |
---|
304 | # -------------- |
---|
305 | # LOCK_EXCHANGE |
---|
306 | # -------------- |
---|
307 | if [ ${config} == "LOCK_EXCHANGE" ] && [ ${DO_RESTART} == "1" ] ; then |
---|
308 | ## Restartability tests for LOCK_EXCHANGE |
---|
309 | if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] |
---|
310 | then |
---|
311 | ITEND=12 |
---|
312 | else |
---|
313 | ITEND=120 |
---|
314 | fi |
---|
315 | ITRST=$( printf "%08d" $(( ${ITEND} / 2 )) ) |
---|
316 | export TEST_NAME="LONG" |
---|
317 | cd ${MAIN_DIR} |
---|
318 | # |
---|
319 | # syncronisation if target directory/file exist (not done by makenemo) |
---|
320 | . ${SETTE_DIR}/all_functions.sh |
---|
321 | # |
---|
322 | clean_config LOCK_EXCHANGE LOCK_EXCHANGE_ST 'tests' |
---|
323 | # |
---|
324 | sync_config LOCK_EXCHANGE LOCK_EXCHANGE_ST 'tests' |
---|
325 | # |
---|
326 | . ./makenemo -m ${CMP_NAM} -n LOCK_EXCHANGE_ST -a LOCK_EXCHANGE -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}" |
---|
327 | cd ${SETTE_DIR} |
---|
328 | . ./param.cfg |
---|
329 | . ./all_functions.sh |
---|
330 | . ./prepare_exe_dir.sh |
---|
331 | set_valid_dir |
---|
332 | clean_valid_dir |
---|
333 | JOB_FILE=${EXE_DIR}/run_job.sh |
---|
334 | NPROC=1 |
---|
335 | if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi |
---|
336 | cd ${EXE_DIR} |
---|
337 | set_namelist namelist_cfg cn_exp \"LOCK_LONG\" |
---|
338 | set_namelist namelist_cfg nn_it000 1 |
---|
339 | set_namelist namelist_cfg nn_itend ${ITEND} |
---|
340 | set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 )) |
---|
341 | set_namelist namelist_cfg sn_cfctl%l_runstat .true. |
---|
342 | if [ ${SETTE_TIMING} == "yes" ] ; then set_namelist namelist_cfg ln_timing .true. ; fi |
---|
343 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
344 | set_xio_using_server iodef.xml true |
---|
345 | else |
---|
346 | set_xio_using_server iodef.xml false |
---|
347 | fi |
---|
348 | cd ${SETTE_DIR} |
---|
349 | . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} |
---|
350 | |
---|
351 | cd ${SETTE_DIR} |
---|
352 | export TEST_NAME="SHORT" |
---|
353 | . ./prepare_exe_dir.sh |
---|
354 | set_valid_dir |
---|
355 | clean_valid_dir |
---|
356 | cd ${EXE_DIR} |
---|
357 | set_namelist namelist_cfg cn_exp \"LOCK_SHORT\" |
---|
358 | set_namelist namelist_cfg nn_it000 $(( ${ITEND} / 2 + 1 )) |
---|
359 | set_namelist namelist_cfg nn_itend ${ITEND} |
---|
360 | set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 )) |
---|
361 | set_namelist namelist_cfg sn_cfctl%l_runstat .true. |
---|
362 | set_namelist namelist_cfg ln_rstart .true. |
---|
363 | set_namelist namelist_cfg nn_rstctl 2 |
---|
364 | set_namelist namelist_cfg cn_ocerst_in \"LOCK_LONG_${ITRST}_restart\" |
---|
365 | if [ ${SETTE_TIMING} == "yes" ] ; then set_namelist namelist_cfg ln_timing .true. ; fi |
---|
366 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
367 | set_xio_using_server iodef.xml true |
---|
368 | else |
---|
369 | set_xio_using_server iodef.xml false |
---|
370 | fi |
---|
371 | ln -sf ../LONG/LOCK_LONG_${ITRST}_restart.nc . |
---|
372 | |
---|
373 | cd ${SETTE_DIR} |
---|
374 | . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} |
---|
375 | cd ${SETTE_DIR} |
---|
376 | . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} |
---|
377 | |
---|
378 | fi |
---|
379 | |
---|
380 | if [ ${config} == "LOCK_EXCHANGE" ] && [ ${DO_PHYOPTS} == "1" ] ; then |
---|
381 | ## Test for all advection, vector form, flux form: test runability and complete all time steps |
---|
382 | ## Needed namelist-xxxx for every type of run tested |
---|
383 | if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] |
---|
384 | then |
---|
385 | ITEND=12 |
---|
386 | else |
---|
387 | ITEND=61200 |
---|
388 | fi |
---|
389 | cd ${CONFIG_DIR}/${NEW_CONF}/EXP00 |
---|
390 | |
---|
391 | for file in $(echo `ls namelist_*_cfg `) ; do |
---|
392 | echo '' |
---|
393 | TEST_NAME=`echo $file | sed -e "s/namelist_//" | sed -e "s/_cfg//"` |
---|
394 | TEST_NAME="EXP-${TEST_NAME}" |
---|
395 | `mkdir ${CONFIG_DIR}/${NEW_CONF}/${TEST_NAME}` |
---|
396 | export TEST_NAME="${TEST_NAME}" |
---|
397 | ## |
---|
398 | cd ${SETTE_DIR} |
---|
399 | . ./param.cfg |
---|
400 | . ./all_functions.sh |
---|
401 | . ./prepare_exe_dir.sh |
---|
402 | set_valid_dir |
---|
403 | clean_valid_dir |
---|
404 | JOB_FILE=${EXE_DIR}/run_job.sh |
---|
405 | NPROC=1 |
---|
406 | if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi |
---|
407 | cd ${EXE_DIR} |
---|
408 | rm namelist_*_*_*_* |
---|
409 | cp -pL ${CONFIG_DIR}/${NEW_CONF}/EXP00/$file namelist_cfg |
---|
410 | if [ ${SETTE_TIMING} == "yes" ] ; then set_namelist namelist_cfg ln_timing .true. ; fi |
---|
411 | set_namelist namelist_cfg nn_it000 1 |
---|
412 | set_namelist namelist_cfg nn_itend ${ITEND} |
---|
413 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
414 | set_xio_using_server iodef.xml true |
---|
415 | else |
---|
416 | set_xio_using_server iodef.xml false |
---|
417 | fi |
---|
418 | cd ${SETTE_DIR} |
---|
419 | . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} |
---|
420 | cd ${SETTE_DIR} |
---|
421 | . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} |
---|
422 | ## |
---|
423 | echo '' |
---|
424 | done |
---|
425 | fi |
---|
426 | |
---|
427 | # --------- |
---|
428 | # VORTEX |
---|
429 | # --------- |
---|
430 | if [ ${config} == "VORTEX" ] && [ ${DO_RESTART} == "1" ] ; then |
---|
431 | ## Restartability tests for VORTEX |
---|
432 | if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] |
---|
433 | then |
---|
434 | ITEND=12 |
---|
435 | else |
---|
436 | ITEND=240 |
---|
437 | fi |
---|
438 | ITRST=$( printf "%08d" $(( ${ITEND} / 2 )) ) |
---|
439 | ITRST_1=$( printf "%08d" $(( ${ITEND} * 3 / 2 )) ) |
---|
440 | export TEST_NAME="LONG" |
---|
441 | cd ${MAIN_DIR} |
---|
442 | # |
---|
443 | # syncronisation if target directory/file exist (not done by makenemo) |
---|
444 | . ${SETTE_DIR}/all_functions.sh |
---|
445 | # |
---|
446 | clean_config VORTEX VORTEX_ST 'tests' |
---|
447 | # |
---|
448 | sync_config VORTEX VORTEX_ST 'tests' |
---|
449 | # |
---|
450 | . ./makenemo -m ${CMP_NAM} -n VORTEX_ST -a VORTEX -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}" |
---|
451 | cd ${SETTE_DIR} |
---|
452 | . ./param.cfg |
---|
453 | . ./all_functions.sh |
---|
454 | . ./prepare_exe_dir.sh |
---|
455 | set_valid_dir |
---|
456 | clean_valid_dir |
---|
457 | JOB_FILE=${EXE_DIR}/run_job.sh |
---|
458 | NPROC=6 |
---|
459 | if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi |
---|
460 | cd ${EXE_DIR} |
---|
461 | set_namelist namelist_cfg cn_exp \"VORTEX_LONG\" |
---|
462 | set_namelist namelist_cfg nn_it000 1 |
---|
463 | set_namelist namelist_cfg nn_itend ${ITEND} |
---|
464 | set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 )) |
---|
465 | set_namelist namelist_cfg sn_cfctl%l_runstat .true. |
---|
466 | |
---|
467 | set_namelist 1_namelist_cfg cn_exp \"VORTEX_LONG\" |
---|
468 | set_namelist 1_namelist_cfg nn_it000 1 |
---|
469 | set_namelist 1_namelist_cfg nn_itend $(( ${ITEND} * 3 )) |
---|
470 | set_namelist 1_namelist_cfg nn_stock $(( ${ITEND} * 3 / 2 )) |
---|
471 | set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true. |
---|
472 | |
---|
473 | #if [ ${SETTE_TIMING} == "yes" ] ; then set_namelist namelist_cfg ln_timing .true. ; fi |
---|
474 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
475 | set_xio_using_server iodef.xml true |
---|
476 | else |
---|
477 | set_xio_using_server iodef.xml false |
---|
478 | fi |
---|
479 | cd ${SETTE_DIR} |
---|
480 | . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} |
---|
481 | |
---|
482 | cd ${SETTE_DIR} |
---|
483 | export TEST_NAME="SHORT" |
---|
484 | . ./prepare_exe_dir.sh |
---|
485 | set_valid_dir |
---|
486 | clean_valid_dir |
---|
487 | cd ${EXE_DIR} |
---|
488 | set_namelist namelist_cfg cn_exp \"VORTEX_SHORT\" |
---|
489 | set_namelist namelist_cfg nn_it000 $(( ${ITEND} / 2 + 1 )) |
---|
490 | set_namelist namelist_cfg nn_itend ${ITEND} |
---|
491 | set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 )) |
---|
492 | set_namelist namelist_cfg sn_cfctl%l_runstat .true. |
---|
493 | set_namelist namelist_cfg ln_rstart .true. |
---|
494 | set_namelist namelist_cfg nn_rstctl 2 |
---|
495 | set_namelist namelist_cfg cn_ocerst_in \"VORTEX_LONG_${ITRST}_restart\" |
---|
496 | |
---|
497 | set_namelist 1_namelist_cfg cn_exp \"VORTEX_SHORT\" |
---|
498 | set_namelist 1_namelist_cfg nn_it000 $(( ${ITEND} * 3 / 2 + 1 )) |
---|
499 | set_namelist 1_namelist_cfg nn_itend $(( ${ITEND} * 3 )) |
---|
500 | set_namelist 1_namelist_cfg nn_stock $(( ${ITEND} * 3 / 2 )) |
---|
501 | set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true. |
---|
502 | set_namelist 1_namelist_cfg ln_rstart .true. |
---|
503 | set_namelist 1_namelist_cfg nn_rstctl 2 |
---|
504 | set_namelist 1_namelist_cfg cn_ocerst_in \"VORTEX_LONG_${ITRST_1}_restart\" |
---|
505 | |
---|
506 | #if [ ${SETTE_TIMING} == "yes" ] ; then set_namelist namelist_cfg ln_timing .true. ; fi |
---|
507 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
508 | set_xio_using_server iodef.xml true |
---|
509 | else |
---|
510 | set_xio_using_server iodef.xml false |
---|
511 | fi |
---|
512 | if [ $NPROC -eq 1 ] ; then |
---|
513 | ln -sf ../LONG/VORTEX_LONG_${ITRST}_restart.nc . |
---|
514 | ln -sf ../LONG/1_VORTEX_LONG_${ITRST_1}_restart.nc . |
---|
515 | else |
---|
516 | for (( i=1; i<=$NPROC; i++)) ; do |
---|
517 | L_NPROC=$(( $i - 1 )) |
---|
518 | L_NPROC=`printf "%04d\n" ${L_NPROC}` |
---|
519 | ln -sf ../LONG/VORTEX_LONG_${ITRST}_restart_${L_NPROC}.nc . |
---|
520 | ln -sf ../LONG/1_VORTEX_LONG_${ITRST_1}_restart_${L_NPROC}.nc . |
---|
521 | done |
---|
522 | fi |
---|
523 | cd ${SETTE_DIR} |
---|
524 | . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} |
---|
525 | cd ${SETTE_DIR} |
---|
526 | . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} |
---|
527 | fi |
---|
528 | |
---|
529 | if [ ${config} == "VORTEX" ] && [ ${DO_REPRO} == "1" ] ; then |
---|
530 | |
---|
531 | ## Reproducibility tests for VORTEX |
---|
532 | export TEST_NAME="REPRO_2_3" |
---|
533 | cd ${MAIN_DIR} |
---|
534 | cd ${SETTE_DIR} |
---|
535 | . ./param.cfg |
---|
536 | . ./all_functions.sh |
---|
537 | . ./prepare_exe_dir.sh |
---|
538 | set_valid_dir |
---|
539 | clean_valid_dir |
---|
540 | JOB_FILE=${EXE_DIR}/run_job.sh |
---|
541 | NPROC=6 |
---|
542 | if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi |
---|
543 | cd ${EXE_DIR} |
---|
544 | set_namelist namelist_cfg cn_exp \"VORTEX_23\" |
---|
545 | set_namelist namelist_cfg nn_it000 1 |
---|
546 | set_namelist namelist_cfg nn_itend ${ITEND} |
---|
547 | set_namelist namelist_cfg nn_stock ${ITEND} |
---|
548 | set_namelist namelist_cfg jpni 2 |
---|
549 | set_namelist namelist_cfg jpnj 3 |
---|
550 | set_namelist namelist_cfg sn_cfctl%l_runstat .true. |
---|
551 | |
---|
552 | set_namelist 1_namelist_cfg cn_exp \"VORTEX_23\" |
---|
553 | set_namelist 1_namelist_cfg nn_it000 1 |
---|
554 | set_namelist 1_namelist_cfg nn_itend $(( ${ITEND} * 3 )) |
---|
555 | set_namelist 1_namelist_cfg nn_stock $(( ${ITEND} * 3 )) |
---|
556 | set_namelist 1_namelist_cfg jpni 2 |
---|
557 | set_namelist 1_namelist_cfg jpnj 3 |
---|
558 | set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true. |
---|
559 | |
---|
560 | #if [ ${SETTE_TIMING} == "yes" ] ; then set_namelist namelist_cfg ln_timing .true. ; fi |
---|
561 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
562 | set_xio_using_server iodef.xml true |
---|
563 | else |
---|
564 | set_xio_using_server iodef.xml false |
---|
565 | fi |
---|
566 | cd ${SETTE_DIR} |
---|
567 | . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} |
---|
568 | cd ${SETTE_DIR} |
---|
569 | . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} |
---|
570 | |
---|
571 | cd ${SETTE_DIR} |
---|
572 | export TEST_NAME="REPRO_3_2" |
---|
573 | . ./prepare_exe_dir.sh |
---|
574 | set_valid_dir |
---|
575 | clean_valid_dir |
---|
576 | JOB_FILE=${EXE_DIR}/run_job.sh |
---|
577 | NPROC=6 |
---|
578 | if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi |
---|
579 | cd ${EXE_DIR} |
---|
580 | |
---|
581 | set_namelist namelist_cfg cn_exp \"VORTEX_32\" |
---|
582 | set_namelist namelist_cfg nn_it000 1 |
---|
583 | set_namelist namelist_cfg nn_itend ${ITEND} |
---|
584 | set_namelist namelist_cfg nn_stock ${ITEND} |
---|
585 | set_namelist namelist_cfg jpni 3 |
---|
586 | set_namelist namelist_cfg jpnj 2 |
---|
587 | set_namelist namelist_cfg sn_cfctl%l_runstat .true. |
---|
588 | |
---|
589 | set_namelist 1_namelist_cfg cn_exp \"VORTEX_32\" |
---|
590 | set_namelist 1_namelist_cfg nn_it000 1 |
---|
591 | set_namelist 1_namelist_cfg nn_itend $(( ${ITEND} * 3 )) |
---|
592 | set_namelist 1_namelist_cfg nn_stock $(( ${ITEND} * 3 )) |
---|
593 | set_namelist 1_namelist_cfg jpni 3 |
---|
594 | set_namelist 1_namelist_cfg jpnj 2 |
---|
595 | set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true. |
---|
596 | |
---|
597 | #if [ ${SETTE_TIMING} == "yes" ] ; then set_namelist namelist_cfg ln_timing .true. ; fi |
---|
598 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
599 | set_xio_using_server iodef.xml true |
---|
600 | else |
---|
601 | set_xio_using_server iodef.xml false |
---|
602 | fi |
---|
603 | cd ${SETTE_DIR} |
---|
604 | . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} |
---|
605 | cd ${SETTE_DIR} |
---|
606 | . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} |
---|
607 | |
---|
608 | fi |
---|
609 | |
---|
610 | |
---|
611 | # --------- |
---|
612 | # ICE_AGRIF |
---|
613 | # --------- |
---|
614 | if [ ${config} == "ICE_AGRIF" ] && [ ${DO_RESTART} == "1" ] ; then |
---|
615 | ## Restartability tests for ICE_AGRIF |
---|
616 | if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] |
---|
617 | then |
---|
618 | ITEND=10 |
---|
619 | else |
---|
620 | ITEND=200 |
---|
621 | fi |
---|
622 | ITRST=$( printf "%08d" $(( ${ITEND} / 2 )) ) |
---|
623 | ITRST_1=$( printf "%08d" $(( ${ITEND} * 3 / 2 )) ) |
---|
624 | export TEST_NAME="LONG" |
---|
625 | cd ${MAIN_DIR} |
---|
626 | # |
---|
627 | # syncronisation if target directory/file exist (not done by makenemo) |
---|
628 | . ${SETTE_DIR}/all_functions.sh |
---|
629 | # |
---|
630 | clean_config ICE_AGRIF ICE_AGRIF_ST 'tests' |
---|
631 | # |
---|
632 | sync_config ICE_AGRIF ICE_AGRIF_ST 'tests' |
---|
633 | # |
---|
634 | . ./makenemo -m ${CMP_NAM} -n ICE_AGRIF_ST -a ICE_AGRIF -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}" |
---|
635 | cd ${SETTE_DIR} |
---|
636 | . ./param.cfg |
---|
637 | . ./all_functions.sh |
---|
638 | . ./prepare_exe_dir.sh |
---|
639 | set_valid_dir |
---|
640 | clean_valid_dir |
---|
641 | JOB_FILE=${EXE_DIR}/run_job.sh |
---|
642 | NPROC=6 |
---|
643 | if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi |
---|
644 | cd ${EXE_DIR} |
---|
645 | set_namelist namelist_cfg cn_exp \"ICE_AGRIF_LONG\" |
---|
646 | set_namelist namelist_cfg nn_it000 1 |
---|
647 | set_namelist namelist_cfg nn_itend ${ITEND} |
---|
648 | set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 )) |
---|
649 | set_namelist namelist_cfg sn_cfctl%l_runstat .true. |
---|
650 | |
---|
651 | set_namelist 1_namelist_cfg cn_exp \"ICE_AGRIF_LONG\" |
---|
652 | set_namelist 1_namelist_cfg nn_it000 1 |
---|
653 | set_namelist 1_namelist_cfg nn_itend $(( ${ITEND} * 3 )) |
---|
654 | set_namelist 1_namelist_cfg nn_stock $(( ${ITEND} * 3 / 2 )) |
---|
655 | set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true. |
---|
656 | |
---|
657 | #if [ ${SETTE_TIMING} == "yes" ] ; then set_namelist namelist_cfg ln_timing .true. ; fi |
---|
658 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
659 | set_xio_using_server iodef.xml true |
---|
660 | else |
---|
661 | set_xio_using_server iodef.xml false |
---|
662 | fi |
---|
663 | cd ${SETTE_DIR} |
---|
664 | . ./prepare_job.sh input_ICE_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} |
---|
665 | |
---|
666 | cd ${SETTE_DIR} |
---|
667 | export TEST_NAME="SHORT" |
---|
668 | . ./prepare_exe_dir.sh |
---|
669 | set_valid_dir |
---|
670 | clean_valid_dir |
---|
671 | cd ${EXE_DIR} |
---|
672 | set_namelist namelist_cfg cn_exp \"ICE_AGRIF_SHORT\" |
---|
673 | set_namelist namelist_cfg nn_it000 $(( ${ITEND} / 2 + 1 )) |
---|
674 | set_namelist namelist_cfg nn_itend ${ITEND} |
---|
675 | set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 )) |
---|
676 | set_namelist namelist_cfg sn_cfctl%l_runstat .true. |
---|
677 | set_namelist namelist_cfg ln_rstart .true. |
---|
678 | set_namelist namelist_cfg nn_rstctl 2 |
---|
679 | set_namelist namelist_cfg cn_ocerst_in \"ICE_AGRIF_LONG_${ITRST}_restart\" |
---|
680 | set_namelist namelist_ice_cfg cn_icerst_in \"ICE_AGRIF_LONG_${ITRST}_restart_ice\" |
---|
681 | |
---|
682 | set_namelist 1_namelist_cfg cn_exp \"ICE_AGRIF_SHORT\" |
---|
683 | set_namelist 1_namelist_cfg nn_it000 $(( ${ITEND} * 3 / 2 + 1 )) |
---|
684 | set_namelist 1_namelist_cfg nn_itend $(( ${ITEND} * 3 )) |
---|
685 | set_namelist 1_namelist_cfg nn_stock $(( ${ITEND} * 3 / 2 )) |
---|
686 | set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true. |
---|
687 | set_namelist 1_namelist_cfg ln_rstart .true. |
---|
688 | set_namelist 1_namelist_cfg nn_rstctl 2 |
---|
689 | set_namelist 1_namelist_cfg cn_ocerst_in \"ICE_AGRIF_LONG_${ITRST_1}_restart\" |
---|
690 | set_namelist 1_namelist_ice_cfg cn_icerst_in \"ICE_AGRIF_LONG_${ITRST_1}_restart_ice\" |
---|
691 | |
---|
692 | |
---|
693 | #if [ ${SETTE_TIMING} == "yes" ] ; then set_namelist namelist_cfg ln_timing .true. ; fi |
---|
694 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
695 | set_xio_using_server iodef.xml true |
---|
696 | else |
---|
697 | set_xio_using_server iodef.xml false |
---|
698 | fi |
---|
699 | if [ $NPROC -eq 1 ] ; then |
---|
700 | ln -sf ../LONG/ICE_AGRIF_LONG_${ITRST}_restart.nc . |
---|
701 | ln -sf ../LONG/ICE_AGRIF_LONG_${ITRST}_restart_ice.nc . |
---|
702 | ln -sf ../LONG/1_ICE_AGRIF_LONG_${ITRST_1}_restart.nc . |
---|
703 | ln -sf ../LONG/1_ICE_AGRIF_LONG_${ITRST_1}_restart_ice.nc . |
---|
704 | else |
---|
705 | for (( i=1; i<=$NPROC; i++)) ; do |
---|
706 | L_NPROC=$(( $i - 1 )) |
---|
707 | L_NPROC=`printf "%04d\n" ${L_NPROC}` |
---|
708 | ln -sf ../LONG/ICE_AGRIF_LONG_${ITRST}_restart_${L_NPROC}.nc . |
---|
709 | ln -sf ../LONG/ICE_AGRIF_LONG_${ITRST}_restart_ice_${L_NPROC}.nc . |
---|
710 | ln -sf ../LONG/1_ICE_AGRIF_LONG_${ITRST_1}_restart_${L_NPROC}.nc . |
---|
711 | ln -sf ../LONG/1_ICE_AGRIF_LONG_${ITRST_1}_restart_ice_${L_NPROC}.nc . |
---|
712 | done |
---|
713 | fi |
---|
714 | |
---|
715 | cd ${SETTE_DIR} |
---|
716 | . ./prepare_job.sh input_ICE_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} |
---|
717 | cd ${SETTE_DIR} |
---|
718 | . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} |
---|
719 | |
---|
720 | fi |
---|
721 | |
---|
722 | if [ ${config} == "ICE_AGRIF" ] && [ ${DO_REPRO} == "1" ] ; then |
---|
723 | |
---|
724 | ## Reproducibility tests for ICE_AGRIF |
---|
725 | export TEST_NAME="REPRO_2_3" |
---|
726 | cd ${MAIN_DIR} |
---|
727 | cd ${SETTE_DIR} |
---|
728 | . ./param.cfg |
---|
729 | . ./all_functions.sh |
---|
730 | . ./prepare_exe_dir.sh |
---|
731 | set_valid_dir |
---|
732 | clean_valid_dir |
---|
733 | JOB_FILE=${EXE_DIR}/run_job.sh |
---|
734 | NPROC=6 |
---|
735 | if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi |
---|
736 | cd ${EXE_DIR} |
---|
737 | set_namelist namelist_cfg cn_exp \"ICE_AGRIF_23\" |
---|
738 | set_namelist namelist_cfg nn_it000 1 |
---|
739 | set_namelist namelist_cfg nn_itend ${ITEND} |
---|
740 | set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 )) |
---|
741 | set_namelist namelist_cfg jpni 2 |
---|
742 | set_namelist namelist_cfg jpnj 3 |
---|
743 | set_namelist namelist_cfg sn_cfctl%l_runstat .true. |
---|
744 | |
---|
745 | set_namelist 1_namelist_cfg cn_exp \"ICE_AGRIF_23\" |
---|
746 | set_namelist 1_namelist_cfg nn_it000 1 |
---|
747 | set_namelist 1_namelist_cfg nn_itend $(( ${ITEND} * 3 )) |
---|
748 | set_namelist 1_namelist_cfg nn_stock $(( ${ITEND} * 3 / 2 )) |
---|
749 | set_namelist 1_namelist_cfg jpni 2 |
---|
750 | set_namelist 1_namelist_cfg jpnj 3 |
---|
751 | set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true. |
---|
752 | |
---|
753 | #if [ ${SETTE_TIMING} == "yes" ] ; then set_namelist namelist_cfg ln_timing .true. ; fi |
---|
754 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
755 | set_xio_using_server iodef.xml true |
---|
756 | else |
---|
757 | set_xio_using_server iodef.xml false |
---|
758 | fi |
---|
759 | cd ${SETTE_DIR} |
---|
760 | . ./prepare_job.sh input_ICE_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} |
---|
761 | cd ${SETTE_DIR} |
---|
762 | . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} |
---|
763 | |
---|
764 | cd ${SETTE_DIR} |
---|
765 | export TEST_NAME="REPRO_3_2" |
---|
766 | . ./prepare_exe_dir.sh |
---|
767 | set_valid_dir |
---|
768 | clean_valid_dir |
---|
769 | JOB_FILE=${EXE_DIR}/run_job.sh |
---|
770 | NPROC=6 |
---|
771 | if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi |
---|
772 | cd ${EXE_DIR} |
---|
773 | |
---|
774 | set_namelist namelist_cfg cn_exp \"ICE_AGRIF_32\" |
---|
775 | set_namelist namelist_cfg nn_it000 1 |
---|
776 | set_namelist namelist_cfg nn_itend ${ITEND} |
---|
777 | set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 )) |
---|
778 | set_namelist namelist_cfg jpni 3 |
---|
779 | set_namelist namelist_cfg jpnj 2 |
---|
780 | set_namelist namelist_cfg sn_cfctl%l_runstat .true. |
---|
781 | |
---|
782 | set_namelist 1_namelist_cfg cn_exp \"ICE_AGRIF_32\" |
---|
783 | set_namelist 1_namelist_cfg nn_it000 1 |
---|
784 | set_namelist 1_namelist_cfg nn_itend $(( ${ITEND} * 3 )) |
---|
785 | set_namelist 1_namelist_cfg nn_stock $(( ${ITEND} * 3 / 2 )) |
---|
786 | set_namelist 1_namelist_cfg jpni 3 |
---|
787 | set_namelist 1_namelist_cfg jpnj 2 |
---|
788 | set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true. |
---|
789 | |
---|
790 | #if [ ${SETTE_TIMING} == "yes" ] ; then set_namelist namelist_cfg ln_timing .true. ; fi |
---|
791 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
792 | set_xio_using_server iodef.xml true |
---|
793 | else |
---|
794 | set_xio_using_server iodef.xml false |
---|
795 | fi |
---|
796 | cd ${SETTE_DIR} |
---|
797 | . ./prepare_job.sh input_ICE_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} |
---|
798 | cd ${SETTE_DIR} |
---|
799 | . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} |
---|
800 | |
---|
801 | fi |
---|
802 | |
---|
803 | # ------ |
---|
804 | # ISOMIP+ |
---|
805 | # ------ |
---|
806 | if [ ${config} == "ISOMIP+" ] && [ ${DO_RESTART} == "1" ] ; then |
---|
807 | ## Restartability tests |
---|
808 | if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] |
---|
809 | then |
---|
810 | ITEND=12 |
---|
811 | else |
---|
812 | ITEND=1200 |
---|
813 | fi |
---|
814 | ITRST=$( printf "%08d" $(( ${ITEND} / 2 )) ) |
---|
815 | export TEST_NAME="LONG" |
---|
816 | cd ${MAIN_DIR} |
---|
817 | # |
---|
818 | # syncronisation if target directory/file exist (not done by makenemo) |
---|
819 | . ${SETTE_DIR}/all_functions.sh |
---|
820 | # |
---|
821 | clean_config ISOMIP+ ISOMIP+_ST 'tests' |
---|
822 | # |
---|
823 | sync_config ISOMIP+ ISOMIP+_ST 'tests' |
---|
824 | # |
---|
825 | . ./makenemo -m ${CMP_NAM} -n ISOMIP+_ST -a ISOMIP+ -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}" |
---|
826 | cd ${SETTE_DIR} |
---|
827 | . ./param.cfg |
---|
828 | . ./all_functions.sh |
---|
829 | . ./prepare_exe_dir.sh |
---|
830 | set_valid_dir |
---|
831 | clean_valid_dir |
---|
832 | JOB_FILE=${EXE_DIR}/run_job.sh |
---|
833 | NPROC=27 |
---|
834 | if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi |
---|
835 | cd ${EXE_DIR} |
---|
836 | set_namelist namelist_cfg cn_exp \"ISOMIP+_LONG\" |
---|
837 | set_namelist namelist_cfg nn_it000 1 |
---|
838 | set_namelist namelist_cfg nn_itend ${ITEND} |
---|
839 | set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 )) |
---|
840 | set_namelist namelist_cfg jpni 9 |
---|
841 | set_namelist namelist_cfg jpnj 3 |
---|
842 | set_namelist namelist_cfg sn_cfctl%l_runstat .true. |
---|
843 | if [ ${SETTE_TIMING} == "yes" ] ; then set_namelist namelist_cfg ln_timing .true. ; fi |
---|
844 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
845 | set_xio_using_server iodef.xml true |
---|
846 | else |
---|
847 | set_xio_using_server iodef.xml false |
---|
848 | fi |
---|
849 | cd ${SETTE_DIR} |
---|
850 | . ./prepare_job.sh input_ISOMIP+.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} |
---|
851 | |
---|
852 | cd ${SETTE_DIR} |
---|
853 | export TEST_NAME="SHORT" |
---|
854 | . ./prepare_exe_dir.sh |
---|
855 | set_valid_dir |
---|
856 | clean_valid_dir |
---|
857 | cd ${EXE_DIR} |
---|
858 | set_namelist namelist_cfg cn_exp \"ISOMIP+_SHORT\" |
---|
859 | set_namelist namelist_cfg nn_it000 $(( ${ITEND} / 2 + 1 )) |
---|
860 | set_namelist namelist_cfg nn_itend ${ITEND} |
---|
861 | set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 )) |
---|
862 | set_namelist namelist_cfg ln_rstart .true. |
---|
863 | set_namelist namelist_cfg nn_rstctl 2 |
---|
864 | set_namelist namelist_cfg jpni 9 |
---|
865 | set_namelist namelist_cfg jpnj 3 |
---|
866 | set_namelist namelist_cfg sn_cfctl%l_runstat .true. |
---|
867 | set_namelist namelist_cfg cn_ocerst_in \"ISOMIP+_LONG_${ITRST}_restart\" |
---|
868 | if [ ${SETTE_TIMING} == "yes" ] ; then set_namelist namelist_cfg ln_timing .true. ; fi |
---|
869 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
870 | set_xio_using_server iodef.xml true |
---|
871 | else |
---|
872 | set_xio_using_server iodef.xml false |
---|
873 | fi |
---|
874 | for (( i=1; i<=$NPROC; i++)) ; do |
---|
875 | L_NPROC=$(( $i - 1 )) |
---|
876 | L_NPROC=`printf "%04d\n" ${L_NPROC}` |
---|
877 | ln -sf ../LONG/ISOMIP+_LONG_${ITRST}_restart_${L_NPROC}.nc . |
---|
878 | done |
---|
879 | |
---|
880 | cd ${SETTE_DIR} |
---|
881 | . ./prepare_job.sh input_ISOMIP+.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} |
---|
882 | cd ${SETTE_DIR} |
---|
883 | . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} |
---|
884 | |
---|
885 | fi |
---|
886 | |
---|
887 | if [ ${config} == "ISOMIP+" ] && [ ${DO_REPRO} == "1" ] ; then |
---|
888 | ## Reproducibility tests |
---|
889 | if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] |
---|
890 | then |
---|
891 | ITEND=12 |
---|
892 | else |
---|
893 | ITEND=600 |
---|
894 | fi |
---|
895 | export TEST_NAME="REPRO_9_3" |
---|
896 | cd ${MAIN_DIR} |
---|
897 | cd ${SETTE_DIR} |
---|
898 | . ./param.cfg |
---|
899 | . ./all_functions.sh |
---|
900 | . ./prepare_exe_dir.sh |
---|
901 | set_valid_dir |
---|
902 | clean_valid_dir |
---|
903 | JOB_FILE=${EXE_DIR}/run_job.sh |
---|
904 | NPROC=27 |
---|
905 | if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi |
---|
906 | cd ${EXE_DIR} |
---|
907 | set_namelist namelist_cfg cn_exp \"ISOMIP+_93\" |
---|
908 | set_namelist namelist_cfg nn_it000 1 |
---|
909 | set_namelist namelist_cfg nn_itend ${ITEND} |
---|
910 | set_namelist namelist_cfg jpni 9 |
---|
911 | set_namelist namelist_cfg jpnj 3 |
---|
912 | set_namelist namelist_cfg sn_cfctl%l_runstat .true. |
---|
913 | if [ ${SETTE_TIMING} == "yes" ] ; then set_namelist namelist_cfg ln_timing .true. ; fi |
---|
914 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
915 | set_xio_using_server iodef.xml true |
---|
916 | else |
---|
917 | set_xio_using_server iodef.xml false |
---|
918 | fi |
---|
919 | cd ${SETTE_DIR} |
---|
920 | . ./prepare_job.sh input_ISOMIP+.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} |
---|
921 | cd ${SETTE_DIR} |
---|
922 | . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} |
---|
923 | |
---|
924 | cd ${SETTE_DIR} |
---|
925 | export TEST_NAME="REPRO_8_4" |
---|
926 | . ./prepare_exe_dir.sh |
---|
927 | set_valid_dir |
---|
928 | clean_valid_dir |
---|
929 | JOB_FILE=${EXE_DIR}/run_job.sh |
---|
930 | NPROC=32 |
---|
931 | if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi |
---|
932 | cd ${EXE_DIR} |
---|
933 | set_namelist namelist_cfg cn_exp \"ISOMIP+_84\" |
---|
934 | set_namelist namelist_cfg nn_it000 1 |
---|
935 | set_namelist namelist_cfg nn_itend ${ITEND} |
---|
936 | set_namelist namelist_cfg jpni 8 |
---|
937 | set_namelist namelist_cfg jpnj 4 |
---|
938 | set_namelist namelist_cfg sn_cfctl%l_runstat .true. |
---|
939 | if [ ${SETTE_TIMING} == "yes" ] ; then set_namelist namelist_cfg ln_timing .true. ; fi |
---|
940 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
941 | set_xio_using_server iodef.xml true |
---|
942 | else |
---|
943 | set_xio_using_server iodef.xml false |
---|
944 | fi |
---|
945 | cd ${SETTE_DIR} |
---|
946 | . ./prepare_job.sh input_ISOMIP+.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} |
---|
947 | cd ${SETTE_DIR} |
---|
948 | . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} |
---|
949 | |
---|
950 | fi |
---|
951 | |
---|
952 | |
---|
953 | # --------- |
---|
954 | # SWG |
---|
955 | # --------- |
---|
956 | if [ ${config} == "SWG" ] && [ ${DO_RESTART} == "1" ] && [ ${NOT_USING_QCO} == "no" ] ; then |
---|
957 | ## Restartability tests for SWG |
---|
958 | if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] |
---|
959 | then |
---|
960 | ITEND=12 |
---|
961 | else |
---|
962 | ITEND=1728 |
---|
963 | fi |
---|
964 | ITRST=$( printf "%08d" $(( ${ITEND} / 2 )) ) |
---|
965 | export TEST_NAME="LONG" |
---|
966 | cd ${MAIN_DIR} |
---|
967 | # |
---|
968 | # syncronisation if target directory/file exist (not done by makenemo) |
---|
969 | . ${SETTE_DIR}/all_functions.sh |
---|
970 | # |
---|
971 | clean_config SWG SWG_ST 'tests' |
---|
972 | # |
---|
973 | sync_config SWG SWG_ST 'tests' |
---|
974 | # |
---|
975 | . ./makenemo -m ${CMP_NAM} -n SWG_ST -a SWG -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}" |
---|
976 | cd ${SETTE_DIR} |
---|
977 | . ./param.cfg |
---|
978 | . ./all_functions.sh |
---|
979 | . ./prepare_exe_dir.sh |
---|
980 | set_valid_dir |
---|
981 | clean_valid_dir |
---|
982 | JOB_FILE=${EXE_DIR}/run_job.sh |
---|
983 | NPROC=1 |
---|
984 | if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi |
---|
985 | cd ${EXE_DIR} |
---|
986 | set_namelist namelist_cfg cn_exp \"SWG_LONG\" |
---|
987 | set_namelist namelist_cfg nn_it000 1 |
---|
988 | set_namelist namelist_cfg nn_itend ${ITEND} |
---|
989 | set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 )) |
---|
990 | set_namelist namelist_cfg sn_cfctl%l_runstat .true. |
---|
991 | |
---|
992 | #if [ ${SETTE_TIMING} == "yes" ] ; then set_namelist namelist_cfg ln_timing .true. ; fi |
---|
993 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
994 | set_xio_using_server iodef.xml true |
---|
995 | else |
---|
996 | set_xio_using_server iodef.xml false |
---|
997 | fi |
---|
998 | cd ${SETTE_DIR} |
---|
999 | . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} |
---|
1000 | |
---|
1001 | cd ${SETTE_DIR} |
---|
1002 | export TEST_NAME="SHORT" |
---|
1003 | . ./prepare_exe_dir.sh |
---|
1004 | set_valid_dir |
---|
1005 | clean_valid_dir |
---|
1006 | cd ${EXE_DIR} |
---|
1007 | set_namelist namelist_cfg cn_exp \"SWG_SHORT\" |
---|
1008 | set_namelist namelist_cfg nn_it000 $(( ${ITEND} / 2 + 1 )) |
---|
1009 | set_namelist namelist_cfg nn_itend ${ITEND} |
---|
1010 | set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 )) |
---|
1011 | set_namelist namelist_cfg sn_cfctl%l_runstat .true. |
---|
1012 | set_namelist namelist_cfg ln_rstart .true. |
---|
1013 | set_namelist namelist_cfg nn_rstctl 2 |
---|
1014 | set_namelist namelist_cfg cn_ocerst_in \"SWG_LONG_${ITRST}_restart\" |
---|
1015 | |
---|
1016 | #if [ ${SETTE_TIMING} == "yes" ] ; then set_namelist namelist_cfg ln_timing .true. ; fi |
---|
1017 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
1018 | set_xio_using_server iodef.xml true |
---|
1019 | else |
---|
1020 | set_xio_using_server iodef.xml false |
---|
1021 | fi |
---|
1022 | if [ $NPROC -eq 1 ] ; then |
---|
1023 | ln -sf ../LONG/SWG_LONG_${ITRST}_restart.nc . |
---|
1024 | else |
---|
1025 | for (( i=1; i<=$NPROC; i++)) ; do |
---|
1026 | L_NPROC=$(( $i - 1 )) |
---|
1027 | L_NPROC=`printf "%04d\n" ${L_NPROC}` |
---|
1028 | ln -sf ../LONG/SWG_LONG_${ITRST}_restart_${L_NPROC}.nc . |
---|
1029 | done |
---|
1030 | fi |
---|
1031 | cd ${SETTE_DIR} |
---|
1032 | . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} |
---|
1033 | cd ${SETTE_DIR} |
---|
1034 | . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} |
---|
1035 | fi |
---|
1036 | |
---|
1037 | if [ ${config} == "SWG" ] && [ ${DO_REPRO} == "1" ] && [ ${NOT_USING_QCO} == "no" ] ; then |
---|
1038 | |
---|
1039 | ## Reproducibility tests for SWG |
---|
1040 | export TEST_NAME="REPRO_2_3" |
---|
1041 | cd ${MAIN_DIR} |
---|
1042 | cd ${SETTE_DIR} |
---|
1043 | . ./param.cfg |
---|
1044 | . ./all_functions.sh |
---|
1045 | . ./prepare_exe_dir.sh |
---|
1046 | set_valid_dir |
---|
1047 | clean_valid_dir |
---|
1048 | JOB_FILE=${EXE_DIR}/run_job.sh |
---|
1049 | NPROC=6 |
---|
1050 | if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi |
---|
1051 | cd ${EXE_DIR} |
---|
1052 | set_namelist namelist_cfg cn_exp \"SWG_23\" |
---|
1053 | set_namelist namelist_cfg nn_it000 1 |
---|
1054 | set_namelist namelist_cfg nn_itend ${ITEND} |
---|
1055 | set_namelist namelist_cfg nn_stock ${ITEND} |
---|
1056 | set_namelist namelist_cfg jpni 2 |
---|
1057 | set_namelist namelist_cfg jpnj 3 |
---|
1058 | set_namelist namelist_cfg sn_cfctl%l_runstat .true. |
---|
1059 | set_namelist namelist_cfg sn_cfctl%l_prtctl .true. |
---|
1060 | |
---|
1061 | |
---|
1062 | #if [ ${SETTE_TIMING} == "yes" ] ; then set_namelist namelist_cfg ln_timing .true. ; fi |
---|
1063 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
1064 | set_xio_using_server iodef.xml true |
---|
1065 | else |
---|
1066 | set_xio_using_server iodef.xml false |
---|
1067 | fi |
---|
1068 | cd ${SETTE_DIR} |
---|
1069 | . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} |
---|
1070 | cd ${SETTE_DIR} |
---|
1071 | . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} |
---|
1072 | |
---|
1073 | cd ${SETTE_DIR} |
---|
1074 | export TEST_NAME="REPRO_3_2" |
---|
1075 | . ./prepare_exe_dir.sh |
---|
1076 | set_valid_dir |
---|
1077 | clean_valid_dir |
---|
1078 | JOB_FILE=${EXE_DIR}/run_job.sh |
---|
1079 | NPROC=6 |
---|
1080 | if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi |
---|
1081 | cd ${EXE_DIR} |
---|
1082 | |
---|
1083 | set_namelist namelist_cfg cn_exp \"SWG_32\" |
---|
1084 | set_namelist namelist_cfg nn_it000 1 |
---|
1085 | set_namelist namelist_cfg nn_itend ${ITEND} |
---|
1086 | set_namelist namelist_cfg nn_stock ${ITEND} |
---|
1087 | set_namelist namelist_cfg jpni 3 |
---|
1088 | set_namelist namelist_cfg jpnj 2 |
---|
1089 | set_namelist namelist_cfg sn_cfctl%l_runstat .true. |
---|
1090 | set_namelist namelist_cfg sn_cfctl%l_prtctl .true. |
---|
1091 | |
---|
1092 | #if [ ${SETTE_TIMING} == "yes" ] ; then set_namelist namelist_cfg ln_timing .true. ; fi |
---|
1093 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
1094 | set_xio_using_server iodef.xml true |
---|
1095 | else |
---|
1096 | set_xio_using_server iodef.xml false |
---|
1097 | fi |
---|
1098 | cd ${SETTE_DIR} |
---|
1099 | . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} |
---|
1100 | cd ${SETTE_DIR} |
---|
1101 | . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} |
---|
1102 | |
---|
1103 | fi |
---|
1104 | |
---|
1105 | |
---|
1106 | |
---|
1107 | #---- |
---|
1108 | done |
---|
1109 | # |
---|
1110 | # Return to SETTE_DIR (last fcm_job.sh will have moved to EXE_DIR) |
---|
1111 | cd ${SETTE_DIR} |
---|