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 @ 12428

Last change on this file since 12428 was 12428, checked in by mathiot, 2 years ago

merge sette_top_pisces_lbc into sette + add ifort bathc template for MetO computer

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