source: utils/CI/sette/sette_test-cases.sh

Last change on this file was 13382, checked in by mathiot, 6 weeks ago

sette: replace SPITZ12 and ISOMIP by ISOMIP+; Fix minor bug in sync_config() (ie sette -s option) in case MY_SRC directory does not exist.

  • Property svn:executable set to *
File size: 29.4 KB
Line 
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
17set -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_iomput
34#                      "yes" to compile using key_iomput and link to the external XIOS library
35#                      "no"  to compile without key_iomput 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#
43# Principal script is sette_test-cases.sh, that calls
44#
45#  makenemo  : to create successive exectuables in ${CONFIG_NAME}/BLD/bin/nemo.exe
46#              and links to nemo in ${CONFIG_NAME}/EXP00)
47#
48#  param.cfg : sets and loads following directories:
49#
50#   FORCING_DIR         : is the directory for forcing files (tarfile)
51#   INPUT_DIR           : is the directory for input files storing
52#   TMPDIR              : is the temporary directory (if needed)
53#   NEMO_VALIDATION_DIR : is the validation directory
54#
55#   (NOTE: this file is the same for all configrations to be tested with sette_test-cases.sh)
56#
57#   all_functions.sh : loads functions used by sette (note: new functions can be added here)
58#   set_namelist     : function declared in all_functions that sets namelist parameters
59#   post_test_tidyup : creates validation storage directory and copies required output files
60#                      (run.stat and ocean.output) in it after execution of test.
61#
62#  VALIDATION tree is:
63#
64#   NEMO_VALIDATION_DIR/WCONFIG_NAME/WCOMPILER_NAME/TEST_NAME/REVISION_NUMBER(or DATE)
65#
66#  prepare_exe_dir.sh : defines and creates directory where the test is executed
67#                       execution directory takes name of TEST_NAME defined for every test
68#                       in sette_test-cases.sh. (each test in executed in its own directory)
69#
70#  set_valid_dir       : rename ocean.output/run.stat and tracer.stat to avoid checking them in the report
71#
72#  clean_valid_dir    : rename ocean.output/run.stat and tracer.stat to avoid checking them in the report
73#                       ( not doing it could lead to false positive )
74#
75#  prepare_job.sh     : to generate the script run_job.sh
76#
77#  fcm_job.sh         : run in batch (INTERACT_FLAG="no") or interactive (INTERACT_FLAG="yes")
78#                        see sette_test-cases.sh and BATCH_TEMPLATE directory
79#
80#  NOTE: jobs requiring initial or forcing data need to have an input_CONFIG.cfg in which
81#        can be found paths to the input tar file)
82#  NOTE: if job is not launched for any reason you have the executable ready in ${EXE_DIR}
83#        directory
84#  NOTE: the changed namelists are left in ${EXE_DIR} directory whereas original namelists
85#        remain in ${NEW_CONF}/EXP00
86#
87#  NOTE: a log file, output.sette, is created in ${SETTE_DIR} with the echoes of
88#        executed commands
89#
90#  NOTE: if sette_test-cases.sh is stopped in output.sette there is written the last command
91#        executed by sette_test-cases.sh
92#
93# example use: ./sette_test-cases.sh
94#########################################################################################
95#
96# LOAD param value
97SETTE_DIR=$(cd $(dirname "$0"); pwd)
98MAIN_DIR=$(dirname $SETTE_DIR)
99. ./param.cfg
100
101export BATCH_COMMAND_PAR=${BATCH_CMD}
102export BATCH_COMMAND_SEQ=${BATCH_CMD}
103export INTERACT_FLAG="no"
104export MPIRUN_FLAG="yes"
105#
106export DEL_KEYS="key_iomput"
107if [ ${USING_XIOS} == "yes" ] 
108 then
109   export DEL_KEYS=""
110fi
111#
112export ADD_KEYS=""
113if [ ${ADD_NOSIGNEDZERO} == "yes" ]
114 then
115   export ADD_KEYS="key_nosignedzero"
116fi
117#
118# Settings which control the use of stand alone servers (only relevant if using xios)
119#
120export NUM_XIOSERVERS=4
121export JOB_PREFIX=${JOB_PREFIX_MPMD}
122#
123if [ ${USING_MPMD} == "no" ] 
124 then
125   export NUM_XIOSERVERS=0
126   export JOB_PREFIX=${JOB_PREFIX_NOMPMD}
127fi
128#
129#
130if [ ${USING_MPMD} == "yes" ] && [ ${USING_XIOS} == "no" ]
131 then
132   echo "Incompatible choices. MPMD mode requires the XIOS server"
133   exit
134fi
135
136# Directory to run the tests
137CONFIG_DIR0=${MAIN_DIR}/cfgs
138TOOLS_DIR=${MAIN_DIR}/tools
139
140CMP_NAM=${1:-$COMPILER}
141# Copy job_batch_COMPILER file for specific compiler into job_batch_template
142cd ${SETTE_DIR}
143cp BATCH_TEMPLATE/${JOB_PREFIX}-${COMPILER} job_batch_template || exit
144# Description of configuration tested:
145# OVERFLOW       : TEST s-coordinates : (tracers) Advection schemes: FCT2, FCT4, ubs
146#                                     & (dynamics) advection schemes: flux form (ubs, centered), vector form (een)
147#                       zps-coordinates : (tracers) Advection schemes: FCT2, FCT4, ubs
148#                                     & (dynamics) advection schemes: flux form (ubs, centered), vector form (een, and een + Hollingsworth correction)
149# LOCK_EXCHANGE  :
150# VORTEX         :
151# ICE_AGRIF      :
152# ISOMIP+         :
153# WAD
154
155
156for config in ${TEST_CONFIGS}
157do
158
159# ---------
160#  OVERFLOW
161# ---------
162if [ ${config} == "OVERFLOW" ] ;  then
163    ## Restartability tests for OVERFLOW
164    export TEST_NAME="LONG"
165    cd ${MAIN_DIR}
166    #
167    . ${SETTE_DIR}/all_functions.sh
168    #
169    clean_config OVERFLOW OVERFLOW_ST 'tests'
170    #
171    sync_config  OVERFLOW OVERFLOW_ST 'tests'
172    #
173    . ./makenemo -m ${CMP_NAM} -n OVERFLOW_ST -a OVERFLOW -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
174    cd ${SETTE_DIR}
175    . ./param.cfg
176    . ./all_functions.sh
177    . ./prepare_exe_dir.sh
178    set_valid_dir
179    clean_valid_dir
180    JOB_FILE=${EXE_DIR}/run_job.sh
181    NPROC=1
182    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
183    cd ${EXE_DIR} 
184    set_namelist namelist_cfg cn_exp \"OVF_LONG\"
185    set_namelist namelist_cfg nn_it000 1
186    set_namelist namelist_cfg nn_itend 120
187    set_namelist namelist_cfg nn_stock 60
188    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
189    if [ ${USING_MPMD} == "yes" ] ; then
190       set_xio_using_server iodef.xml true
191    else
192       set_xio_using_server iodef.xml false
193    fi
194    cd ${SETTE_DIR}
195    . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
196
197    cd ${SETTE_DIR}
198    export TEST_NAME="SHORT"
199    . ./prepare_exe_dir.sh
200    set_valid_dir
201    clean_valid_dir
202    cd ${EXE_DIR}
203    set_namelist namelist_cfg cn_exp \"OVF_SHORT\"
204    set_namelist namelist_cfg nn_it000 61
205    set_namelist namelist_cfg nn_itend 120
206    set_namelist namelist_cfg nn_stock 60
207    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
208    set_namelist namelist_cfg ln_rstart .true.
209    set_namelist namelist_cfg nn_rstctl 2
210    set_namelist namelist_cfg cn_ocerst_in \"OVF_LONG_00000060_restart\"
211    if [ ${USING_MPMD} == "yes" ] ; then
212       set_xio_using_server iodef.xml true
213    else
214       set_xio_using_server iodef.xml false
215    fi
216    ln -sf ../LONG/OVF_LONG_00000060_restart.nc .
217
218    cd ${SETTE_DIR}
219    . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
220    cd ${SETTE_DIR}
221    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
222
223
224    ## Test for all advection, vert. coordinates, vector form, flux form: test runability and complete all time steps
225    ## Needed namelist-xxxx for every type of run tested
226    cd ${CONFIG_DIR}/${NEW_CONF}/EXP00
227
228    for file in $(echo `ls namelist_*_cfg `) ; do
229        TEST_NAME=`echo $file | sed -e "s/namelist_//" | sed -e "s/_cfg//"`
230        TEST_NAME="EXP-${TEST_NAME}"
231        if [ ! -d ${CONFIG_DIR}/${NEW_CONF}/${TEST_NAME} ] ; then mkdir ${CONFIG_DIR}/${NEW_CONF}/${TEST_NAME} ; fi
232        export TEST_NAME="${TEST_NAME}"
233         ##
234        cd ${SETTE_DIR}
235        . ./param.cfg
236        . ./all_functions.sh
237        . ./prepare_exe_dir.sh
238        set_valid_dir
239        clean_valid_dir
240        JOB_FILE=${EXE_DIR}/run_job.sh
241        NPROC=1
242        if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
243        cd ${EXE_DIR}
244        rm namelist_*_*_*_*
245        cp -pL ${CONFIG_DIR}/${NEW_CONF}/EXP00/$file namelist_cfg
246        if [ ${USING_MPMD} == "yes" ] ; then
247           set_xio_using_server iodef.xml true
248        else
249           set_xio_using_server iodef.xml false
250        fi
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     done
257fi
258
259# --------------
260#  LOCK_EXCHANGE
261# --------------
262if [ ${config} == "LOCK_EXCHANGE" ] ;  then
263    ## Restartability tests for LOCK_EXCHANGE
264    export TEST_NAME="LONG"
265    cd ${MAIN_DIR}
266    #
267    # syncronisation if target directory/file exist (not done by makenemo)
268    . ${SETTE_DIR}/all_functions.sh
269    #
270    clean_config LOCK_EXCHANGE LOCK_EXCHANGE_ST 'tests'
271    #
272    sync_config  LOCK_EXCHANGE LOCK_EXCHANGE_ST 'tests'
273    #
274    . ./makenemo -m ${CMP_NAM} -n LOCK_EXCHANGE_ST -a LOCK_EXCHANGE -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
275    cd ${SETTE_DIR}
276    . ./param.cfg
277    . ./all_functions.sh
278    . ./prepare_exe_dir.sh
279    set_valid_dir
280    clean_valid_dir
281    JOB_FILE=${EXE_DIR}/run_job.sh
282    NPROC=1
283    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
284    cd ${EXE_DIR}
285    set_namelist namelist_cfg cn_exp \"LOCK_LONG\"
286    set_namelist namelist_cfg nn_it000 1
287    set_namelist namelist_cfg nn_stock 60
288    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
289    set_namelist namelist_cfg nn_itend 120
290    if [ ${USING_MPMD} == "yes" ] ; then
291       set_xio_using_server iodef.xml true
292    else
293       set_xio_using_server iodef.xml false
294    fi
295    cd ${SETTE_DIR}
296    . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
297
298    cd ${SETTE_DIR}
299    export TEST_NAME="SHORT"
300    . ./prepare_exe_dir.sh
301    set_valid_dir
302    clean_valid_dir
303    cd ${EXE_DIR}
304    set_namelist namelist_cfg cn_exp \"LOCK_SHORT\"
305    set_namelist namelist_cfg nn_it000 61
306    set_namelist namelist_cfg nn_itend 120
307    set_namelist namelist_cfg nn_stock 60
308    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
309    set_namelist namelist_cfg ln_rstart .true.
310    set_namelist namelist_cfg nn_rstctl 2
311    set_namelist namelist_cfg cn_ocerst_in \"LOCK_LONG_00000060_restart\"
312    if [ ${USING_MPMD} == "yes" ] ; then
313       set_xio_using_server iodef.xml true
314    else
315       set_xio_using_server iodef.xml false
316    fi
317    ln -sf ../LONG/LOCK_LONG_00000060_restart.nc .
318
319    cd ${SETTE_DIR}
320    . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
321    cd ${SETTE_DIR}
322    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
323
324    ## Test for all advection, vector form, flux form: test runability and complete all time steps
325    ## Needed namelist-xxxx for every type of run tested
326    cd ${CONFIG_DIR}/${NEW_CONF}/EXP00
327
328    for file in $(echo `ls namelist_*_cfg `) ; do
329        echo ''
330        TEST_NAME=`echo $file | sed -e "s/namelist_//" | sed -e "s/_cfg//"`
331        TEST_NAME="EXP-${TEST_NAME}"
332        `mkdir ${CONFIG_DIR}/${NEW_CONF}/${TEST_NAME}`
333        export TEST_NAME="${TEST_NAME}"
334        ## 
335        cd ${SETTE_DIR}
336        . ./param.cfg
337        . ./all_functions.sh
338        . ./prepare_exe_dir.sh
339        set_valid_dir
340        clean_valid_dir
341        JOB_FILE=${EXE_DIR}/run_job.sh
342        NPROC=1
343        if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
344        cd ${EXE_DIR}
345        rm namelist_*_*_*_*
346        cp -pL ${CONFIG_DIR}/${NEW_CONF}/EXP00/$file namelist_cfg
347        if [ ${USING_MPMD} == "yes" ] ; then
348           set_xio_using_server iodef.xml true
349        else
350           set_xio_using_server iodef.xml false
351        fi
352        cd ${SETTE_DIR}
353        . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
354        cd ${SETTE_DIR}
355        . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
356        ##
357        echo ''
358   done
359fi
360
361# ---------
362# VORTEX
363# ---------
364if [ ${config} == "VORTEX" ] ;  then 
365## Restartability tests for VORTEX
366    export TEST_NAME="LONG"
367    cd ${MAIN_DIR}
368    #
369    # syncronisation if target directory/file exist (not done by makenemo)
370    . ${SETTE_DIR}/all_functions.sh
371    #
372    clean_config VORTEX VORTEX_ST 'tests'
373    #
374    sync_config  VORTEX VORTEX_ST 'tests'
375    #
376    . ./makenemo -m ${CMP_NAM} -n VORTEX_ST -a VORTEX -j 8  add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
377    cd ${SETTE_DIR}
378    . ./param.cfg
379    . ./all_functions.sh
380    . ./prepare_exe_dir.sh
381    set_valid_dir
382    clean_valid_dir
383    JOB_FILE=${EXE_DIR}/run_job.sh
384    NPROC=6
385    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
386    cd ${EXE_DIR}
387    set_namelist namelist_cfg cn_exp \"VORTEX_LONG\"
388    set_namelist namelist_cfg nn_it000 1
389    set_namelist namelist_cfg nn_itend 240
390    set_namelist namelist_cfg nn_stock 120
391    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
392
393    set_namelist 1_namelist_cfg cn_exp \"VORTEX_LONG\"
394    set_namelist 1_namelist_cfg nn_it000 1
395    set_namelist 1_namelist_cfg nn_itend 720
396    set_namelist 1_namelist_cfg nn_stock 360
397    set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true.
398   
399    if [ ${USING_MPMD} == "yes" ] ; then
400        set_xio_using_server iodef.xml true
401    else
402        set_xio_using_server iodef.xml false
403    fi
404    cd ${SETTE_DIR}
405    . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
406   
407    cd ${SETTE_DIR}
408    export TEST_NAME="SHORT"
409    . ./prepare_exe_dir.sh
410    set_valid_dir
411    clean_valid_dir
412    cd ${EXE_DIR}
413    set_namelist namelist_cfg cn_exp \"VORTEX_SHORT\"
414    set_namelist namelist_cfg nn_it000 121
415    set_namelist namelist_cfg nn_itend 240
416    set_namelist namelist_cfg nn_stock 120
417    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
418    set_namelist namelist_cfg ln_rstart .true.
419    set_namelist namelist_cfg nn_rstctl 2
420    set_namelist namelist_cfg cn_ocerst_in \"VORTEX_LONG_00000120_restart\"
421   
422    set_namelist 1_namelist_cfg cn_exp \"VORTEX_SHORT\"
423    set_namelist 1_namelist_cfg nn_it000 361
424    set_namelist 1_namelist_cfg nn_itend 720
425    set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true.
426    set_namelist 1_namelist_cfg nn_stock 360
427    set_namelist 1_namelist_cfg ln_rstart .true.
428    set_namelist 1_namelist_cfg nn_rstctl 2
429    set_namelist 1_namelist_cfg cn_ocerst_in \"VORTEX_LONG_00000360_restart\"
430     
431    if [ ${USING_MPMD} == "yes" ] ; then
432        set_xio_using_server iodef.xml true
433    else
434        set_xio_using_server iodef.xml false
435    fi
436    if [ $NPROC -eq 1 ] ;  then
437        ln -sf ../LONG/VORTEX_LONG_00000120_restart.nc .
438        ln -sf ../LONG/1_VORTEX_LONG_00000360_restart.nc .
439    else
440        for (( i=1; i<=$NPROC; i++)) ; do
441            L_NPROC=$(( $i - 1 ))
442            L_NPROC=`printf "%04d\n" ${L_NPROC}`
443            ln -sf ../LONG/VORTEX_LONG_00000120_restart_${L_NPROC}.nc .
444            ln -sf ../LONG/1_VORTEX_LONG_00000360_restart_${L_NPROC}.nc .
445        done
446    fi
447    cd ${SETTE_DIR}
448    . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
449    cd ${SETTE_DIR}
450    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
451
452## Reproducibility tests for VORTEX
453    export TEST_NAME="REPRO_2_3"
454    cd ${MAIN_DIR}
455    cd ${SETTE_DIR}
456    . ./param.cfg
457    . ./all_functions.sh
458    . ./prepare_exe_dir.sh
459    set_valid_dir
460    clean_valid_dir
461    JOB_FILE=${EXE_DIR}/run_job.sh
462    NPROC=6
463    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
464    cd ${EXE_DIR}
465    set_namelist namelist_cfg cn_exp \"VORTEX_23\"
466    set_namelist namelist_cfg nn_it000 1
467    set_namelist namelist_cfg nn_itend 240
468    set_namelist namelist_cfg nn_stock 120
469    set_namelist namelist_cfg jpni 2
470    set_namelist namelist_cfg jpnj 3
471    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
472   
473    set_namelist 1_namelist_cfg cn_exp \"VORTEX_23\"
474    set_namelist 1_namelist_cfg nn_it000 1
475    set_namelist 1_namelist_cfg nn_itend 720
476    set_namelist 1_namelist_cfg nn_stock 360
477    set_namelist 1_namelist_cfg jpni 2
478    set_namelist 1_namelist_cfg jpnj 3
479    set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true.
480
481    if [ ${USING_MPMD} == "yes" ] ; then
482       set_xio_using_server iodef.xml true
483    else
484       set_xio_using_server iodef.xml false
485    fi
486    cd ${SETTE_DIR}
487    . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
488    cd ${SETTE_DIR}
489    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
490
491    cd ${SETTE_DIR}
492    export TEST_NAME="REPRO_3_2"
493    . ./prepare_exe_dir.sh
494    set_valid_dir
495    clean_valid_dir
496    JOB_FILE=${EXE_DIR}/run_job.sh
497    NPROC=6
498    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
499    cd ${EXE_DIR}
500
501    set_namelist namelist_cfg cn_exp \"VORTEX_32\"
502    set_namelist namelist_cfg nn_it000 1
503    set_namelist namelist_cfg nn_itend 240
504    set_namelist namelist_cfg nn_stock 120
505    set_namelist namelist_cfg jpni 3
506    set_namelist namelist_cfg jpnj 2
507    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
508
509    set_namelist 1_namelist_cfg cn_exp \"VORTEX_32\"
510    set_namelist 1_namelist_cfg nn_it000 1
511    set_namelist 1_namelist_cfg nn_itend 720
512    set_namelist 1_namelist_cfg nn_stock 360
513    set_namelist 1_namelist_cfg jpni 3
514    set_namelist 1_namelist_cfg jpnj 2
515    set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true.
516
517    if [ ${USING_MPMD} == "yes" ] ; then
518       set_xio_using_server iodef.xml true
519    else
520       set_xio_using_server iodef.xml false
521    fi
522    cd ${SETTE_DIR}
523    . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
524    cd ${SETTE_DIR}
525    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
526
527fi
528
529
530# ---------
531# ICE_AGRIF
532# ---------
533if [ ${config} == "ICE_AGRIF" ] ;  then 
534## Restartability tests for ICE_AGRIF
535    export TEST_NAME="LONG"
536    cd ${MAIN_DIR}
537    #
538    # syncronisation if target directory/file exist (not done by makenemo)
539    . ${SETTE_DIR}/all_functions.sh
540    #
541    clean_config ICE_AGRIF ICE_AGRIF_ST 'tests'
542    #
543    sync_config  ICE_AGRIF ICE_AGRIF_ST 'tests'
544    #
545    . ./makenemo -m ${CMP_NAM} -n ICE_AGRIF_ST -a ICE_AGRIF -j 8  add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
546    cd ${SETTE_DIR}
547    . ./param.cfg
548    . ./all_functions.sh
549    . ./prepare_exe_dir.sh
550    set_valid_dir
551    clean_valid_dir
552    JOB_FILE=${EXE_DIR}/run_job.sh
553    NPROC=6
554    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
555    cd ${EXE_DIR}
556    set_namelist namelist_cfg cn_exp \"ICE_AGRIF_LONG\"
557    set_namelist namelist_cfg nn_it000 1
558    set_namelist namelist_cfg nn_itend 200
559    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
560    set_namelist namelist_cfg nn_stock 100
561   
562    set_namelist 1_namelist_cfg cn_exp \"ICE_AGRIF_LONG\"
563    set_namelist 1_namelist_cfg nn_it000 1
564    set_namelist 1_namelist_cfg nn_itend 600
565    set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true.
566    set_namelist 1_namelist_cfg nn_stock 300
567   
568    if [ ${USING_MPMD} == "yes" ] ; then
569        set_xio_using_server iodef.xml true
570    else
571        set_xio_using_server iodef.xml false
572    fi
573    cd ${SETTE_DIR}
574    . ./prepare_job.sh input_ICE_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
575   
576    cd ${SETTE_DIR}
577    export TEST_NAME="SHORT"
578    . ./prepare_exe_dir.sh
579    set_valid_dir
580    clean_valid_dir
581    cd ${EXE_DIR}
582    set_namelist namelist_cfg cn_exp \"ICE_AGRIF_SHORT\"
583    set_namelist namelist_cfg nn_it000 101
584    set_namelist namelist_cfg nn_itend 200
585    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
586    set_namelist namelist_cfg nn_stock 100
587    set_namelist namelist_cfg ln_rstart .true.
588    set_namelist namelist_cfg nn_rstctl 2
589    set_namelist namelist_cfg cn_ocerst_in \"ICE_AGRIF_LONG_00000100_restart\"
590    set_namelist namelist_ice_cfg cn_icerst_in \"ICE_AGRIF_LONG_00000100_restart_ice\"
591   
592    set_namelist 1_namelist_cfg cn_exp \"ICE_AGRIF_SHORT\"
593    set_namelist 1_namelist_cfg nn_it000 301
594    set_namelist 1_namelist_cfg nn_itend 600
595    set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true.
596    set_namelist 1_namelist_cfg nn_stock 300
597    set_namelist 1_namelist_cfg ln_rstart .true.
598    set_namelist 1_namelist_cfg nn_rstctl 2
599    set_namelist 1_namelist_cfg cn_ocerst_in \"ICE_AGRIF_LONG_00000300_restart\"
600    set_namelist 1_namelist_ice_cfg cn_icerst_in \"ICE_AGRIF_LONG_00000300_restart_ice\"
601   
602   
603    if [ ${USING_MPMD} == "yes" ] ; then
604        set_xio_using_server iodef.xml true
605    else
606        set_xio_using_server iodef.xml false
607    fi
608    if [ $NPROC -eq 1 ] ;  then
609        ln -sf ../LONG/ICE_AGRIF_LONG_00000100_restart.nc .
610        ln -sf ../LONG/ICE_AGRIF_LONG_00000100_restart_ice.nc .
611        ln -sf ../LONG/1_ICE_AGRIF_LONG_00000300_restart.nc .
612        ln -sf ../LONG/1_ICE_AGRIF_LONG_00000300_restart_ice.nc .
613    else
614        for (( i=1; i<=$NPROC; i++)) ; do
615            L_NPROC=$(( $i - 1 ))
616            L_NPROC=`printf "%04d\n" ${L_NPROC}`
617            ln -sf ../LONG/ICE_AGRIF_LONG_00000100_restart_${L_NPROC}.nc .
618            ln -sf ../LONG/ICE_AGRIF_LONG_00000100_restart_ice_${L_NPROC}.nc .
619            ln -sf ../LONG/1_ICE_AGRIF_LONG_00000300_restart_${L_NPROC}.nc .
620            ln -sf ../LONG/1_ICE_AGRIF_LONG_00000300_restart_ice_${L_NPROC}.nc .
621        done
622    fi
623
624    cd ${SETTE_DIR}
625    . ./prepare_job.sh input_ICE_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
626    cd ${SETTE_DIR}
627    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
628
629
630## Reproducibility tests for ICE_AGRIF
631    export TEST_NAME="REPRO_2_3"
632    cd ${MAIN_DIR}
633    cd ${SETTE_DIR}
634    . ./param.cfg
635    . ./all_functions.sh
636    . ./prepare_exe_dir.sh
637    set_valid_dir
638    clean_valid_dir
639    JOB_FILE=${EXE_DIR}/run_job.sh
640    NPROC=6
641    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
642    cd ${EXE_DIR}
643    set_namelist namelist_cfg cn_exp \"ICE_AGRIF_23\"
644    set_namelist namelist_cfg nn_it000 1
645    set_namelist namelist_cfg nn_itend 200
646    set_namelist namelist_cfg nn_stock 100
647    set_namelist namelist_cfg jpni 2
648    set_namelist namelist_cfg jpnj 3
649    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
650   
651    set_namelist 1_namelist_cfg cn_exp \"ICE_AGRIF_23\"
652    set_namelist 1_namelist_cfg nn_it000 1
653    set_namelist 1_namelist_cfg nn_itend 600
654    set_namelist 1_namelist_cfg nn_stock 300
655    set_namelist 1_namelist_cfg jpni 2
656    set_namelist 1_namelist_cfg jpnj 3
657    set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true.
658
659    if [ ${USING_MPMD} == "yes" ] ; then
660       set_xio_using_server iodef.xml true
661    else
662       set_xio_using_server iodef.xml false
663    fi
664    cd ${SETTE_DIR}
665    . ./prepare_job.sh input_ICE_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
666    cd ${SETTE_DIR}
667    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
668
669    cd ${SETTE_DIR}
670    export TEST_NAME="REPRO_3_2"
671    . ./prepare_exe_dir.sh
672    set_valid_dir
673    clean_valid_dir
674    JOB_FILE=${EXE_DIR}/run_job.sh
675    NPROC=6
676    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
677    cd ${EXE_DIR}
678
679    set_namelist namelist_cfg cn_exp \"ICE_AGRIF_32\"
680    set_namelist namelist_cfg nn_it000 1
681    set_namelist namelist_cfg nn_itend 200
682    set_namelist namelist_cfg nn_stock 100
683    set_namelist namelist_cfg jpni 3
684    set_namelist namelist_cfg jpnj 2
685    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
686   
687    set_namelist 1_namelist_cfg cn_exp \"ICE_AGRIF_32\"
688    set_namelist 1_namelist_cfg nn_it000 1
689    set_namelist 1_namelist_cfg nn_itend 600
690    set_namelist 1_namelist_cfg nn_stock 300
691    set_namelist 1_namelist_cfg jpni 3
692    set_namelist 1_namelist_cfg jpnj 2
693    set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true.
694   
695    if [ ${USING_MPMD} == "yes" ] ; then
696       set_xio_using_server iodef.xml true
697    else
698       set_xio_using_server iodef.xml false
699    fi
700    cd ${SETTE_DIR}
701    . ./prepare_job.sh input_ICE_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
702    cd ${SETTE_DIR}
703    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
704
705fi
706
707# ------
708# ISOMIP+
709# ------
710if [ ${config} == "ISOMIP+" ] ;  then
711## Restartability tests
712    export TEST_NAME="LONG"
713    cd ${MAIN_DIR}
714    #
715    # syncronisation if target directory/file exist (not done by makenemo)
716    . ${SETTE_DIR}/all_functions.sh
717    #
718    clean_config ISOMIP+ ISOMIP+_ST 'tests'
719    #
720    sync_config  ISOMIP+ ISOMIP+_ST 'tests'
721    #
722    . ./makenemo -m ${CMP_NAM} -n ISOMIP+_ST -a ISOMIP+ -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
723    cd ${SETTE_DIR}
724    . ./param.cfg
725    . ./all_functions.sh
726    . ./prepare_exe_dir.sh
727    set_valid_dir
728    clean_valid_dir
729    JOB_FILE=${EXE_DIR}/run_job.sh
730    NPROC=27
731    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
732    cd ${EXE_DIR}
733    set_namelist namelist_cfg cn_exp \"ISOMIP+_LONG\"
734    set_namelist namelist_cfg nn_it000 1
735    set_namelist namelist_cfg nn_itend 1200
736    set_namelist namelist_cfg nn_stock 600
737    set_namelist namelist_cfg jpni 9
738    set_namelist namelist_cfg jpnj 3
739    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
740    if [ ${USING_MPMD} == "yes" ] ; then
741       set_xio_using_server iodef.xml true
742    else
743       set_xio_using_server iodef.xml false
744    fi
745    cd ${SETTE_DIR}
746    . ./prepare_job.sh input_ISOMIP+.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
747
748    cd ${SETTE_DIR}
749    export TEST_NAME="SHORT"
750    . ./prepare_exe_dir.sh
751    set_valid_dir
752    clean_valid_dir
753    cd ${EXE_DIR}
754    set_namelist namelist_cfg cn_exp \"ISOMIP+_SHORT\"
755    set_namelist namelist_cfg nn_it000 601
756    set_namelist namelist_cfg nn_itend 1200
757    set_namelist namelist_cfg nn_stock 600
758    set_namelist namelist_cfg ln_rstart .true.
759    set_namelist namelist_cfg nn_rstctl 2
760    set_namelist namelist_cfg jpni 9
761    set_namelist namelist_cfg jpnj 3
762    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
763    set_namelist namelist_cfg cn_ocerst_in \"ISOMIP+_LONG_00000600_restart\"
764    if [ ${USING_MPMD} == "yes" ] ; then
765       set_xio_using_server iodef.xml true
766    else
767       set_xio_using_server iodef.xml false
768    fi
769    for (( i=1; i<=$NPROC; i++)) ; do
770        L_NPROC=$(( $i - 1 ))
771        L_NPROC=`printf "%04d\n" ${L_NPROC}`
772        ln -sf ../LONG/ISOMIP+_LONG_00000600_restart_${L_NPROC}.nc .
773    done
774
775    cd ${SETTE_DIR}
776    . ./prepare_job.sh input_ISOMIP+.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
777    cd ${SETTE_DIR}
778    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
779
780## Reproducibility tests
781    export TEST_NAME="REPRO_9_3"
782    cd ${MAIN_DIR}
783    cd ${SETTE_DIR}
784    . ./param.cfg
785    . ./all_functions.sh
786    . ./prepare_exe_dir.sh
787    set_valid_dir
788    clean_valid_dir
789    JOB_FILE=${EXE_DIR}/run_job.sh
790    NPROC=27
791    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
792    cd ${EXE_DIR}
793    set_namelist namelist_cfg cn_exp \"ISOMIP+_93\"
794    set_namelist namelist_cfg nn_it000 1
795    set_namelist namelist_cfg nn_itend 600
796    set_namelist namelist_cfg jpni 9
797    set_namelist namelist_cfg jpnj 3
798    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
799    if [ ${USING_MPMD} == "yes" ] ; then
800       set_xio_using_server iodef.xml true
801    else
802       set_xio_using_server iodef.xml false
803    fi
804    cd ${SETTE_DIR}
805    . ./prepare_job.sh input_ISOMIP+.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
806    cd ${SETTE_DIR}
807    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
808
809    cd ${SETTE_DIR}
810    export TEST_NAME="REPRO_8_4"
811    . ./prepare_exe_dir.sh
812    set_valid_dir
813    clean_valid_dir
814    JOB_FILE=${EXE_DIR}/run_job.sh
815    NPROC=32
816    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
817    cd ${EXE_DIR}
818    set_namelist namelist_cfg cn_exp \"ISOMIP+_84\"
819    set_namelist namelist_cfg nn_it000 1
820    set_namelist namelist_cfg nn_itend 600
821    set_namelist namelist_cfg jpni 8
822    set_namelist namelist_cfg jpnj 4
823    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
824    if [ ${USING_MPMD} == "yes" ] ; then
825       set_xio_using_server iodef.xml true
826    else
827       set_xio_using_server iodef.xml false
828    fi
829    cd ${SETTE_DIR}
830    . ./prepare_job.sh input_ISOMIP+.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
831    cd ${SETTE_DIR}
832    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
833
834fi
835
836#----
837done
Note: See TracBrowser for help on using the repository browser.