New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
sette_test-cases.sh in utils/CI/sette – NEMO

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

Last change on this file since 14823 was 14823, checked in by francesca, 3 years ago

remove key_mpi3

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