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

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

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

Last change on this file since 11161 was 11161, checked in by mathiot, 3 years ago

merge fix_sette_ticket2239 : major simplification/improvement of SETTE (see README.rst for all the details), tested with the latest version of the trunk (r11160) (ticket #2239)

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