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.sh in branches/2013/dev_MERCATOR_UKMO_2013/NEMOGCM/SETTE – NEMO

source: branches/2013/dev_MERCATOR_UKMO_2013/NEMOGCM/SETTE/sette.sh @ 8129

Last change on this file since 8129 was 4233, checked in by cbricaud, 11 years ago

commit dev_r3948_NOC_FK into dev_MERCATOR_UKMO_2013

  • Property svn:executable set to *
File size: 29.5 KB
Line 
1#!/bin/bash
2############################################################
3# Author : Simona Flavoni for NEMO
4# Contact: sflod@locean-ipsl.upmc.fr
5# 2013   : A.C. Coward added options for testing with XIOS in dettached mode
6#
7# sette.sh   : principal script of SET TEsts for NEMO (SETTE)
8# ----------------------------------------------------------------------
9# NEMO/SETTE , NEMO Consortium (2010)
10# Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
11# ----------------------------------------------------------------------
12#
13#############################################################
14#set -x
15set -o posix
16#set -u
17#set -e
18# ===========
19# DESCRIPTION
20# ===========
21#
22# Variables to be checked by user:
23#
24# COMPILER          : name of compiler as defined in NEMOGCM/ARCH directory
25# BATCH_COMMAND_PAR :  name of the command for submitting parallel batch jobs
26# BATCH_COMMAND_SEQ :  name of the command for submitting sequential batch jobs 
27# INTERACT_FLAG     : flag to run in interactive mode "yes"
28#                           to run in batch mode "no"
29# MPIRUN_FLAG       : flag to run in parallel (MPI) "yes"
30#                           to run in sequential mode (NB_PROC = 1) "no"
31# USING_XIOS        : flag to control the activation of key_iomput
32#                      "yes" to compile using key_iomput and link to the external XIOS library
33#                      "no"  to compile without key_iomput and link to the old IOIPSL library
34# USING_MPMD        : flag to control the use of stand-alone IO servers
35#                     requires USING_XIOS="yes"
36#                      "yes" to run in MPMD (detached) mode with stand-alone IO servers
37#                      "no"  to run in SPMD (attached) mode without separate IO servers
38# NUM_XIOSERVERS    : number of stand-alone IO servers to employ
39#                     set to zero if USING_MPMD="no"
40#
41# Principal script is sette.sh, that calls
42#
43#  makenemo  : to create successive exectuables in ${CONFIG_NAME}/BLD/bin/nemo.exe
44#              and links to opa in ${CONFIG_NAME}/EXP00)
45#
46#  param.cfg : sets and loads following directories:
47#
48#   FORCING_DIR         : is the directory for forcing files (tarfile)
49#   INPUT_DIR           : is the directory for input files storing
50#   TMPDIR              : is the temporary directory (if needed)
51#   NEMO_VALIDATION_DIR : is the validation directory
52#
53#   (NOTE: this file is the same for all configrations to be tested with sette)
54#
55#   all_functions.sh : loads functions used by sette (note: new functions can be added here)
56#   set_namelist     : function declared in all_functions that sets namelist parameters
57#   post_test_tidyup : creates validation storage directory and copies required output files
58#                      (solver.stat and ocean.output) in it after execution of test.
59#
60#  VALIDATION tree is:
61#
62#   NEMO_VALIDATION_DIR/WCONFIG_NAME/WCOMPILER_NAME/TEST_NAME/REVISION_NUMBER(or DATE)
63#
64#  prepare_exe_dir.sh : defines and creates directory where the test is executed
65#                       execution directory takes name of TEST_NAME defined for every test
66#                       in sette.sh. (each test in executed in its own directory)
67#
68#  prepare_job.sh     : to generate the script run_job.sh
69#
70#  fcm_job.sh         : run in batch (INTERACT_FLAG="no") or interactive (INTERACT_FLAG="yes")
71#                        see sette.sh and BATCH_TEMPLATE directory
72#
73#  NOTE: jobs requiring initial or forcing data need to have an input_CONFIG.cfg in which
74#        can be found paths to the input tar file)
75#  NOTE: if job is not launched for any reason you have the executable ready in ${EXE_DIR}
76#        directory
77#  NOTE: the changed namelists are left in ${EXE_DIR} directory whereas original namelists
78#        remain in ${NEW_CONF}/EXP00
79#
80#  NOTE: a log file, output.sette, is created in ${SETTE_DIR} with the echoes of
81#        executed commands
82#
83#  NOTE: if sette.sh is stopped in output.sette there is written the last command
84#        executed by sette.sh
85#
86# example use: ./sette.sh
87#########################################################################################
88#
89# Compiler among those in NEMOGCM/ARCH
90COMPILER=PW6_VARGAS
91export BATCH_COMMAND_PAR="llsubmit"
92export BATCH_COMMAND_SEQ=$BATCH_COMMAND_PAR
93export INTERACT_FLAG="no"
94export MPIRUN_FLAG="yes"
95export USING_XIOS="yes"
96#
97export DEL_KEYS="key_iomput"
98if [ ${USING_XIOS} == "yes" ] 
99 then
100   export DEL_KEYS=""
101fi
102#
103# Settings which control the use of stand alone servers (only relevant if using xios)
104#
105export USING_MPMD="no"
106export NUM_XIOSERVERS=4
107export JOB_PREFIX=batch-mpmd
108#
109if [ ${USING_MPMD} == "no" ] 
110 then
111   export NUM_XIOSERVERS=0
112   export JOB_PREFIX=batch
113fi
114#
115#
116if [ ${USING_MPMD} == "yes" ] && [ ${USING_XIOS} == "no"]
117 then
118   echo "Incompatible choices. MPMD mode requires the XIOS server"
119   exit
120fi
121#
122
123# Directory to run the tests
124SETTE_DIR=$(cd $(dirname "$0"); pwd)
125MAIN_DIR=${SETTE_DIR%/SETTE}
126CONFIG_DIR=${MAIN_DIR}/CONFIG
127TOOLS_DIR=${MAIN_DIR}/TOOLS
128COMPIL_DIR=${TOOLS_DIR}/COMPILE
129
130CMP_NAM=${1:-$COMPILER}
131# Copy job_batch_COMPILER file for specific compiler into job_batch_template
132cd ${SETTE_DIR}
133cp BATCH_TEMPLATE/${JOB_PREFIX}-${COMPILER} job_batch_template || exit
134
135for config in 1 2 3 4 5 6 7 8 9
136do
137
138# TESTS FOR GYRE CONFIGURATION
139if [ ${config} -eq 1 ] ;  then
140    ## Restartability tests for GYRE
141    export TEST_NAME="LONG"
142    cd ${SETTE_DIR}
143    . ../CONFIG/makenemo -m ${CMP_NAM} -n GYRE_LONG -r GYRE -j 8 add_key "key_mpp_mpi" del_key ${DEL_KEYS}
144    cd ${SETTE_DIR}
145    . param.cfg
146    . all_functions.sh
147    . prepare_exe_dir.sh
148    JOB_FILE=${EXE_DIR}/run_job.sh
149    NPROC=4
150    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
151    cd ${EXE_DIR}
152    set_namelist namelist cn_exp \"GYRE_LONG\"
153    set_namelist namelist nn_it000 1
154    set_namelist namelist nn_itend 120
155    set_namelist namelist nn_stock 60
156    set_namelist namelist ln_clobber .true.
157    set_namelist namelist nn_solv 2
158    set_namelist namelist jpni 2
159    set_namelist namelist jpnj 2
160    set_namelist namelist jpnij 4
161    if [ ${USING_MPMD} == "yes" ] ; then
162       set_xio_using_server iodef.xml true
163    else
164       set_xio_using_server iodef.xml false
165    fi
166    cd ${SETTE_DIR}
167    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
168
169    cd ${SETTE_DIR}
170    export TEST_NAME="SHORT"
171    . prepare_exe_dir.sh
172    cd ${EXE_DIR}
173    set_namelist namelist cn_exp \"GYRE_SHORT\"
174    set_namelist namelist nn_it000 61
175    set_namelist namelist nn_itend 120
176    set_namelist namelist nn_stock 60
177    set_namelist namelist ln_rstart .true.
178    set_namelist namelist nn_rstctl 2
179    set_namelist namelist ln_clobber .true.
180    set_namelist namelist nn_solv 2
181    set_namelist namelist jpni 2
182    set_namelist namelist jpnj 2
183    set_namelist namelist jpnij 4
184    set_namelist namelist cn_ocerst_in \"GYRE_LONG_00000060_restart\"
185    if [ ${USING_MPMD} == "yes" ] ; then
186       set_xio_using_server iodef.xml true
187    else
188       set_xio_using_server iodef.xml false
189    fi
190    for (( i=1; i<=$NPROC; i++)) ; do
191        L_NPROC=$(( $i - 1 ))
192        L_NPROC=`printf "%04d\n" ${L_NPROC}`
193        ln -sf ../LONG/GYRE_LONG_00000060_restart_${L_NPROC}.nc .
194    done
195    if [ ${USING_MPMD} == "yes" ] ; then
196       set_xio_using_server iodef.xml true
197    else
198       set_xio_using_server iodef.xml false
199    fi
200    cd ${SETTE_DIR}
201    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
202    cd ${SETTE_DIR}
203    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
204fi
205
206if [ ${config} -eq 2 ] ;  then
207    ## Reproducibility tests for GYRE
208    export TEST_NAME="REPRO_1_4"
209    cd ${SETTE_DIR}
210    . ../CONFIG/makenemo -m ${CMP_NAM} -n GYRE_4 -r GYRE -j 8 add_key "key_mpp_mpi key_mpp_rep" del_key ${DEL_KEYS}
211    cd ${SETTE_DIR}
212    . param.cfg
213    . all_functions.sh
214    . prepare_exe_dir.sh
215    JOB_FILE=${EXE_DIR}/run_job.sh
216    NPROC=4
217    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
218    cd ${EXE_DIR}
219    set_namelist namelist cn_exp \"GYRE_14\"
220    set_namelist namelist nn_it000 1
221    set_namelist namelist nn_itend 60
222    set_namelist namelist nn_fwb 0
223    set_namelist namelist nn_bench 0
224    set_namelist namelist ln_ctl .false.
225    set_namelist namelist ln_clobber .true.
226    set_namelist namelist nn_solv 2
227    set_namelist namelist jpni 1
228    set_namelist namelist jpnj 4
229    set_namelist namelist jpnij 4
230    if [ ${USING_MPMD} == "yes" ] ; then
231       set_xio_using_server iodef.xml true
232    else
233       set_xio_using_server iodef.xml false
234    fi
235    cd ${SETTE_DIR}
236    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
237    cd ${SETTE_DIR}
238    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
239
240    cd ${SETTE_DIR}
241    export TEST_NAME="REPRO_2_2"
242    . prepare_exe_dir.sh
243    JOB_FILE=${EXE_DIR}/run_job.sh
244    NPROC=4
245    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
246    cd ${EXE_DIR}
247    set_namelist namelist cn_exp \"GYRE_22\"
248    set_namelist namelist nn_it000 1
249    set_namelist namelist nn_itend 60
250    set_namelist namelist nn_fwb 0
251    set_namelist namelist ln_ctl .false.
252    set_namelist namelist ln_clobber .true.
253    set_namelist namelist nn_solv 2
254    set_namelist namelist jpni 2
255    set_namelist namelist jpnj 2
256    set_namelist namelist jpnij 4
257    if [ ${USING_MPMD} == "yes" ] ; then
258       set_xio_using_server iodef.xml true
259    else
260       set_xio_using_server iodef.xml false
261    fi
262    cd ${SETTE_DIR}
263    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
264    cd ${SETTE_DIR}
265    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
266
267fi
268
269# TESTS FOR ORCA2_LIM_PISCES CONFIGURATION
270if [ ${config} -eq 3 ] ;  then
271    ## Restartability tests for ORCA2_LIM_PISCES
272    export TEST_NAME="LONG"
273    cd ${SETTE_DIR}
274    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2LIMPIS_LONG -r ORCA2_LIM_PISCES -j 8 add_key "key_mpp_mpi" del_key ${DEL_KEYS}
275    cd ${SETTE_DIR}
276    . param.cfg
277    . all_functions.sh
278    . prepare_exe_dir.sh
279    JOB_FILE=${EXE_DIR}/run_job.sh
280    NPROC=4
281    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
282    cd ${EXE_DIR}
283    set_namelist namelist cn_exp \"O2LP_LONG\"
284    set_namelist namelist nn_it000 1
285    set_namelist namelist nn_itend 150
286    set_namelist namelist nn_stock 75
287    set_namelist namelist ln_clobber .true.
288    set_namelist namelist jpni 2
289    set_namelist namelist jpnj 2
290    set_namelist namelist jpnij 4
291    set_namelist namelist nn_solv 2
292    set_namelist namelist_top ln_trcdta .false.
293    set_namelist namelist_top ln_diatrc .false.
294    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
295    # if not you need input files, and for tests is not necessary
296    set_namelist namelist_pisces ln_presatm .false.
297    set_namelist namelist_pisces ln_varpar .false.
298    set_namelist namelist_pisces ln_dust .false.
299    set_namelist namelist_pisces ln_solub .false.
300    set_namelist namelist_pisces ln_river .false.
301    set_namelist namelist_pisces ln_ndepo .false.
302    set_namelist namelist_pisces ln_ironsed .false.
303    set_namelist namelist_pisces ln_hydrofe .false.
304    if [ ${USING_MPMD} == "yes" ] ; then
305       set_xio_using_server iodef.xml true
306    else
307       set_xio_using_server iodef.xml false
308    fi
309    cd ${SETTE_DIR}
310    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
311   
312    cd ${SETTE_DIR}
313    export TEST_NAME="SHORT"
314    . prepare_exe_dir.sh
315    cd ${EXE_DIR}
316    set_namelist namelist cn_exp \"O2LP_SHORT\"
317    set_namelist namelist nn_it000 76
318    set_namelist namelist nn_itend 150
319    set_namelist namelist nn_stock 75
320    set_namelist namelist ln_rstart .true.
321    set_namelist namelist nn_rstctl 2
322    set_namelist namelist ln_clobber .true.
323    set_namelist namelist jpni 2
324    set_namelist namelist jpnj 2
325    set_namelist namelist jpnij 4
326    set_namelist namelist nn_solv 2
327    set_namelist namelist_top ln_diatrc .false.
328    set_namelist namelist_top ln_rsttr .true.
329    set_namelist namelist_top nn_rsttr 2
330    set_namelist namelist cn_ocerst_in \"O2LP_LONG_00000075_restart\"
331    set_namelist namelist_ice cn_icerst_in \"O2LP_LONG_00000075_restart_ice\"
332    set_namelist namelist_top cn_trcrst_in \"O2LP_LONG_00000075_restart_trc\"
333    # put ln_ironsed, ln_river, ln_ndepo, ln_dust
334    # if not you need input files, and for tests is not necessary
335    set_namelist namelist_pisces ln_presatm .false.
336    set_namelist namelist_pisces ln_varpar .false.
337    set_namelist namelist_pisces ln_dust .false.
338    set_namelist namelist_pisces ln_solub .false.
339    set_namelist namelist_pisces ln_river .false.
340    set_namelist namelist_pisces ln_ndepo .false.
341    set_namelist namelist_pisces ln_ironsed .false.
342    set_namelist namelist_pisces ln_hydrofe .false.
343    # put ln_pisdmp to false : no restoring to global mean value
344    set_namelist namelist_pisces ln_pisdmp .false.
345    for (( i=1; i<=$NPROC; i++)) ; do
346        L_NPROC=$(( $i - 1 ))
347        L_NPROC=`printf "%04d\n" ${L_NPROC}`
348        ln -sf ../LONG/O2LP_LONG_00000075_restart_${L_NPROC}.nc .
349        ln -sf ../LONG/O2LP_LONG_00000075_restart_trc_${L_NPROC}.nc .
350        ln -sf ../LONG/O2LP_LONG_00000075_restart_ice_${L_NPROC}.nc .
351    done
352    if [ ${USING_MPMD} == "yes" ] ; then
353       set_xio_using_server iodef.xml true
354    else
355       set_xio_using_server iodef.xml false
356    fi
357    cd ${SETTE_DIR}
358    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
359    cd ${SETTE_DIR}
360    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
361fi
362
363if [ ${config} -eq 4 ] ;  then
364    ## Reproducibility tests for ORCA2_LIM_PISCES
365    export TEST_NAME="REPRO_4_4"
366    cd ${SETTE_DIR}
367    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2LIMPIS_16 -r ORCA2_LIM_PISCES -j 8 add_key "key_mpp_mpi key_mpp_rep" del_key ${DEL_KEYS}
368    cd ${SETTE_DIR}
369    . param.cfg
370    . all_functions.sh
371    . prepare_exe_dir.sh
372    JOB_FILE=${EXE_DIR}/run_job.sh
373    NPROC=16
374    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
375    cd ${EXE_DIR}
376    set_namelist namelist nn_it000 1
377    set_namelist namelist nn_itend 75
378    set_namelist namelist nn_fwb 0
379    set_namelist namelist ln_ctl .false.
380    set_namelist namelist ln_clobber .true.
381    set_namelist namelist jpni 4
382    set_namelist namelist jpnj 4
383    set_namelist namelist jpnij 16
384    set_namelist namelist nn_solv 2
385    set_namelist namelist_top ln_trcdta .false.
386    set_namelist namelist_top ln_diatrc .false.
387    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
388    # if not you need input files, and for tests is not necessary
389    set_namelist namelist_pisces ln_presatm .false.
390    set_namelist namelist_pisces ln_varpar .false.
391    set_namelist namelist_pisces ln_dust .false.
392    set_namelist namelist_pisces ln_solub .false.
393    set_namelist namelist_pisces ln_river .false.
394    set_namelist namelist_pisces ln_ndepo .false.
395    set_namelist namelist_pisces ln_ironsed .false.
396    set_namelist namelist_pisces ln_hydrofe .false.
397    # put ln_pisdmp to false : no restoring to global mean value
398    set_namelist namelist_pisces ln_pisdmp .false.
399    if [ ${USING_MPMD} == "yes" ] ; then
400       set_xio_using_server iodef.xml true
401    else
402       set_xio_using_server iodef.xml false
403    fi
404    cd ${SETTE_DIR}
405    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
406    cd ${SETTE_DIR}
407    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
408
409    cd ${SETTE_DIR}
410    export TEST_NAME="REPRO_2_8"
411    . prepare_exe_dir.sh
412    JOB_FILE=${EXE_DIR}/run_job.sh
413    NPROC=16
414    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
415    cd ${EXE_DIR}
416    set_namelist namelist nn_it000 1
417    set_namelist namelist nn_itend 75
418    set_namelist namelist nn_fwb 0
419    set_namelist namelist ln_clobber .true.
420    set_namelist namelist jpni 2
421    set_namelist namelist jpnj 8
422    set_namelist namelist jpnij 16
423    set_namelist namelist nn_solv 2
424    set_namelist namelist_top ln_trcdta .false.
425    set_namelist namelist_top ln_diatrc .false.
426    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
427    # if not you need input files, and for tests is not necessary
428    set_namelist namelist_pisces ln_presatm .false.
429    set_namelist namelist_pisces ln_varpar .false.
430    set_namelist namelist_pisces ln_dust .false.
431    set_namelist namelist_pisces ln_solub .false.
432    set_namelist namelist_pisces ln_river .false.
433    set_namelist namelist_pisces ln_ndepo .false.
434    set_namelist namelist_pisces ln_ironsed .false.
435    set_namelist namelist_pisces ln_hydrofe .false.
436    # put ln_pisdmp to false : no restoring to global mean value
437    set_namelist namelist_pisces ln_pisdmp .false.
438    if [ ${USING_MPMD} == "yes" ] ; then
439       set_xio_using_server iodef.xml true
440    else
441       set_xio_using_server iodef.xml false
442    fi
443    cd ${SETTE_DIR}
444    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
445    cd ${SETTE_DIR}
446    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
447fi
448
449# TESTS FOR ORCA2_OFF_PISCES CONFIGURATION
450if [ ${config} -eq 5 ] ;  then
451    ## Restartability tests for ORCA2_OFF_PISCES
452    export TEST_NAME="LONG"
453    cd ${SETTE_DIR}
454    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2OFFPIS_LONG -r ORCA2_OFF_PISCES -j 8 add_key "key_mpp_mpi key_mpp_rep" del_key ${DEL_KEYS}
455    cd ${SETTE_DIR}
456    . param.cfg
457    . all_functions.sh
458    . prepare_exe_dir.sh
459    JOB_FILE=${EXE_DIR}/run_job.sh
460    NPROC=4
461    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
462    cd ${EXE_DIR}
463    set_namelist namelist cn_exp \"OFFP_LONG\"
464    set_namelist namelist nn_it000 1
465    set_namelist namelist nn_itend 40
466    set_namelist namelist nn_stock 20
467    set_namelist namelist ln_clobber .true.
468    set_namelist namelist jpni 2
469    set_namelist namelist jpnj 2
470    set_namelist namelist jpnij 4
471    set_namelist namelist_top ln_trcdta .false.
472    set_namelist namelist_top ln_diatrc .false.
473    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
474    # if not you need input files, and for tests is not necessary
475    set_namelist namelist_pisces ln_presatm .false.
476    set_namelist namelist_pisces ln_varpar .false.
477    set_namelist namelist_pisces ln_dust .false.
478    set_namelist namelist_pisces ln_solub .false.
479    set_namelist namelist_pisces ln_river .false.
480    set_namelist namelist_pisces ln_ndepo .false.
481    set_namelist namelist_pisces ln_ironsed .false.
482    set_namelist namelist_pisces ln_hydrofe .false.
483    # put ln_pisdmp to false : no restoring to global mean value
484    set_namelist namelist_pisces ln_pisdmp .false.
485    if [ ${USING_MPMD} == "yes" ] ; then
486       set_xio_using_server iodef.xml true
487    else
488       set_xio_using_server iodef.xml false
489    fi
490    cd ${SETTE_DIR}
491    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
492   
493    cd ${SETTE_DIR}
494    export TEST_NAME="SHORT"
495    . prepare_exe_dir.sh
496    cd ${EXE_DIR}
497    set_namelist namelist cn_exp \"OFFP_SHORT\"
498    set_namelist namelist nn_it000 21
499    set_namelist namelist nn_itend 40
500    set_namelist namelist nn_stock 20
501    set_namelist namelist ln_clobber .true.
502    set_namelist namelist jpni 2
503    set_namelist namelist jpnj 2
504    set_namelist namelist jpnij 4
505    set_namelist namelist_top ln_diatrc .false.
506    set_namelist namelist_top ln_rsttr .true.
507    set_namelist namelist_top nn_rsttr 2
508    set_namelist namelist_top cn_trcrst_in \"OFFP_LONG_00000020_restart_trc\"
509    for (( i=1; i<=$NPROC; i++)) ; do
510        L_NPROC=$(( $i - 1 ))
511        L_NPROC=`printf "%04d\n" ${L_NPROC}`
512        ln -sf ../LONG/OFFP_LONG_00000020_restart_trc_${L_NPROC}.nc .
513    done
514    # put ln_ironsed, ln_river, ln_ndepo, ln_dust
515    # if not you need input files, and for tests is not necessary
516    set_namelist namelist_pisces ln_presatm .false.
517    set_namelist namelist_pisces ln_varpar .false.
518    set_namelist namelist_pisces ln_dust .false.
519    set_namelist namelist_pisces ln_solub .false.
520    set_namelist namelist_pisces ln_river .false.
521    set_namelist namelist_pisces ln_ndepo .false.
522    set_namelist namelist_pisces ln_ironsed .false.
523    set_namelist namelist_pisces ln_hydrofe .false.
524    # put ln_pisdmp to false : no restoring to global mean value
525    set_namelist namelist_pisces ln_pisdmp .false.
526    if [ ${USING_MPMD} == "yes" ] ; then
527       set_xio_using_server iodef.xml true
528    else
529       set_xio_using_server iodef.xml false
530    fi
531    cd ${SETTE_DIR}
532    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME}  ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
533    cd ${SETTE_DIR}
534    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
535fi
536
537if [ ${config} -eq 6 ] ;  then
538    ## Reproducibility tests for ORCA2_OFF_PISCES
539    export TEST_NAME="REPRO_4_4"
540    cd ${SETTE_DIR}
541    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2OFFPIS_16 -r ORCA2_OFF_PISCES -j 8 add_key "key_mpp_mpi key_mpp_rep" del_key ${DEL_KEYS}
542    cd ${SETTE_DIR}
543    . param.cfg
544    . all_functions.sh
545    . prepare_exe_dir.sh
546    JOB_FILE=${EXE_DIR}/run_job.sh
547    NPROC=16
548    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
549    cd ${EXE_DIR}
550    set_namelist namelist nn_it000 1
551    set_namelist namelist nn_itend 40
552    set_namelist namelist ln_ctl .false.
553    set_namelist namelist ln_clobber .true.
554    set_namelist namelist jpni 4
555    set_namelist namelist jpnj 4
556    set_namelist namelist jpnij 16
557    set_namelist namelist_top ln_trcdta .false.
558    set_namelist namelist_top ln_diatrc .false.
559    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
560    # if not you need input files, and for tests is not necessary
561    set_namelist namelist_pisces ln_presatm .false.
562    set_namelist namelist_pisces ln_varpar .false.
563    set_namelist namelist_pisces ln_dust .false.
564    set_namelist namelist_pisces ln_solub .false.
565    set_namelist namelist_pisces ln_river .false.
566    set_namelist namelist_pisces ln_ndepo .false.
567    set_namelist namelist_pisces ln_ironsed .false.
568    set_namelist namelist_pisces ln_hydrofe .false.
569    # put ln_pisdmp to false : no restoring to global mean value
570    set_namelist namelist_pisces ln_pisdmp .false.
571    if [ ${USING_MPMD} == "yes" ] ; then
572       set_xio_using_server iodef.xml true
573    else
574       set_xio_using_server iodef.xml false
575    fi
576    cd ${SETTE_DIR}
577    . ./prepare_job.sh input_ORCA2_OFF_PISCES.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    cd ${SETTE_DIR}
582    export TEST_NAME="REPRO_2_8"
583    . prepare_exe_dir.sh
584    JOB_FILE=${EXE_DIR}/run_job.sh
585    NPROC=16
586    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
587    cd ${EXE_DIR}
588    set_namelist namelist nn_it000 1
589    set_namelist namelist nn_itend 40
590    set_namelist namelist ln_ctl .false.
591    set_namelist namelist ln_clobber .true.
592    set_namelist namelist jpni 2
593    set_namelist namelist jpnj 8
594    set_namelist namelist jpnij 16
595    set_namelist namelist_top ln_trcdta .false.
596    set_namelist namelist_top ln_diatrc .false.
597    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
598    # if not you need input files, and for tests is not necessary
599    set_namelist namelist_pisces ln_presatm .false.
600    set_namelist namelist_pisces ln_varpar .false.
601    set_namelist namelist_pisces ln_dust .false.
602    set_namelist namelist_pisces ln_solub .false.
603    set_namelist namelist_pisces ln_river .false.
604    set_namelist namelist_pisces ln_ndepo .false.
605    set_namelist namelist_pisces ln_ironsed .false.
606    set_namelist namelist_pisces ln_hydrofe .false.
607    # put ln_pisdmp to false : no restoring to global mean value
608    set_namelist namelist_pisces ln_pisdmp .false.
609    if [ ${USING_MPMD} == "yes" ] ; then
610       set_xio_using_server iodef.xml true
611    else
612       set_xio_using_server iodef.xml false
613    fi
614    cd ${SETTE_DIR}
615    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
616    cd ${SETTE_DIR}
617    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
618fi
619
620# TESTS FOR AMM12 CONFIGURATION
621if [ ${config} -eq 7 ] ;  then
622    ## Restartability tests for AMM12
623    export TEST_NAME="LONG"
624    cd ${SETTE_DIR}
625    . ../CONFIG/makenemo -m ${CMP_NAM} -n AMM12_LONG -r AMM12 -j 8 add_key "key_tide" del_key ${DEL_KEYS}
626    cd ${SETTE_DIR}
627    . param.cfg
628    . all_functions.sh
629    . prepare_exe_dir.sh
630    JOB_FILE=${EXE_DIR}/run_job.sh
631    NPROC=32
632    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
633    cd ${EXE_DIR}
634    set_namelist namelist nn_it000 1
635    set_namelist namelist nn_itend 12
636    set_namelist namelist nn_stock 6
637    set_namelist namelist nn_fwb 0
638    set_namelist namelist ln_ctl .false.
639    set_namelist namelist ln_clobber .true.
640    set_namelist namelist nn_dyn2d 2
641    set_namelist namelist nn_tra_dta 0
642    set_namelist namelist cn_ocerst_in \"amm12.restart_20070101\"
643    set_namelist namelist jpni 8
644    set_namelist namelist jpnj 4
645    set_namelist namelist jpnij 32
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_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
653
654    cd ${SETTE_DIR}
655    export TEST_NAME="SHORT"
656    . prepare_exe_dir.sh
657    cd ${EXE_DIR}
658    set_namelist namelist nn_it000 7
659    set_namelist namelist nn_itend 12
660    set_namelist namelist nn_fwb 0
661    set_namelist namelist ln_ctl .false.
662    set_namelist namelist ln_clobber .true.
663    set_namelist namelist nn_dyn2d 2
664    set_namelist namelist nn_tra_dta 0
665    set_namelist namelist jpni 8
666    set_namelist namelist jpnj 4
667    set_namelist namelist jpnij 32
668    set_namelist namelist ln_rstart .true.
669    set_namelist namelist nn_rstctl 2
670    set_namelist namelist cn_ocerst_in \"AMM12_00000006_restart\"
671    for (( i=1; i<=$NPROC; i++)) ; do
672        L_NPROC=$(( $i - 1 ))
673        L_NPROC=`printf "%04d\n" ${L_NPROC}`
674        ln -sf ../LONG/AMM12_00000006_restart_${L_NPROC}.nc .
675    done
676    if [ ${USING_MPMD} == "yes" ] ; then
677       set_xio_using_server iodef.xml true
678    else
679       set_xio_using_server iodef.xml false
680    fi
681    cd ${SETTE_DIR}
682    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
683    cd ${SETTE_DIR}
684    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
685fi
686
687if [ ${config} -eq 8 ] ;  then
688## Reproducibility tests for AMM12
689    export TEST_NAME="REPRO_8_4"
690    cd ${SETTE_DIR}
691    . ../CONFIG/makenemo -m ${CMP_NAM} -n AMM12_32 -r AMM12 -j 8 add_key "key_mpp_rep key_tide" del_key ${DEL_KEYS}
692    cd ${SETTE_DIR}
693    . param.cfg
694    . all_functions.sh
695    . prepare_exe_dir.sh
696    JOB_FILE=${EXE_DIR}/run_job.sh
697    NPROC=32
698    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
699    cd ${EXE_DIR}
700    set_namelist namelist nn_it000 1
701    set_namelist namelist nn_itend 576
702    set_namelist namelist nn_fwb 0
703    set_namelist namelist ln_ctl .false.
704    set_namelist namelist ln_clobber .true.
705    set_namelist namelist nn_dyn2d 2
706    set_namelist namelist nn_tra_dta 0
707    set_namelist namelist cn_ocerst_in \"amm12.restart_20070101\"
708    set_namelist namelist jpni 8
709    set_namelist namelist jpnj 4
710    set_namelist namelist jpnij 32
711    if [ ${USING_MPMD} == "yes" ] ; then
712       set_xio_using_server iodef.xml true
713    else
714       set_xio_using_server iodef.xml false
715    fi
716    cd ${SETTE_DIR}
717    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
718    cd ${SETTE_DIR}
719    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
720
721    cd ${SETTE_DIR}
722    export TEST_NAME="REPRO_4_8"
723    . prepare_exe_dir.sh
724    cd ${EXE_DIR}
725    set_namelist namelist nn_it000 1
726    set_namelist namelist nn_itend 576
727    set_namelist namelist nn_fwb 0
728    set_namelist namelist ln_ctl .false.
729    set_namelist namelist nn_dyn2d 2
730    set_namelist namelist nn_tra_dta 0
731    set_namelist namelist ln_clobber .true.
732    set_namelist namelist cn_ocerst_in \"amm12.restart_20070101\"
733    set_namelist namelist jpni 4
734    set_namelist namelist jpnj 8
735    set_namelist namelist jpnij 32
736    if [ ${USING_MPMD} == "yes" ] ; then
737       set_xio_using_server iodef.xml true
738    else
739       set_xio_using_server iodef.xml false
740    fi
741    cd ${SETTE_DIR}
742    . ./prepare_job.sh input_AMM12.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}
745fi
746
747# TEST FOR ORCA2_LIM_AGRIF : simple test of running AGRIF (no restartability neither reproducibility tests)
748if [ ${config} -eq 9 ] ;  then
749    ## ORCA2_LIM with Agulhas AGRIF zoom in MPI
750    export TEST_NAME="SHORT"
751    cd ${SETTE_DIR}
752    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2AGUL_1_2 -r ORCA2_LIM -j 8 add_key "key_mpp_mpi key_mpp_rep key_agrif" del_key "key_zdftmx" del_key ${DEL_KEYS}
753    cd ${SETTE_DIR}
754    . param.cfg
755    . all_functions.sh
756    . prepare_exe_dir.sh
757    JOB_FILE=${EXE_DIR}/run_job.sh
758    NPROC=2
759    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
760    cd ${EXE_DIR}
761    set_namelist namelist nn_it000 1
762    set_namelist namelist nn_itend 75
763    set_namelist namelist ln_ctl .false.
764    set_namelist namelist ln_clobber .true.
765    set_namelist namelist jpni 1
766    set_namelist namelist jpnj 2
767    set_namelist namelist jpnij 2
768    set_namelist 1_namelist nn_it000 1
769    set_namelist 1_namelist nn_itend 150
770    set_namelist 1_namelist ln_ctl .false.
771    set_namelist 1_namelist ln_clobber .true.
772    if [ ${USING_MPMD} == "yes" ] ; then
773       set_xio_using_server iodef.xml true
774    else
775       set_xio_using_server iodef.xml false
776    fi
777    cd ${SETTE_DIR}
778    . ./prepare_job.sh input_ORCA2_LIM_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
779    cd ${SETTE_DIR}
780    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
781fi
782
783done
Note: See TracBrowser for help on using the repository browser.