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

Last change on this file since 10427 was 10427, checked in by smasson, 5 years ago

sette: add ln_ctl = .true.

  • Property svn:executable set to *
File size: 28.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#############################################################
17#set -vx
18set -o posix
19#set -u
20#set -e
21# ===========
22# DESCRIPTION
23# ===========
24#
25# Variables to be checked by user:
26#
27# COMPILER          : name of compiler as defined in NEMOGCM/ARCH directory
28# BATCH_COMMAND_PAR :  name of the command for submitting parallel batch jobs
29# BATCH_COMMAND_SEQ :  name of the command for submitting sequential batch jobs 
30# INTERACT_FLAG     : flag to run in interactive mode "yes"
31#                           to run in batch mode "no"
32# MPIRUN_FLAG       : flag to run in parallel (MPI) "yes"
33#                           to run in sequential mode (NB_PROC = 1) "no"
34# USING_XIOS        : flag to control the activation of key_iomput
35#                      "yes" to compile using key_iomput and link to the external XIOS library
36#                      "no"  to compile without key_iomput and link to the old IOIPSL library
37# USING_MPMD        : flag to control the use of stand-alone IO servers
38#                     requires USING_XIOS="yes"
39#                      "yes" to run in MPMD (detached) mode with stand-alone IO servers
40#                      "no"  to run in SPMD (attached) mode without separate IO servers
41# NUM_XIOSERVERS    : number of stand-alone IO servers to employ
42#                     set to zero if USING_MPMD="no"
43#
44# Principal script is sette_test-cases.sh, that calls
45#
46#  makenemo  : to create successive exectuables in ${CONFIG_NAME}/BLD/bin/nemo.exe
47#              and links to nemo in ${CONFIG_NAME}/EXP00)
48#
49#  param.cfg : sets and loads following directories:
50#
51#   FORCING_DIR         : is the directory for forcing files (tarfile)
52#   INPUT_DIR           : is the directory for input files storing
53#   TMPDIR              : is the temporary directory (if needed)
54#   NEMO_VALIDATION_DIR : is the validation directory
55#
56#   (NOTE: this file is the same for all configrations to be tested with sette_test-cases.sh)
57#
58#   all_functions.sh : loads functions used by sette (note: new functions can be added here)
59#   set_namelist     : function declared in all_functions that sets namelist parameters
60#   post_test_tidyup : creates validation storage directory and copies required output files
61#                      (run.stat and ocean.output) in it after execution of test.
62#
63#  VALIDATION tree is:
64#
65#   NEMO_VALIDATION_DIR/WCONFIG_NAME/WCOMPILER_NAME/TEST_NAME/REVISION_NUMBER(or DATE)
66#
67#  prepare_exe_dir.sh : defines and creates directory where the test is executed
68#                       execution directory takes name of TEST_NAME defined for every test
69#                       in sette_test-cases.sh. (each test in executed in its own directory)
70#
71#  prepare_job.sh     : to generate the script run_job.sh
72#
73#  fcm_job.sh         : run in batch (INTERACT_FLAG="no") or interactive (INTERACT_FLAG="yes")
74#                        see sette_test-cases.sh and BATCH_TEMPLATE directory
75#
76#  NOTE: jobs requiring initial or forcing data need to have an input_CONFIG.cfg in which
77#        can be found paths to the input tar file)
78#  NOTE: if job is not launched for any reason you have the executable ready in ${EXE_DIR}
79#        directory
80#  NOTE: the changed namelists are left in ${EXE_DIR} directory whereas original namelists
81#        remain in ${NEW_CONF}/EXP00
82#
83#  NOTE: a log file, output.sette, is created in ${SETTE_DIR} with the echoes of
84#        executed commands
85#
86#  NOTE: if sette_test-cases.sh is stopped in output.sette there is written the last command
87#        executed by sette_test-cases.sh
88#
89# example use: ./sette_test-cases.sh
90#########################################################################################
91#
92# Compiler among those in NEMOGCM/ARCH
93COMPILER=X64_ADA
94
95export BATCH_COMMAND_PAR="llsubmit"
96export BATCH_COMMAND_SEQ=$BATCH_COMMAND_PAR
97export INTERACT_FLAG="no"
98export MPIRUN_FLAG="yes"
99export USING_XIOS="yes"
100#
101export DEL_KEYS="key_iomput"
102if [ ${USING_XIOS} == "yes" ] 
103 then
104   export DEL_KEYS=""
105fi
106#
107# Settings which control the use of stand alone servers (only relevant if using xios)
108#
109export USING_MPMD="no"
110export NUM_XIOSERVERS=4
111export JOB_PREFIX=batch-mpmd
112#
113if [ ${USING_MPMD} == "no" ] 
114 then
115   export NUM_XIOSERVERS=0
116   export JOB_PREFIX=batch
117fi
118#
119#
120if [ ${USING_MPMD} == "yes" ] && [ ${USING_XIOS} == "no"]
121 then
122   echo "Incompatible choices. MPMD mode requires the XIOS server"
123   exit
124fi
125
126# Directory to run the tests
127SETTE_DIR=$(cd $(dirname "$0"); pwd)
128MAIN_DIR=$(dirname $SETTE_DIR)
129CONFIG_DIR0=${MAIN_DIR}/cfgs
130TOOLS_DIR=${MAIN_DIR}/tools
131
132CMP_NAM=${1:-$COMPILER}
133# Copy job_batch_COMPILER file for specific compiler into job_batch_template
134cd ${SETTE_DIR}
135cp BATCH_TEMPLATE/${JOB_PREFIX}-${COMPILER} job_batch_template || exit
136# Description of configuration tested:
137# OVERFLOW       : 1  TEST s-coordinates : (tracers) Advection schemes: FCT2, FCT4, ubs
138#                                        & (dynamics) advection schemes: flux form (ubs, centered), vector form (een)
139#                          zps-coordinates : (tracers) Advection schemes: FCT2, FCT4, ubs
140#                                        & (dynamics) advection schemes: flux form (ubs, centered), vector form (een, and een + Hollingsworth correction)
141# LOCK_EXCHANGE  : 2
142# VORTEX         : 3
143# ICEDYN         : 4
144# ISOMIP         : 5
145# WAD
146
147
148for config in 1 2 3 4 5
149do
150
151# ---------
152#  OVERFLOW
153# ---------
154if [ ${config} -eq 1 ] ;  then
155    ## Restartability tests for OVERFLOW
156    export TEST_NAME="LONG"
157    cd ${MAIN_DIR}
158    . ./makenemo -m ${CMP_NAM} -n OVERFLOW_ST -a OVERFLOW -j 8 del_key ${DEL_KEYS}
159    cd ${SETTE_DIR}
160    . ./param.cfg
161    . ./all_functions.sh
162    . ./prepare_exe_dir.sh
163    JOB_FILE=${EXE_DIR}/run_job.sh
164    NPROC=1
165    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
166    cd ${EXE_DIR} 
167    set_namelist namelist_cfg cn_exp \"OVF_LONG\"
168    set_namelist namelist_cfg nn_it000 1
169    set_namelist namelist_cfg nn_itend 120
170    set_namelist namelist_cfg nn_stock 60
171    if [ ${USING_MPMD} == "yes" ] ; then
172       set_xio_using_server iodef.xml true
173    else
174       set_xio_using_server iodef.xml false
175    fi
176    cd ${SETTE_DIR}
177    . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
178
179    cd ${SETTE_DIR}
180    export TEST_NAME="SHORT"
181    . ./prepare_exe_dir.sh
182    cd ${EXE_DIR}
183    set_namelist namelist_cfg cn_exp \"OVF_SHORT\"
184    set_namelist namelist_cfg nn_it000 61
185    set_namelist namelist_cfg nn_itend 120
186    set_namelist namelist_cfg nn_stock 60
187    set_namelist namelist_cfg ln_rstart .true.
188    set_namelist namelist_cfg nn_rstctl 2
189    set_namelist namelist_cfg cn_ocerst_in \"OVF_LONG_00000060_restart\"
190    if [ ${USING_MPMD} == "yes" ] ; then
191       set_xio_using_server iodef.xml true
192    else
193       set_xio_using_server iodef.xml false
194    fi
195    ln -sf ../LONG/OVF_LONG_00000060_restart.nc .
196
197    cd ${SETTE_DIR}
198    . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
199    cd ${SETTE_DIR}
200    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
201
202
203    ## Test for all advection, vert. coordinates, vector form, flux form: test runability and complete all time steps
204    ## Needed namelist-xxxx for every type of run tested
205    cd ${CONFIG_DIR}/${NEW_CONF}/EXP00
206
207    for file in $(echo `ls namelist_*_cfg `) ; do
208        TEST_NAME=`echo $file | sed -e "s/namelist_//" | sed -e "s/_cfg//"`
209        TEST_NAME="EXP-${TEST_NAME}"
210        if [ ! -d ${CONFIG_DIR}/${NEW_CONF}/${TEST_NAME} ] ; then mkdir ${CONFIG_DIR}/${NEW_CONF}/${TEST_NAME} ; fi
211        export TEST_NAME="${TEST_NAME}"
212         ##
213        cd ${SETTE_DIR}
214        . ./param.cfg
215        . ./all_functions.sh
216        . ./prepare_exe_dir.sh
217        JOB_FILE=${EXE_DIR}/run_job.sh
218        NPROC=1
219        if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
220        cd ${EXE_DIR}
221        rm namelist_*_*_*_*
222        cp -pL ${CONFIG_DIR}/${NEW_CONF}/EXP00/$file namelist_cfg
223        if [ ${USING_MPMD} == "yes" ] ; then
224           set_xio_using_server iodef.xml true
225        else
226           set_xio_using_server iodef.xml false
227        fi
228        cd ${SETTE_DIR}
229        . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
230        cd ${SETTE_DIR}
231        . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
232       ##
233     done
234fi
235
236# --------------
237#  LOCK_EXCHANGE
238# --------------
239if [ ${config} -eq 2 ] ;  then
240    ## Restartability tests for LOCK_EXCHANGE
241    export TEST_NAME="LONG"
242    cd ${MAIN_DIR}
243    . ./makenemo -m ${CMP_NAM} -n LOCK_EXCHANGE_ST -a LOCK_EXCHANGE -j 8 del_key ${DEL_KEYS}
244    cd ${SETTE_DIR}
245    . ./param.cfg
246    . ./all_functions.sh
247    . ./prepare_exe_dir.sh
248    JOB_FILE=${EXE_DIR}/run_job.sh
249    NPROC=1
250    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
251    cd ${EXE_DIR}
252    set_namelist namelist_cfg cn_exp \"LOCK_LONG\"
253    set_namelist namelist_cfg nn_it000 1
254    set_namelist namelist_cfg nn_stock 60
255    set_namelist namelist_cfg nn_itend 120
256    if [ ${USING_MPMD} == "yes" ] ; then
257       set_xio_using_server iodef.xml true
258    else
259       set_xio_using_server iodef.xml false
260    fi
261    cd ${SETTE_DIR}
262    . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
263
264    cd ${SETTE_DIR}
265    export TEST_NAME="SHORT"
266    . ./prepare_exe_dir.sh
267    cd ${EXE_DIR}
268    set_namelist namelist_cfg cn_exp \"LOCK_SHORT\"
269    set_namelist namelist_cfg nn_it000 61
270    set_namelist namelist_cfg nn_itend 120
271    set_namelist namelist_cfg nn_stock 60
272    set_namelist namelist_cfg ln_rstart .true.
273    set_namelist namelist_cfg nn_rstctl 2
274    set_namelist namelist_cfg cn_ocerst_in \"LOCK_LONG_00000060_restart\"
275    if [ ${USING_MPMD} == "yes" ] ; then
276       set_xio_using_server iodef.xml true
277    else
278       set_xio_using_server iodef.xml false
279    fi
280    ln -sf ../LONG/LOCK_LONG_00000060_restart.nc .
281
282    cd ${SETTE_DIR}
283    . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
284    cd ${SETTE_DIR}
285    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
286
287    ## Test for all advection, vector form, flux form: test runability and complete all time steps
288    ## Needed namelist-xxxx for every type of run tested
289    cd ${CONFIG_DIR}/${NEW_CONF}/EXP00
290
291    for file in $(echo `ls namelist_*_cfg `) ; do
292        echo ''
293        TEST_NAME=`echo $file | sed -e "s/namelist_//" | sed -e "s/_cfg//"`
294        TEST_NAME="EXP-${TEST_NAME}"
295        `mkdir ${CONFIG_DIR}/${NEW_CONF}/${TEST_NAME}`
296        export TEST_NAME="${TEST_NAME}"
297        ## 
298        cd ${SETTE_DIR}
299        . ./param.cfg
300        . ./all_functions.sh
301        . ./prepare_exe_dir.sh
302        JOB_FILE=${EXE_DIR}/run_job.sh
303        NPROC=1
304        if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
305        cd ${EXE_DIR}
306        rm namelist_*_*_*_*
307        cp -pL ${CONFIG_DIR}/${NEW_CONF}/EXP00/$file namelist_cfg
308        if [ ${USING_MPMD} == "yes" ] ; then
309           set_xio_using_server iodef.xml true
310        else
311           set_xio_using_server iodef.xml false
312        fi
313        cd ${SETTE_DIR}
314        . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
315        cd ${SETTE_DIR}
316        . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
317        ##
318        echo ''
319   done
320fi
321
322# ---------
323# VORTEX
324# ---------
325if [ ${config} -eq 3 ] ;  then 
326## Restartability tests for VORTEX
327    export TEST_NAME="LONG"
328    cd ${MAIN_DIR}
329    . ./makenemo -m ${CMP_NAM} -n VORTEX_ST -a VORTEX -j 8  del_key ${DEL_KEYS}
330    cd ${SETTE_DIR}
331    . ./param.cfg
332    . ./all_functions.sh
333    . ./prepare_exe_dir.sh
334    JOB_FILE=${EXE_DIR}/run_job.sh
335    NPROC=6
336    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
337    cd ${EXE_DIR}
338    set_namelist namelist_cfg cn_exp \"VORTEX_LONG\"
339    set_namelist namelist_cfg nn_it000 1
340    set_namelist namelist_cfg nn_itend 240
341    set_namelist namelist_cfg nn_stock 120
342   
343    set_namelist 1_namelist_cfg cn_exp \"VORTEX_LONG\"
344    set_namelist 1_namelist_cfg nn_it000 1
345    set_namelist 1_namelist_cfg nn_itend 720
346    set_namelist 1_namelist_cfg nn_stock 360
347   
348    if [ ${USING_MPMD} == "yes" ] ; then
349        set_xio_using_server iodef.xml true
350    else
351        set_xio_using_server iodef.xml false
352    fi
353    cd ${SETTE_DIR}
354    . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
355   
356    cd ${SETTE_DIR}
357    export TEST_NAME="SHORT"
358    . ./prepare_exe_dir.sh
359    cd ${EXE_DIR}
360    set_namelist namelist_cfg cn_exp \"VORTEX_SHORT\"
361    set_namelist namelist_cfg nn_it000 121
362    set_namelist namelist_cfg nn_itend 240
363    set_namelist namelist_cfg nn_stock 120
364    set_namelist namelist_cfg ln_rstart .true.
365    set_namelist namelist_cfg nn_rstctl 2
366    set_namelist namelist_cfg cn_ocerst_in \"VORTEX_LONG_00000120_restart\"
367   
368    set_namelist 1_namelist_cfg cn_exp \"VORTEX_SHORT\"
369    set_namelist 1_namelist_cfg nn_it000 361
370    set_namelist 1_namelist_cfg nn_itend 720
371    set_namelist 1_namelist_cfg nn_stock 360
372    set_namelist 1_namelist_cfg ln_rstart .true.
373    set_namelist 1_namelist_cfg nn_rstctl 2
374    set_namelist 1_namelist_cfg cn_ocerst_in \"VORTEX_LONG_00000360_restart\"
375     
376    if [ ${USING_MPMD} == "yes" ] ; then
377        set_xio_using_server iodef.xml true
378    else
379        set_xio_using_server iodef.xml false
380    fi
381    if [ $NPROC -eq 1 ] ;  then
382        ln -sf ../LONG/VORTEX_LONG_00000120_restart.nc .
383        ln -sf ../LONG/1_VORTEX_LONG_00000360_restart.nc .
384    else
385        for (( i=1; i<=$NPROC; i++)) ; do
386            L_NPROC=$(( $i - 1 ))
387            L_NPROC=`printf "%04d\n" ${L_NPROC}`
388            ln -sf ../LONG/VORTEX_LONG_00000120_restart_${L_NPROC}.nc .
389            ln -sf ../LONG/1_VORTEX_LONG_00000360_restart_${L_NPROC}.nc .
390        done
391    fi
392    cd ${SETTE_DIR}
393    . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
394    cd ${SETTE_DIR}
395    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
396
397## Reproducibility tests for VORTEX
398    export TEST_NAME="REPRO_2_3"
399    cd ${MAIN_DIR}
400    cd ${SETTE_DIR}
401    . ./param.cfg
402    . ./all_functions.sh
403    . ./prepare_exe_dir.sh
404    JOB_FILE=${EXE_DIR}/run_job.sh
405    NPROC=6
406    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
407    cd ${EXE_DIR}
408    set_namelist namelist_cfg cn_exp \"VORTEX_23\"
409    set_namelist namelist_cfg nn_it000 1
410    set_namelist namelist_cfg nn_itend 240
411    set_namelist namelist_cfg nn_stock 120
412    set_namelist namelist_cfg jpni 2
413    set_namelist namelist_cfg jpnj 3
414    set_namelist namelist_cfg jpnij 6
415    set_namelist namelist_cfg ln_ctl .true.
416   
417    set_namelist 1_namelist_cfg cn_exp \"VORTEX_23\"
418    set_namelist 1_namelist_cfg nn_it000 1
419    set_namelist 1_namelist_cfg nn_itend 720
420    set_namelist 1_namelist_cfg nn_stock 360
421    set_namelist 1_namelist_cfg jpni 2
422    set_namelist 1_namelist_cfg jpnj 3
423    set_namelist 1_namelist_cfg jpnij 6
424    set_namelist 1_namelist_cfg ln_ctl .true.
425
426    if [ ${USING_MPMD} == "yes" ] ; then
427       set_xio_using_server iodef.xml true
428    else
429       set_xio_using_server iodef.xml false
430    fi
431    cd ${SETTE_DIR}
432    . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
433    cd ${SETTE_DIR}
434    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
435
436    cd ${SETTE_DIR}
437    export TEST_NAME="REPRO_3_2"
438    . ./prepare_exe_dir.sh
439    JOB_FILE=${EXE_DIR}/run_job.sh
440    NPROC=6
441    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
442    cd ${EXE_DIR}
443
444    set_namelist namelist_cfg cn_exp \"VORTEX_32\"
445    set_namelist namelist_cfg nn_it000 1
446    set_namelist namelist_cfg nn_itend 240
447    set_namelist namelist_cfg nn_stock 120
448    set_namelist namelist_cfg jpni 3
449    set_namelist namelist_cfg jpnj 2
450    set_namelist namelist_cfg jpnij 6
451    set_namelist namelist_cfg ln_ctl .true.
452
453    set_namelist 1_namelist_cfg cn_exp \"VORTEX_32\"
454    set_namelist 1_namelist_cfg nn_it000 1
455    set_namelist 1_namelist_cfg nn_itend 720
456    set_namelist 1_namelist_cfg nn_stock 360
457    set_namelist 1_namelist_cfg jpni 3
458    set_namelist 1_namelist_cfg jpnj 2
459    set_namelist 1_namelist_cfg jpnij 6
460    set_namelist 1_namelist_cfg ln_ctl .true.
461
462    if [ ${USING_MPMD} == "yes" ] ; then
463       set_xio_using_server iodef.xml true
464    else
465       set_xio_using_server iodef.xml false
466    fi
467    cd ${SETTE_DIR}
468    . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
469    cd ${SETTE_DIR}
470    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
471
472fi
473
474
475# ---------
476# ICEDYN
477# ---------
478if [ ${config} -eq 4 ] ;  then 
479## Restartability tests for ICEDYN
480    export TEST_NAME="LONG"
481    cd ${MAIN_DIR}
482    . ./makenemo -m ${CMP_NAM} -n ICEDYN_ST -a ICEDYN -j 8  del_key ${DEL_KEYS}
483    cd ${SETTE_DIR}
484    . ./param.cfg
485    . ./all_functions.sh
486    . ./prepare_exe_dir.sh
487    JOB_FILE=${EXE_DIR}/run_job.sh
488    NPROC=6
489    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
490    cd ${EXE_DIR}
491    set_namelist namelist_cfg cn_exp \"ICEDYN_LONG\"
492    set_namelist namelist_cfg nn_it000 1
493    set_namelist namelist_cfg nn_itend 200
494    set_namelist namelist_cfg nn_stock 100
495   
496    #set_namelist namelist_ice_cfg ln_icethd .true.
497    set_namelist namelist_ice_cfg ln_icedyn .true.
498    set_namelist namelist_ice_cfg ln_dynFULL .true.
499    set_namelist namelist_ice_cfg ln_dynRHGADV .false.
500    set_namelist namelist_ice_cfg ln_dynADV .false.
501   
502    set_namelist 1_namelist_cfg cn_exp \"ICEDYN_LONG\"
503    set_namelist 1_namelist_cfg nn_it000 1
504    set_namelist 1_namelist_cfg nn_itend 600
505    set_namelist 1_namelist_cfg nn_stock 300
506   
507    #set_namelist 1_namelist_ice_cfg ln_icethd .true.
508    set_namelist 1_namelist_ice_cfg ln_icedyn .true.
509    set_namelist 1_namelist_ice_cfg ln_dynFULL .true.
510    set_namelist 1_namelist_ice_cfg ln_dynRHGADV .false.
511    set_namelist 1_namelist_ice_cfg ln_dynADV .false.
512    if [ ${USING_MPMD} == "yes" ] ; then
513        set_xio_using_server iodef.xml true
514    else
515        set_xio_using_server iodef.xml false
516    fi
517    cd ${SETTE_DIR}
518    . ./prepare_job.sh input_ICEDYN.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
519   
520    cd ${SETTE_DIR}
521    export TEST_NAME="SHORT"
522    . ./prepare_exe_dir.sh
523    cd ${EXE_DIR}
524    set_namelist namelist_cfg cn_exp \"ICEDYN_SHORT\"
525    set_namelist namelist_cfg nn_it000 101
526    set_namelist namelist_cfg nn_itend 200
527    set_namelist namelist_cfg nn_stock 100
528    set_namelist namelist_cfg ln_rstart .true.
529    set_namelist namelist_cfg nn_rstctl 2
530   
531    #set_namelist namelist_ice_cfg ln_icethd .true.
532    set_namelist namelist_ice_cfg ln_icedyn .true.
533    set_namelist namelist_ice_cfg ln_dynFULL .true.
534    set_namelist namelist_ice_cfg ln_dynRHGADV .false.
535    set_namelist namelist_ice_cfg ln_dynADV .false.
536    set_namelist namelist_cfg cn_ocerst_in \"ICEDYN_LONG_00000100_restart\"
537    set_namelist namelist_ice_cfg cn_icerst_in \"ICEDYN_LONG_00000100_restart_ice\"
538   
539    set_namelist 1_namelist_cfg cn_exp \"ICEDYN_SHORT\"
540    set_namelist 1_namelist_cfg nn_it000 301
541    set_namelist 1_namelist_cfg nn_itend 600
542    set_namelist 1_namelist_cfg nn_stock 300
543    set_namelist 1_namelist_cfg ln_rstart .true.
544    set_namelist 1_namelist_cfg nn_rstctl 2
545   
546    #set_namelist 1_namelist_ice_cfg ln_icethd .true.
547    set_namelist 1_namelist_ice_cfg ln_icedyn .true.
548    set_namelist 1_namelist_ice_cfg ln_dynFULL .true.
549    set_namelist 1_namelist_ice_cfg ln_dynRHGADV .false.
550    set_namelist 1_namelist_ice_cfg ln_dynADV .false.
551    set_namelist 1_namelist_cfg cn_ocerst_in \"ICEDYN_LONG_00000300_restart\"
552    set_namelist 1_namelist_ice_cfg cn_icerst_in \"ICEDYN_LONG_00000300_restart_ice\"
553   
554   
555    if [ ${USING_MPMD} == "yes" ] ; then
556        set_xio_using_server iodef.xml true
557    else
558        set_xio_using_server iodef.xml false
559    fi
560    if [ $NPROC -eq 1 ] ;  then
561        ln -sf ../LONG/ICEDYN_LONG_00000100_restart.nc .
562        ln -sf ../LONG/ICEDYN_LONG_00000100_restart_ice.nc .
563        ln -sf ../LONG/1_ICEDYN_LONG_00000300_restart.nc .
564        ln -sf ../LONG/1_ICEDYN_LONG_00000300_restart_ice.nc .
565    else
566        for (( i=1; i<=$NPROC; i++)) ; do
567            L_NPROC=$(( $i - 1 ))
568            L_NPROC=`printf "%04d\n" ${L_NPROC}`
569            ln -sf ../LONG/ICEDYN_LONG_00000100_restart_${L_NPROC}.nc .
570            ln -sf ../LONG/ICEDYN_LONG_00000100_restart_ice_${L_NPROC}.nc .
571            ln -sf ../LONG/1_ICEDYN_LONG_00000300_restart_${L_NPROC}.nc .
572            ln -sf ../LONG/1_ICEDYN_LONG_00000300_restart_ice_${L_NPROC}.nc .
573        done
574    fi
575
576    cd ${SETTE_DIR}
577    . ./prepare_job.sh input_ICEDYN.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
578    cd ${SETTE_DIR}
579    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
580
581
582## Reproducibility tests for ICEDYN
583    export TEST_NAME="REPRO_2_3"
584    cd ${MAIN_DIR}
585    cd ${SETTE_DIR}
586    . ./param.cfg
587    . ./all_functions.sh
588    . ./prepare_exe_dir.sh
589    JOB_FILE=${EXE_DIR}/run_job.sh
590    NPROC=6
591    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
592    cd ${EXE_DIR}
593    set_namelist namelist_cfg cn_exp \"ICEDYN_23\"
594    set_namelist namelist_cfg nn_it000 1
595    set_namelist namelist_cfg nn_itend 200
596    set_namelist namelist_cfg nn_stock 100
597    set_namelist namelist_cfg jpni 2
598    set_namelist namelist_cfg jpnj 3
599    set_namelist namelist_cfg jpnij 6
600    set_namelist namelist_cfg ln_ctl .true.
601
602    #set_namelist namelist_ice_cfg ln_icethd .true.
603    set_namelist namelist_ice_cfg ln_icedyn .true.
604    set_namelist namelist_ice_cfg ln_dynFULL .true.
605    set_namelist namelist_ice_cfg ln_dynRHGADV .false.
606    set_namelist namelist_ice_cfg ln_dynADV .false.
607   
608    set_namelist 1_namelist_cfg cn_exp \"ICEDYN_23\"
609    set_namelist 1_namelist_cfg nn_it000 1
610    set_namelist 1_namelist_cfg nn_itend 600
611    set_namelist 1_namelist_cfg nn_stock 300
612    set_namelist 1_namelist_cfg jpni 2
613    set_namelist 1_namelist_cfg jpnj 3
614    set_namelist 1_namelist_cfg jpnij 6
615    set_namelist 1_namelist_cfg ln_ctl .true.
616
617    #set_namelist 1_namelist_ice_cfg ln_icethd .true.
618    set_namelist 1_namelist_ice_cfg ln_icedyn .true.
619    set_namelist 1_namelist_ice_cfg ln_dynFULL .true.
620    set_namelist 1_namelist_ice_cfg ln_dynRHGADV .false.
621    set_namelist 1_namelist_ice_cfg ln_dynADV .false.
622
623    if [ ${USING_MPMD} == "yes" ] ; then
624       set_xio_using_server iodef.xml true
625    else
626       set_xio_using_server iodef.xml false
627    fi
628    cd ${SETTE_DIR}
629    . ./prepare_job.sh input_ICEDYN.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
630    cd ${SETTE_DIR}
631    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
632
633    cd ${SETTE_DIR}
634    export TEST_NAME="REPRO_3_2"
635    . ./prepare_exe_dir.sh
636    JOB_FILE=${EXE_DIR}/run_job.sh
637    NPROC=6
638    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
639    cd ${EXE_DIR}
640
641    set_namelist namelist_cfg cn_exp \"ICEDYN_32\"
642    set_namelist namelist_cfg nn_it000 1
643    set_namelist namelist_cfg nn_itend 200
644    set_namelist namelist_cfg nn_stock 100
645    set_namelist namelist_cfg jpni 3
646    set_namelist namelist_cfg jpnj 2
647    set_namelist namelist_cfg jpnij 6
648    set_namelist namelist_cfg ln_ctl .true.
649
650    #set_namelist namelist_ice_cfg ln_icethd .true.
651    set_namelist namelist_ice_cfg ln_icedyn .true.
652    set_namelist namelist_ice_cfg ln_dynFULL .true.
653    set_namelist namelist_ice_cfg ln_dynRHGADV .false.
654    set_namelist namelist_ice_cfg ln_dynADV .false.
655   
656    set_namelist 1_namelist_cfg cn_exp \"ICEDYN_32\"
657    set_namelist 1_namelist_cfg nn_it000 1
658    set_namelist 1_namelist_cfg nn_itend 600
659    set_namelist 1_namelist_cfg nn_stock 300
660    set_namelist 1_namelist_cfg jpni 3
661    set_namelist 1_namelist_cfg jpnj 2
662    set_namelist 1_namelist_cfg jpnij 6
663    set_namelist 1_namelist_cfg ln_ctl .true.
664
665    #set_namelist 1_namelist_ice_cfg ln_icethd .true.
666    set_namelist 1_namelist_ice_cfg ln_icedyn .true.
667    set_namelist 1_namelist_ice_cfg ln_dynFULL .true.
668    set_namelist 1_namelist_ice_cfg ln_dynRHGADV .false.
669    set_namelist 1_namelist_ice_cfg ln_dynADV .false.
670   
671    if [ ${USING_MPMD} == "yes" ] ; then
672       set_xio_using_server iodef.xml true
673    else
674       set_xio_using_server iodef.xml false
675    fi
676    cd ${SETTE_DIR}
677    . ./prepare_job.sh input_ICEDYN.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
678    cd ${SETTE_DIR}
679    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
680
681fi
682
683# ------
684# ISOMIP
685# ------
686if [ ${config} -eq 5 ] ;  then
687## Restartability tests
688    export TEST_NAME="LONG"
689    cd ${MAIN_DIR}
690    . ./makenemo -m ${CMP_NAM} -n ISOMIP_ST -a ISOMIP -j 8 del_key ${DEL_KEYS}
691    cd ${SETTE_DIR}
692    . ./param.cfg
693    . ./all_functions.sh
694    . ./prepare_exe_dir.sh
695    JOB_FILE=${EXE_DIR}/run_job.sh
696    NPROC=15
697    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
698    cd ${EXE_DIR}
699    set_namelist namelist_cfg cn_exp \"ISOMIP_LONG\"
700    set_namelist namelist_cfg nn_it000 1
701    set_namelist namelist_cfg nn_itend 96
702    set_namelist namelist_cfg nn_stock 48
703    set_namelist namelist_cfg jpni 5
704    set_namelist namelist_cfg jpnj 3
705    set_namelist namelist_cfg jpnij 15
706    set_namelist namelist_cfg ln_ctl .true.
707    if [ ${USING_MPMD} == "yes" ] ; then
708       set_xio_using_server iodef.xml true
709    else
710       set_xio_using_server iodef.xml false
711    fi
712    cd ${SETTE_DIR}
713    . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
714
715    cd ${SETTE_DIR}
716    export TEST_NAME="SHORT"
717    . ./prepare_exe_dir.sh
718    cd ${EXE_DIR}
719    set_namelist namelist_cfg cn_exp \"ISOMIP_SHORT\"
720    set_namelist namelist_cfg nn_it000 49
721    set_namelist namelist_cfg nn_itend 96
722    set_namelist namelist_cfg nn_stock 48
723    set_namelist namelist_cfg ln_rstart .true.
724    set_namelist namelist_cfg nn_rstctl 2
725    set_namelist namelist_cfg jpni 5
726    set_namelist namelist_cfg jpnj 3
727    set_namelist namelist_cfg jpnij 15
728    set_namelist namelist_cfg ln_ctl .true.
729    set_namelist namelist_cfg cn_ocerst_in \"ISOMIP_LONG_00000048_restart\"
730    if [ ${USING_MPMD} == "yes" ] ; then
731       set_xio_using_server iodef.xml true
732    else
733       set_xio_using_server iodef.xml false
734    fi
735    for (( i=1; i<=$NPROC; i++)) ; do
736        L_NPROC=$(( $i - 1 ))
737        L_NPROC=`printf "%04d\n" ${L_NPROC}`
738        ln -sf ../LONG/ISOMIP_LONG_00000048_restart_${L_NPROC}.nc .
739    done
740
741    cd ${SETTE_DIR}
742    . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
743    cd ${SETTE_DIR}
744    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
745
746## Reproducibility tests
747    export TEST_NAME="REPRO_7_3"
748    cd ${MAIN_DIR}
749    cd ${SETTE_DIR}
750    . ./param.cfg
751    . ./all_functions.sh
752    . ./prepare_exe_dir.sh
753    JOB_FILE=${EXE_DIR}/run_job.sh
754    NPROC=21
755    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
756    cd ${EXE_DIR}
757    set_namelist namelist_cfg cn_exp \"ISOMIP_73\"
758    set_namelist namelist_cfg nn_it000 1
759    set_namelist namelist_cfg nn_itend 48
760    set_namelist namelist_cfg jpni 7
761    set_namelist namelist_cfg jpnj 3
762    set_namelist namelist_cfg jpnij 21
763    set_namelist namelist_cfg ln_ctl .true.
764    if [ ${USING_MPMD} == "yes" ] ; then
765       set_xio_using_server iodef.xml true
766    else
767       set_xio_using_server iodef.xml false
768    fi
769    cd ${SETTE_DIR}
770    . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
771    cd ${SETTE_DIR}
772    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
773
774    cd ${SETTE_DIR}
775    export TEST_NAME="REPRO_8_4"
776    . ./prepare_exe_dir.sh
777    JOB_FILE=${EXE_DIR}/run_job.sh
778    NPROC=32
779    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
780    cd ${EXE_DIR}
781    set_namelist namelist_cfg cn_exp \"ISOMIP_84\"
782    set_namelist namelist_cfg nn_it000 1
783    set_namelist namelist_cfg nn_itend 48
784    set_namelist namelist_cfg jpni 8
785    set_namelist namelist_cfg jpnj 4
786    set_namelist namelist_cfg jpnij 32
787    set_namelist namelist_cfg ln_ctl .true.
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}
795    cd ${SETTE_DIR}
796    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
797
798fi
799
800#----
801done
Note: See TracBrowser for help on using the repository browser.