source: utils/CI/sette_ticket2304/sette_test-cases.sh @ 12422

Last change on this file since 12422 was 12422, checked in by mathiot, 12 months ago

merge sync_mysrc and sync_expcfg into sync_config, add a clean_config function and add option in sette.sh to activate synchronisation of MY_SCR/EXPREF with CONFIG_ST/EXP00/MY_SRC (-s option) or to clean a config with makenemo clean (-c option)

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