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

Last change on this file since 13559 was 13559, checked in by smasson, 5 months ago

sette: update sette for DEBUG mode, see #2535

  • Property svn:executable set to *
File size: 31.2 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    if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ]
165    then
166   ITEND=12
167    else
168   ITEND=120
169    fi
170    ITRST=$( printf "%08d" $(( ${ITEND} / 2 )) )
171    export TEST_NAME="LONG"
172    cd ${MAIN_DIR}
173    #
174    . ${SETTE_DIR}/all_functions.sh
175    #
176    clean_config OVERFLOW OVERFLOW_ST 'tests'
177    #
178    sync_config  OVERFLOW OVERFLOW_ST 'tests'
179    #
180    . ./makenemo -m ${CMP_NAM} -n OVERFLOW_ST -a OVERFLOW -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
181    cd ${SETTE_DIR}
182    . ./param.cfg
183    . ./all_functions.sh
184    . ./prepare_exe_dir.sh
185    set_valid_dir
186    clean_valid_dir
187    JOB_FILE=${EXE_DIR}/run_job.sh
188    NPROC=1
189    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
190    cd ${EXE_DIR} 
191    set_namelist namelist_cfg cn_exp \"OVF_LONG\"
192    set_namelist namelist_cfg nn_it000 1
193    set_namelist namelist_cfg nn_itend ${ITEND}
194    set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 ))
195    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
196    if [ ${USING_MPMD} == "yes" ] ; then
197       set_xio_using_server iodef.xml true
198    else
199       set_xio_using_server iodef.xml false
200    fi
201    cd ${SETTE_DIR}
202    . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
203
204    cd ${SETTE_DIR}
205    export TEST_NAME="SHORT"
206    . ./prepare_exe_dir.sh
207    set_valid_dir
208    clean_valid_dir
209    cd ${EXE_DIR}
210    set_namelist namelist_cfg cn_exp \"OVF_SHORT\"
211    set_namelist namelist_cfg nn_it000 $(( ${ITEND} / 2 + 1 ))
212    set_namelist namelist_cfg nn_itend ${ITEND}
213    set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 ))
214    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
215    set_namelist namelist_cfg ln_rstart .true.
216    set_namelist namelist_cfg nn_rstctl 2
217    set_namelist namelist_cfg cn_ocerst_in \"OVF_LONG_${ITRST}_restart\"
218    if [ ${USING_MPMD} == "yes" ] ; then
219       set_xio_using_server iodef.xml true
220    else
221       set_xio_using_server iodef.xml false
222    fi
223    ln -sf ../LONG/OVF_LONG_${ITRST}_restart.nc .
224
225    cd ${SETTE_DIR}
226    . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
227    cd ${SETTE_DIR}
228    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
229
230
231    ## Test for all advection, vert. coordinates, vector form, flux form: test runability and complete all time steps
232    ## Needed namelist-xxxx for every type of run tested
233    if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ]
234    then
235   ITEND=12
236    else
237   ITEND=6120
238    fi
239    cd ${CONFIG_DIR}/${NEW_CONF}/EXP00
240
241    for file in $(echo `ls namelist_*_cfg `) ; do
242        TEST_NAME=`echo $file | sed -e "s/namelist_//" | sed -e "s/_cfg//"`
243        TEST_NAME="EXP-${TEST_NAME}"
244        if [ ! -d ${CONFIG_DIR}/${NEW_CONF}/${TEST_NAME} ] ; then mkdir ${CONFIG_DIR}/${NEW_CONF}/${TEST_NAME} ; fi
245        export TEST_NAME="${TEST_NAME}"
246         ##
247        cd ${SETTE_DIR}
248        . ./param.cfg
249        . ./all_functions.sh
250        . ./prepare_exe_dir.sh
251        set_valid_dir
252        clean_valid_dir
253        JOB_FILE=${EXE_DIR}/run_job.sh
254        NPROC=1
255        if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
256        cd ${EXE_DIR}
257        rm namelist_*_*_*_*
258        cp -pL ${CONFIG_DIR}/${NEW_CONF}/EXP00/$file namelist_cfg
259   set_namelist namelist_cfg nn_it000 1
260   set_namelist namelist_cfg nn_itend ${ITEND}
261        if [ ${USING_MPMD} == "yes" ] ; then
262           set_xio_using_server iodef.xml true
263        else
264           set_xio_using_server iodef.xml false
265        fi
266        cd ${SETTE_DIR}
267        . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
268        cd ${SETTE_DIR}
269        . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
270       ##
271     done
272fi
273
274# --------------
275#  LOCK_EXCHANGE
276# --------------
277if [ ${config} == "LOCK_EXCHANGE" ] ;  then
278    ## Restartability tests for LOCK_EXCHANGE
279    if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ]
280    then
281   ITEND=12
282    else
283   ITEND=120
284    fi
285    ITRST=$( printf "%08d" $(( ${ITEND} / 2 )) )
286    export TEST_NAME="LONG"
287    cd ${MAIN_DIR}
288    #
289    # syncronisation if target directory/file exist (not done by makenemo)
290    . ${SETTE_DIR}/all_functions.sh
291    #
292    clean_config LOCK_EXCHANGE LOCK_EXCHANGE_ST 'tests'
293    #
294    sync_config  LOCK_EXCHANGE LOCK_EXCHANGE_ST 'tests'
295    #
296    . ./makenemo -m ${CMP_NAM} -n LOCK_EXCHANGE_ST -a LOCK_EXCHANGE -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
297    cd ${SETTE_DIR}
298    . ./param.cfg
299    . ./all_functions.sh
300    . ./prepare_exe_dir.sh
301    set_valid_dir
302    clean_valid_dir
303    JOB_FILE=${EXE_DIR}/run_job.sh
304    NPROC=1
305    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
306    cd ${EXE_DIR}
307    set_namelist namelist_cfg cn_exp \"LOCK_LONG\"
308    set_namelist namelist_cfg nn_it000 1
309    set_namelist namelist_cfg nn_itend ${ITEND}
310    set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 ))
311    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
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    cd ${SETTE_DIR}
318    . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
319
320    cd ${SETTE_DIR}
321    export TEST_NAME="SHORT"
322    . ./prepare_exe_dir.sh
323    set_valid_dir
324    clean_valid_dir
325    cd ${EXE_DIR}
326    set_namelist namelist_cfg cn_exp \"LOCK_SHORT\"
327    set_namelist namelist_cfg nn_it000 $(( ${ITEND} / 2 + 1 ))
328    set_namelist namelist_cfg nn_itend ${ITEND}
329    set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 ))
330    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
331    set_namelist namelist_cfg ln_rstart .true.
332    set_namelist namelist_cfg nn_rstctl 2
333    set_namelist namelist_cfg cn_ocerst_in \"LOCK_LONG_${ITRST}_restart\"
334    if [ ${USING_MPMD} == "yes" ] ; then
335       set_xio_using_server iodef.xml true
336    else
337       set_xio_using_server iodef.xml false
338    fi
339    ln -sf ../LONG/LOCK_LONG_${ITRST}_restart.nc .
340
341    cd ${SETTE_DIR}
342    . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
343    cd ${SETTE_DIR}
344    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
345
346    ## Test for all advection, vector form, flux form: test runability and complete all time steps
347    ## Needed namelist-xxxx for every type of run tested
348    cd ${CONFIG_DIR}/${NEW_CONF}/EXP00
349
350    for file in $(echo `ls namelist_*_cfg `) ; do
351        echo ''
352        TEST_NAME=`echo $file | sed -e "s/namelist_//" | sed -e "s/_cfg//"`
353        TEST_NAME="EXP-${TEST_NAME}"
354        `mkdir ${CONFIG_DIR}/${NEW_CONF}/${TEST_NAME}`
355        export TEST_NAME="${TEST_NAME}"
356        ## 
357        cd ${SETTE_DIR}
358        . ./param.cfg
359        . ./all_functions.sh
360        . ./prepare_exe_dir.sh
361        set_valid_dir
362        clean_valid_dir
363        JOB_FILE=${EXE_DIR}/run_job.sh
364        NPROC=1
365        if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
366        cd ${EXE_DIR}
367        rm namelist_*_*_*_*
368        cp -pL ${CONFIG_DIR}/${NEW_CONF}/EXP00/$file namelist_cfg
369        if [ ${USING_MPMD} == "yes" ] ; then
370           set_xio_using_server iodef.xml true
371        else
372           set_xio_using_server iodef.xml false
373        fi
374        cd ${SETTE_DIR}
375        . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
376        cd ${SETTE_DIR}
377        . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
378        ##
379        echo ''
380   done
381fi
382
383# ---------
384# VORTEX
385# ---------
386if [ ${config} == "VORTEX" ] ;  then 
387## Restartability tests for VORTEX
388    if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ]
389    then
390   ITEND=12
391    else
392   ITEND=240
393    fi
394    ITRST=$(   printf "%08d" $(( ${ITEND} / 2 )) )
395    ITRST_1=$( printf "%08d" $(( ${ITEND} * 3 / 2 )) )
396    export TEST_NAME="LONG"
397    cd ${MAIN_DIR}
398    #
399    # syncronisation if target directory/file exist (not done by makenemo)
400    . ${SETTE_DIR}/all_functions.sh
401    #
402    clean_config VORTEX VORTEX_ST 'tests'
403    #
404    sync_config  VORTEX VORTEX_ST 'tests'
405    #
406    . ./makenemo -m ${CMP_NAM} -n VORTEX_ST -a VORTEX -j 8  add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
407    cd ${SETTE_DIR}
408    . ./param.cfg
409    . ./all_functions.sh
410    . ./prepare_exe_dir.sh
411    set_valid_dir
412    clean_valid_dir
413    JOB_FILE=${EXE_DIR}/run_job.sh
414    NPROC=6
415    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
416    cd ${EXE_DIR}
417    set_namelist namelist_cfg cn_exp \"VORTEX_LONG\"
418    set_namelist namelist_cfg nn_it000 1
419    set_namelist namelist_cfg nn_itend ${ITEND}
420    set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 ))
421    set_namelist namelist_cfg sn_cfctl%l_runstat .true. 
422
423    set_namelist 1_namelist_cfg cn_exp \"VORTEX_LONG\"
424    set_namelist 1_namelist_cfg nn_it000 1
425    set_namelist 1_namelist_cfg nn_itend $(( ${ITEND} * 3 ))
426    set_namelist 1_namelist_cfg nn_stock $(( ${ITEND} * 3 / 2 ))
427    set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true.
428   
429    if [ ${USING_MPMD} == "yes" ] ; then
430        set_xio_using_server iodef.xml true
431    else
432        set_xio_using_server iodef.xml false
433    fi
434    cd ${SETTE_DIR}
435    . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
436   
437    cd ${SETTE_DIR}
438    export TEST_NAME="SHORT"
439    . ./prepare_exe_dir.sh
440    set_valid_dir
441    clean_valid_dir
442    cd ${EXE_DIR}
443    set_namelist namelist_cfg cn_exp \"VORTEX_SHORT\"
444    set_namelist namelist_cfg nn_it000 $(( ${ITEND} / 2 + 1 ))
445    set_namelist namelist_cfg nn_itend ${ITEND}
446    set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 ))
447    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
448    set_namelist namelist_cfg ln_rstart .true.
449    set_namelist namelist_cfg nn_rstctl 2
450    set_namelist namelist_cfg cn_ocerst_in \"VORTEX_LONG_${ITRST}_restart\"
451   
452    set_namelist 1_namelist_cfg cn_exp \"VORTEX_SHORT\"
453    set_namelist 1_namelist_cfg nn_it000 $(( ${ITEND} * 3 / 2 + 1 ))
454    set_namelist 1_namelist_cfg nn_itend $(( ${ITEND} * 3 ))
455    set_namelist 1_namelist_cfg nn_stock $(( ${ITEND} * 3 / 2 ))
456    set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true.
457    set_namelist 1_namelist_cfg ln_rstart .true.
458    set_namelist 1_namelist_cfg nn_rstctl 2
459    set_namelist 1_namelist_cfg cn_ocerst_in \"VORTEX_LONG_${ITRST_1}_restart\"
460     
461    if [ ${USING_MPMD} == "yes" ] ; then
462        set_xio_using_server iodef.xml true
463    else
464        set_xio_using_server iodef.xml false
465    fi
466    if [ $NPROC -eq 1 ] ;  then
467        ln -sf ../LONG/VORTEX_LONG_${ITRST}_restart.nc .
468        ln -sf ../LONG/1_VORTEX_LONG_${ITRST_1}_restart.nc .
469    else
470        for (( i=1; i<=$NPROC; i++)) ; do
471            L_NPROC=$(( $i - 1 ))
472            L_NPROC=`printf "%04d\n" ${L_NPROC}`
473            ln -sf ../LONG/VORTEX_LONG_${ITRST}_restart_${L_NPROC}.nc .
474            ln -sf ../LONG/1_VORTEX_LONG_${ITRST_1}_restart_${L_NPROC}.nc .
475        done
476    fi
477    cd ${SETTE_DIR}
478    . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
479    cd ${SETTE_DIR}
480    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
481
482## Reproducibility tests for VORTEX
483    export TEST_NAME="REPRO_2_3"
484    cd ${MAIN_DIR}
485    cd ${SETTE_DIR}
486    . ./param.cfg
487    . ./all_functions.sh
488    . ./prepare_exe_dir.sh
489    set_valid_dir
490    clean_valid_dir
491    JOB_FILE=${EXE_DIR}/run_job.sh
492    NPROC=6
493    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
494    cd ${EXE_DIR}
495    set_namelist namelist_cfg cn_exp \"VORTEX_23\"
496    set_namelist namelist_cfg nn_it000 1
497    set_namelist namelist_cfg nn_itend ${ITEND}
498    set_namelist namelist_cfg nn_stock ${ITEND}
499    set_namelist namelist_cfg jpni 2
500    set_namelist namelist_cfg jpnj 3
501    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
502   
503    set_namelist 1_namelist_cfg cn_exp \"VORTEX_23\"
504    set_namelist 1_namelist_cfg nn_it000 1
505    set_namelist 1_namelist_cfg nn_itend $(( ${ITEND} * 3 ))
506    set_namelist 1_namelist_cfg nn_stock $(( ${ITEND} * 3 ))
507    set_namelist 1_namelist_cfg jpni 2
508    set_namelist 1_namelist_cfg jpnj 3
509    set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true.
510
511    if [ ${USING_MPMD} == "yes" ] ; then
512       set_xio_using_server iodef.xml true
513    else
514       set_xio_using_server iodef.xml false
515    fi
516    cd ${SETTE_DIR}
517    . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
518    cd ${SETTE_DIR}
519    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
520
521    cd ${SETTE_DIR}
522    export TEST_NAME="REPRO_3_2"
523    . ./prepare_exe_dir.sh
524    set_valid_dir
525    clean_valid_dir
526    JOB_FILE=${EXE_DIR}/run_job.sh
527    NPROC=6
528    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
529    cd ${EXE_DIR}
530
531    set_namelist namelist_cfg cn_exp \"VORTEX_32\"
532    set_namelist namelist_cfg nn_it000 1
533    set_namelist namelist_cfg nn_itend ${ITEND}
534    set_namelist namelist_cfg nn_stock ${ITEND}
535    set_namelist namelist_cfg jpni 3
536    set_namelist namelist_cfg jpnj 2
537    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
538
539    set_namelist 1_namelist_cfg cn_exp \"VORTEX_32\"
540    set_namelist 1_namelist_cfg nn_it000 1
541    set_namelist 1_namelist_cfg nn_itend $(( ${ITEND} * 3 ))
542    set_namelist 1_namelist_cfg nn_stock $(( ${ITEND} * 3 ))
543    set_namelist 1_namelist_cfg jpni 3
544    set_namelist 1_namelist_cfg jpnj 2
545    set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true.
546
547    if [ ${USING_MPMD} == "yes" ] ; then
548       set_xio_using_server iodef.xml true
549    else
550       set_xio_using_server iodef.xml false
551    fi
552    cd ${SETTE_DIR}
553    . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
554    cd ${SETTE_DIR}
555    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
556
557fi
558
559
560# ---------
561# ICE_AGRIF
562# ---------
563if [ ${config} == "ICE_AGRIF" ] ;  then 
564## Restartability tests for ICE_AGRIF
565    if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ]
566    then
567   ITEND=10
568    else
569   ITEND=200
570    fi
571    ITRST=$(   printf "%08d" $(( ${ITEND} / 2 )) )
572    ITRST_1=$( printf "%08d" $(( ${ITEND} * 3 / 2 )) )
573    export TEST_NAME="LONG"
574    cd ${MAIN_DIR}
575    #
576    # syncronisation if target directory/file exist (not done by makenemo)
577    . ${SETTE_DIR}/all_functions.sh
578    #
579    clean_config ICE_AGRIF ICE_AGRIF_ST 'tests'
580    #
581    sync_config  ICE_AGRIF ICE_AGRIF_ST 'tests'
582    #
583    . ./makenemo -m ${CMP_NAM} -n ICE_AGRIF_ST -a ICE_AGRIF -j 8  add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
584    cd ${SETTE_DIR}
585    . ./param.cfg
586    . ./all_functions.sh
587    . ./prepare_exe_dir.sh
588    set_valid_dir
589    clean_valid_dir
590    JOB_FILE=${EXE_DIR}/run_job.sh
591    NPROC=6
592    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
593    cd ${EXE_DIR}
594    set_namelist namelist_cfg cn_exp \"ICE_AGRIF_LONG\"
595    set_namelist namelist_cfg nn_it000 1
596    set_namelist namelist_cfg nn_itend ${ITEND}
597    set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 ))
598    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
599   
600    set_namelist 1_namelist_cfg cn_exp \"ICE_AGRIF_LONG\"
601    set_namelist 1_namelist_cfg nn_it000 1
602    set_namelist 1_namelist_cfg nn_itend $(( ${ITEND} * 3 ))
603    set_namelist 1_namelist_cfg nn_stock $(( ${ITEND} * 3 / 2 ))
604    set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true.
605   
606    if [ ${USING_MPMD} == "yes" ] ; then
607        set_xio_using_server iodef.xml true
608    else
609        set_xio_using_server iodef.xml false
610    fi
611    cd ${SETTE_DIR}
612    . ./prepare_job.sh input_ICE_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
613   
614    cd ${SETTE_DIR}
615    export TEST_NAME="SHORT"
616    . ./prepare_exe_dir.sh
617    set_valid_dir
618    clean_valid_dir
619    cd ${EXE_DIR}
620    set_namelist namelist_cfg cn_exp \"ICE_AGRIF_SHORT\"
621    set_namelist namelist_cfg nn_it000 $(( ${ITEND} / 2 + 1 ))
622    set_namelist namelist_cfg nn_itend ${ITEND}
623    set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 ))
624    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
625    set_namelist namelist_cfg ln_rstart .true.
626    set_namelist namelist_cfg nn_rstctl 2
627    set_namelist namelist_cfg cn_ocerst_in \"ICE_AGRIF_LONG_${ITRST}_restart\"
628    set_namelist namelist_ice_cfg cn_icerst_in \"ICE_AGRIF_LONG_${ITRST}_restart_ice\"
629   
630    set_namelist 1_namelist_cfg cn_exp \"ICE_AGRIF_SHORT\"
631    set_namelist 1_namelist_cfg nn_it000 $(( ${ITEND} * 3 / 2 + 1 ))
632    set_namelist 1_namelist_cfg nn_itend $(( ${ITEND} * 3 ))
633    set_namelist 1_namelist_cfg nn_stock $(( ${ITEND} * 3 / 2 ))
634    set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true.
635    set_namelist 1_namelist_cfg ln_rstart .true.
636    set_namelist 1_namelist_cfg nn_rstctl 2
637    set_namelist 1_namelist_cfg cn_ocerst_in \"ICE_AGRIF_LONG_${ITRST_1}_restart\"
638    set_namelist 1_namelist_ice_cfg cn_icerst_in \"ICE_AGRIF_LONG_${ITRST_1}_restart_ice\"
639   
640   
641    if [ ${USING_MPMD} == "yes" ] ; then
642        set_xio_using_server iodef.xml true
643    else
644        set_xio_using_server iodef.xml false
645    fi
646    if [ $NPROC -eq 1 ] ;  then
647        ln -sf ../LONG/ICE_AGRIF_LONG_${ITRST}_restart.nc .
648        ln -sf ../LONG/ICE_AGRIF_LONG_${ITRST}_restart_ice.nc .
649        ln -sf ../LONG/1_ICE_AGRIF_LONG_${ITRST_1}_restart.nc .
650        ln -sf ../LONG/1_ICE_AGRIF_LONG_${ITRST_1}_restart_ice.nc .
651    else
652        for (( i=1; i<=$NPROC; i++)) ; do
653            L_NPROC=$(( $i - 1 ))
654            L_NPROC=`printf "%04d\n" ${L_NPROC}`
655            ln -sf ../LONG/ICE_AGRIF_LONG_${ITRST}_restart_${L_NPROC}.nc .
656            ln -sf ../LONG/ICE_AGRIF_LONG_${ITRST}_restart_ice_${L_NPROC}.nc .
657            ln -sf ../LONG/1_ICE_AGRIF_LONG_${ITRST_1}_restart_${L_NPROC}.nc .
658            ln -sf ../LONG/1_ICE_AGRIF_LONG_${ITRST_1}_restart_ice_${L_NPROC}.nc .
659        done
660    fi
661
662    cd ${SETTE_DIR}
663    . ./prepare_job.sh input_ICE_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
664    cd ${SETTE_DIR}
665    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
666
667
668## Reproducibility tests for ICE_AGRIF
669    export TEST_NAME="REPRO_2_3"
670    cd ${MAIN_DIR}
671    cd ${SETTE_DIR}
672    . ./param.cfg
673    . ./all_functions.sh
674    . ./prepare_exe_dir.sh
675    set_valid_dir
676    clean_valid_dir
677    JOB_FILE=${EXE_DIR}/run_job.sh
678    NPROC=6
679    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
680    cd ${EXE_DIR}
681    set_namelist namelist_cfg cn_exp \"ICE_AGRIF_23\"
682    set_namelist namelist_cfg nn_it000 1
683    set_namelist namelist_cfg nn_itend ${ITEND}
684    set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 ))
685    set_namelist namelist_cfg jpni 2
686    set_namelist namelist_cfg jpnj 3
687    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
688   
689    set_namelist 1_namelist_cfg cn_exp \"ICE_AGRIF_23\"
690    set_namelist 1_namelist_cfg nn_it000 1
691    set_namelist 1_namelist_cfg nn_itend $(( ${ITEND} * 3 ))
692    set_namelist 1_namelist_cfg nn_stock $(( ${ITEND} * 3 / 2 ))
693    set_namelist 1_namelist_cfg jpni 2
694    set_namelist 1_namelist_cfg jpnj 3
695    set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true.
696
697    if [ ${USING_MPMD} == "yes" ] ; then
698       set_xio_using_server iodef.xml true
699    else
700       set_xio_using_server iodef.xml false
701    fi
702    cd ${SETTE_DIR}
703    . ./prepare_job.sh input_ICE_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
704    cd ${SETTE_DIR}
705    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
706
707    cd ${SETTE_DIR}
708    export TEST_NAME="REPRO_3_2"
709    . ./prepare_exe_dir.sh
710    set_valid_dir
711    clean_valid_dir
712    JOB_FILE=${EXE_DIR}/run_job.sh
713    NPROC=6
714    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
715    cd ${EXE_DIR}
716
717    set_namelist namelist_cfg cn_exp \"ICE_AGRIF_32\"
718    set_namelist namelist_cfg nn_it000 1
719    set_namelist namelist_cfg nn_itend ${ITEND}
720    set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 ))
721    set_namelist namelist_cfg jpni 3
722    set_namelist namelist_cfg jpnj 2
723    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
724   
725    set_namelist 1_namelist_cfg cn_exp \"ICE_AGRIF_32\"
726    set_namelist 1_namelist_cfg nn_it000 1
727    set_namelist 1_namelist_cfg nn_itend $(( ${ITEND} * 3 ))
728    set_namelist 1_namelist_cfg nn_stock $(( ${ITEND} * 3 / 2 ))
729    set_namelist 1_namelist_cfg jpni 3
730    set_namelist 1_namelist_cfg jpnj 2
731    set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true.
732   
733    if [ ${USING_MPMD} == "yes" ] ; then
734       set_xio_using_server iodef.xml true
735    else
736       set_xio_using_server iodef.xml false
737    fi
738    cd ${SETTE_DIR}
739    . ./prepare_job.sh input_ICE_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
740    cd ${SETTE_DIR}
741    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
742
743fi
744
745# ------
746# ISOMIP+
747# ------
748if [ ${config} == "ISOMIP+" ] ;  then
749## Restartability tests
750    if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ]
751    then
752   ITEND=12
753    else
754   ITEND=1200
755    fi
756    ITRST=$( printf "%08d" $(( ${ITEND} / 2 )) )
757    export TEST_NAME="LONG"
758    cd ${MAIN_DIR}
759    #
760    # syncronisation if target directory/file exist (not done by makenemo)
761    . ${SETTE_DIR}/all_functions.sh
762    #
763    clean_config ISOMIP+ ISOMIP+_ST 'tests'
764    #
765    sync_config  ISOMIP+ ISOMIP+_ST 'tests'
766    #
767    . ./makenemo -m ${CMP_NAM} -n ISOMIP+_ST -a ISOMIP+ -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
768    cd ${SETTE_DIR}
769    . ./param.cfg
770    . ./all_functions.sh
771    . ./prepare_exe_dir.sh
772    set_valid_dir
773    clean_valid_dir
774    JOB_FILE=${EXE_DIR}/run_job.sh
775    NPROC=27
776    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
777    cd ${EXE_DIR}
778    set_namelist namelist_cfg cn_exp \"ISOMIP+_LONG\"
779    set_namelist namelist_cfg nn_it000 1
780    set_namelist namelist_cfg nn_itend ${ITEND}
781    set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 ))
782    set_namelist namelist_cfg jpni 9
783    set_namelist namelist_cfg jpnj 3
784    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
785    if [ ${USING_MPMD} == "yes" ] ; then
786       set_xio_using_server iodef.xml true
787    else
788       set_xio_using_server iodef.xml false
789    fi
790    cd ${SETTE_DIR}
791    . ./prepare_job.sh input_ISOMIP+.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
792
793    cd ${SETTE_DIR}
794    export TEST_NAME="SHORT"
795    . ./prepare_exe_dir.sh
796    set_valid_dir
797    clean_valid_dir
798    cd ${EXE_DIR}
799    set_namelist namelist_cfg cn_exp \"ISOMIP+_SHORT\"
800    set_namelist namelist_cfg nn_it000 $(( ${ITEND} / 2 + 1 ))
801    set_namelist namelist_cfg nn_itend ${ITEND}
802    set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 ))
803    set_namelist namelist_cfg ln_rstart .true.
804    set_namelist namelist_cfg nn_rstctl 2
805    set_namelist namelist_cfg jpni 9
806    set_namelist namelist_cfg jpnj 3
807    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
808    set_namelist namelist_cfg cn_ocerst_in \"ISOMIP+_LONG_${ITRST}_restart\"
809    if [ ${USING_MPMD} == "yes" ] ; then
810       set_xio_using_server iodef.xml true
811    else
812       set_xio_using_server iodef.xml false
813    fi
814    for (( i=1; i<=$NPROC; i++)) ; do
815        L_NPROC=$(( $i - 1 ))
816        L_NPROC=`printf "%04d\n" ${L_NPROC}`
817        ln -sf ../LONG/ISOMIP+_LONG_${ITRST}_restart_${L_NPROC}.nc .
818    done
819
820    cd ${SETTE_DIR}
821    . ./prepare_job.sh input_ISOMIP+.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
822    cd ${SETTE_DIR}
823    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
824
825## Reproducibility tests
826    if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ]
827    then
828   ITEND=12
829    else
830   ITEND=600
831    fi
832    export TEST_NAME="REPRO_9_3"
833    cd ${MAIN_DIR}
834    cd ${SETTE_DIR}
835    . ./param.cfg
836    . ./all_functions.sh
837    . ./prepare_exe_dir.sh
838    set_valid_dir
839    clean_valid_dir
840    JOB_FILE=${EXE_DIR}/run_job.sh
841    NPROC=27
842    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
843    cd ${EXE_DIR}
844    set_namelist namelist_cfg cn_exp \"ISOMIP+_93\"
845    set_namelist namelist_cfg nn_it000 1
846    set_namelist namelist_cfg nn_itend ${ITEND}
847    set_namelist namelist_cfg jpni 9
848    set_namelist namelist_cfg jpnj 3
849    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
850    if [ ${USING_MPMD} == "yes" ] ; then
851       set_xio_using_server iodef.xml true
852    else
853       set_xio_using_server iodef.xml false
854    fi
855    cd ${SETTE_DIR}
856    . ./prepare_job.sh input_ISOMIP+.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
857    cd ${SETTE_DIR}
858    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
859
860    cd ${SETTE_DIR}
861    export TEST_NAME="REPRO_8_4"
862    . ./prepare_exe_dir.sh
863    set_valid_dir
864    clean_valid_dir
865    JOB_FILE=${EXE_DIR}/run_job.sh
866    NPROC=32
867    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
868    cd ${EXE_DIR}
869    set_namelist namelist_cfg cn_exp \"ISOMIP+_84\"
870    set_namelist namelist_cfg nn_it000 1
871    set_namelist namelist_cfg nn_itend ${ITEND}
872    set_namelist namelist_cfg jpni 8
873    set_namelist namelist_cfg jpnj 4
874    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
875    if [ ${USING_MPMD} == "yes" ] ; then
876       set_xio_using_server iodef.xml true
877    else
878       set_xio_using_server iodef.xml false
879    fi
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
885fi
886
887#----
888done
Note: See TracBrowser for help on using the repository browser.