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/r12931_sette_ticket2462 – NEMO

source: utils/CI/r12931_sette_ticket2462/sette_test-cases.sh @ 12999

Last change on this file since 12999 was 12999, checked in by andmirek, 4 years ago

Ticket #2462 update sette to handle restart read/write with XIOS

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