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_ticket2304 – NEMO

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

Last change on this file since 12290 was 12290, checked in by mathiot, 4 years ago

use rsync for sync instead of cp and remove sync of cpp key (ticket #2304)

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