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

Last change on this file since 12569 was 12569, checked in by mathiot, 6 months ago

ticket #2304: merge branch sette_ticket2304 into sette (thank you Simon for the review and all the suggestions you made). It include synchronisation and cleaning option between the REF config and the _ST config to ease the work when the reference configurations are changed and display bug in sette_check_avail_rev

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