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 trunk/NEMOGCM/SETTE – NEMO

source: trunk/NEMOGCM/SETTE/sette.sh @ 3537

Last change on this file since 3537 was 3537, checked in by flavoni, 10 years ago

update sette.sh,ok for trunk tests, see ticket: #941

  • Property svn:executable set to *
File size: 23.3 KB
Line 
1#!/bin/bash
2#############################################################
3# Author : Simona Flavoni for NEMO
4# Contact : sflod@locean-ipsl.upmc.fr
5#
6# sette.sh   : principal script of SET TEsts for NEMO (SETTE)
7# ----------------------------------------------------------------------
8# NEMO/SETTE , NEMO Consortium (2010)
9# Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
10# ----------------------------------------------------------------------
11#
12#############################################################
13#set -x
14set -o posix
15#set -u
16#set -e
17#+
18#
19# ================
20# sette.sh
21# ================
22#
23# ----------------------------------------------
24# Set of tests for NEMO
25# ----------------------------------------------
26#
27# SYNOPSIS
28# ========
29#
30# ::
31#
32#  $ ./sette.sh
33#
34# DESCRIPTION
35# ===========
36#
37# Variables to be checked by user:
38#
39# COMPILER : name of compiler as defined in NEMOGCM/ARCH directory
40#
41# BATCH_COMMAND :  name of the command for batch submission
42#
43# MPI_INTERACT : 
44#
45#         for MPP tests, "no" for batch execution, "yes" for interactive execution
46#
47#         NOTE: for run with 1 process tests are run always in MPI_INTERACT="yes"
48#
49# Principal script is sette.sh, that calls
50#
51#  makenemo
52#
53#   creates the exectuable in ${CONFIG_NAME}/BLD/bin/nemo.exe  (and its link opa in ${CONFIG_NAME}/EXP00)
54#
55#  param.cfg : sets and loads following directories:
56#
57#   FORCING_DIR : is the directory for forcing files (tarfile)
58#
59#   INPUT_DIR : is the directory for input files storing
60#
61#   TMPDIR : is the temporary directory (if needed)
62#
63#   NEMO_VALIDATION_DIR : is the validation directory
64#
65#   (NOTE: this file is the same for all configrations to be tested with sette)
66#
67#
68#  all_functions.sh : loads functions used by sette (note: new functions can be added here)
69#
70#   set_namelist : function declared in all_functions that set namelist parameters for tests
71#
72#   post_test_tidyup : creates validation storage directory and copy needed output files (solver.stat and ocean.output) in it after execution of test.
73#
74#   Tree of VALIDATION is:
75#
76#   NEMO_VALIDATION_DIR/WCONFIG_NAME/WCOMPILER_NAME/TEST_NAME/REVISION_NUMBER(or DATE)
77#
78#
79#  prepare_exe_dir.sh : defines and creates directory where the test is executed
80#
81#       execution directory takes name of TEST_NAME defined in every test in sette.sh
82#
83#       ( each test in executed in its own directory )
84#
85#
86#  fcm_job.sh
87#
88#   runs job in interactive or batch mode : all jobs using 1 process are run interactive, and all MPP jobs are
89#
90#   run in batch (MPI_INTERACT="no") or interactive (MPI_INTERACT="yes") see sette.sh and BATCH_TEMPLATE directory
91#
92#   (note this job needs to have an input_CONFIG.cfg in which can be found input tar file)
93#
94#  NOTE: if job is not launched for some problems you have executable ready in ${EXE_DIR} directory
95#
96#  NOTE: the changed namelists are leaved in ${EXE_DIR} directory whereas original namelist remains in ${NEW_CONF}/EXP00
97#
98#  in ${SETTE_DIR} is created output.sette with the echo of executed commands
99#
100#  if sette.sh is stopped in output.sette there is written the last command executed by sette.sh
101#
102#  if you run: ./sette.sh 2>&1 | tee out.sette
103#
104#  in ${SETTE_DIR} out.sette is redirected standard error & standard output
105#
106#
107# EXAMPLES
108# ========
109#
110# ::
111#
112#  $ ./sette.sh
113#
114#
115# TODO
116# ====
117#
118# option debug
119#
120# EVOLUTIONS
121# ==========
122#
123# $Id:$
124#
125#   * creation
126#
127#-
128#
129#-
130# Compiler among those in NEMOGCM/ARCH
131COMPILER=PW6_VARGAS
132export BATCH_COMMAND_PAR="llsubmit"
133export BATCH_COMMAND_SEQ=$BATCH_COMMAND_PAR
134export INTERACT_FLAG="no"
135export MPIRUN_FLAG="yes"
136
137# Directory to run the tests
138SETTE_DIR=$(cd $(dirname "$0"); pwd)
139MAIN_DIR=${SETTE_DIR%/SETTE}
140CONFIG_DIR=${MAIN_DIR}/CONFIG
141TOOLS_DIR=${MAIN_DIR}/TOOLS
142COMPIL_DIR=${TOOLS_DIR}/COMPILE
143
144CMP_NAM=${1:-$COMPILER}
145# Copy job_batch_COMPILER file for specific compiler into job_batch_template
146cd ${SETTE_DIR}
147cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
148
149for config in 1 2 3 4 5 6 7 8 9
150do
151
152# TESTS FOR GYRE_LOBSTER CONFIGURATION
153if [ ${config} -eq 1 ] ;  then
154    ## Restartability tests for GYRE_LOBSTER
155    export TEST_NAME="LONG"
156    cd ${SETTE_DIR}
157    . ../CONFIG/makenemo -m ${CMP_NAM} -n GYRELOB_LONG -r GYRE_LOBSTER add_key "key_mpp_mpi"
158    cd ${SETTE_DIR}
159    . param.cfg
160    . all_functions.sh
161    . prepare_exe_dir.sh
162    JOB_FILE=${EXE_DIR}/run_job.sh
163    NPROC=4
164    \rm ${JOB_FILE}
165    cd ${EXE_DIR}
166    set_namelist namelist cn_exp \"GYRELOB_LONG\"
167    set_namelist namelist nn_it000 1
168    set_namelist namelist nn_itend 120
169    set_namelist namelist nn_stock 60
170    set_namelist namelist ln_clobber .true.
171    set_namelist namelist nn_solv 2
172    set_namelist namelist_top ln_diatrc .false.
173    set_namelist namelist jpni 2
174    set_namelist namelist jpnj 2
175    set_namelist namelist jpnij 4
176    cd ${SETTE_DIR}
177    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
178
179    cd ${SETTE_DIR}
180    export TEST_NAME="SHORT"
181    . prepare_exe_dir.sh
182    cd ${EXE_DIR}
183    set_namelist namelist cn_exp \"GYRELOB_SHORT\"
184    set_namelist namelist nn_it000 61
185    set_namelist namelist nn_itend 120
186    set_namelist namelist nn_stock 60
187    set_namelist namelist ln_rstart .true.
188    set_namelist namelist nn_rstctl 2
189    set_namelist namelist ln_clobber .true.
190    set_namelist namelist nn_solv 2
191    set_namelist namelist jpni 2
192    set_namelist namelist jpnj 2
193    set_namelist namelist jpnij 4
194    set_namelist namelist cn_ocerst_in \"GYRELOB_LONG_00000060_restart\"
195    set_namelist namelist_top cn_trcrst_in \"GYRELOB_LONG_00000060_restart_trc\"
196    set_namelist namelist_top ln_diatrc .false.
197    set_namelist namelist_top ln_rsttr .true.
198    set_namelist namelist_top nn_rsttr 2
199    for (( i=1; i<=$NPROC; i++)) ; do
200        L_NPROC=$(( $i - 1 ))
201        L_NPROC=`printf "%04d\n" ${L_NPROC}`
202        ln -sf ../LONG/GYRELOB_LONG_00000060_restart_${L_NPROC}.nc .
203        ln -sf ../LONG/GYRELOB_LONG_00000060_restart_trc_${L_NPROC}.nc .
204    done
205    cd ${SETTE_DIR}
206    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
207    cd ${SETTE_DIR}
208    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
209fi
210
211if [ ${config} -eq 2 ] ;  then
212    ## Repropducibility tests for GYRE_LOBSTER
213    export TEST_NAME="REPRO_1_4"
214    cd ${SETTE_DIR}
215    . ../CONFIG/makenemo -m ${CMP_NAM} -n GYRELOB_4 -r GYRE_LOBSTER add_key "key_mpp_mpi key_mpp_rep"
216    cd ${SETTE_DIR}
217    . param.cfg
218    . all_functions.sh
219    . prepare_exe_dir.sh
220    JOB_FILE=${EXE_DIR}/run_job.sh
221    NPROC=4
222    \rm ${JOB_FILE}
223    cd ${EXE_DIR}
224    set_namelist namelist cn_exp \"GYRELOB_14\"
225    set_namelist namelist nn_it000 1
226    set_namelist namelist nn_itend 60
227    set_namelist namelist nn_fwb 0
228    set_namelist namelist nn_bench 0
229    set_namelist namelist ln_ctl .false.
230    set_namelist namelist ln_clobber .true.
231    set_namelist namelist nn_solv 2
232    set_namelist namelist_top ln_diatrc .false.
233    set_namelist namelist_top ln_trcdta .false.
234    set_namelist namelist jpni 1
235    set_namelist namelist jpnj 4
236    set_namelist namelist jpnij 4
237    cd ${SETTE_DIR}
238    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
239    cd ${SETTE_DIR}
240    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
241
242    cd ${SETTE_DIR}
243    export TEST_NAME="REPRO_2_2"
244    . prepare_exe_dir.sh
245    cd ${EXE_DIR}
246    set_namelist namelist cn_exp \"GYRELOB_22\"
247    set_namelist namelist nn_it000 1
248    set_namelist namelist nn_itend 60
249    set_namelist namelist nn_fwb 0
250    set_namelist namelist ln_ctl .false.
251    set_namelist namelist ln_clobber .true.
252    set_namelist namelist nn_solv 2
253    set_namelist namelist_top ln_diatrc .false.
254    set_namelist namelist_top ln_trcdta .false.
255    set_namelist namelist jpni 2
256    set_namelist namelist jpnj 2
257    set_namelist namelist jpnij 4
258    cd ${SETTE_DIR}
259    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
260    cd ${SETTE_DIR}
261    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
262
263fi
264
265# TESTS FOR ORCA2_LIM_PISCES CONFIGURATION
266if [ ${config} -eq 3 ] ;  then
267    ## Restartability tests for ORCA2_LIM_PISCES
268    export TEST_NAME="LONG"
269    cd ${SETTE_DIR}
270    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2LIMPIS_LONG -r ORCA2_LIM_PISCES -j 8 add_key "key_mpp_mpi" 
271    cd ${SETTE_DIR}
272    . param.cfg
273    . all_functions.sh
274    . prepare_exe_dir.sh
275    JOB_FILE=${EXE_DIR}/run_job.sh
276    NPROC=4
277    \rm ${JOB_FILE}
278    cd ${EXE_DIR}
279    set_namelist namelist cn_exp \"O2LP_LONG\"
280    set_namelist namelist nn_it000 1
281    set_namelist namelist nn_itend 150
282    set_namelist namelist nn_stock 75
283    set_namelist namelist ln_clobber .true.
284    set_namelist namelist jpni 2
285    set_namelist namelist jpnj 2
286    set_namelist namelist jpnij 4
287    set_namelist namelist nn_solv 2
288    set_namelist namelist_top ln_trcdta .false.
289    set_namelist namelist_top ln_diatrc .false.
290    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
291    # if not you need input files, and for tests is not necessary
292    set_namelist namelist_pisces ln_ironsed .false.
293    set_namelist namelist_pisces ln_river .false.
294    set_namelist namelist_pisces ln_ndepo .false.
295    set_namelist namelist_pisces ln_dust .false.
296    set_namelist namelist_pisces ln_presatm .false.
297    cd ${SETTE_DIR}
298    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
299   
300    cd ${SETTE_DIR}
301    export TEST_NAME="SHORT"
302    . prepare_exe_dir.sh
303    cd ${EXE_DIR}
304    set_namelist namelist cn_exp \"O2LP_SHORT\"
305    set_namelist namelist nn_it000 76
306    set_namelist namelist nn_itend 150
307    set_namelist namelist nn_stock 75
308    set_namelist namelist ln_rstart .true.
309    set_namelist namelist nn_rstctl 2
310    set_namelist namelist ln_clobber .true.
311    set_namelist namelist jpni 2
312    set_namelist namelist jpnj 2
313    set_namelist namelist jpnij 4
314    set_namelist namelist nn_solv 2
315    cp ../LONG/O2LP_LONG_00000075_restart*nc .
316    set_namelist namelist cn_ocerst_in \"O2LP_LONG_00000075_restart\"
317    set_namelist namelist_ice cn_icerst_in \"O2LP_LONG_00000075_restart_ice\"
318    set_namelist namelist_top cn_trcrst_in \"O2LP_LONG_00000075_restart_trc\"
319    set_namelist namelist_top ln_diatrc .false.
320    set_namelist namelist_top ln_rsttr .true.
321    set_namelist namelist_top nn_rsttr 2
322    # put ln_ironsed, ln_river, ln_ndepo, ln_dust
323    # if not you need input files, and for tests is not necessary
324    set_namelist namelist_pisces ln_ironsed .false.
325    set_namelist namelist_pisces ln_river .false.
326    set_namelist namelist_pisces ln_ndepo .false.
327    set_namelist namelist_pisces ln_dust .false.
328    set_namelist namelist_pisces ln_presatm .false.
329    for (( i=1; i<=$NPROC; i++)) ; do
330        L_NPROC=$(( $i - 1 ))
331        L_NPROC=`printf "%04d\n" ${L_NPROC}`
332        ln -sf ../LONG/O2LP_LONG_00000075_restart_${L_NPROC-1}.nc .
333        ln -sf ../LONG/O2LP_LONG_00000075_restart_trc_${L_NPROC-1}.nc .
334        ln -sf ../LONG/O2LP_LONG_00000075_restart_ice_${L_NPROC-1}.nc .
335    done
336    cd ${SETTE_DIR}
337    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
338    cd ${SETTE_DIR}
339    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
340fi
341
342if [ ${config} -eq 4 ] ;  then
343    ## Repropducibility tests for ORCA2_LIM_PISCES
344    export TEST_NAME="REPRO_4_4"
345    cd ${SETTE_DIR}
346    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2LIMPIS_16 -r ORCA2_LIM_PISCES -j 8 add_key "key_mpp_rep key_mpp_mpi"
347    cd ${SETTE_DIR}
348    . param.cfg
349    . all_functions.sh
350    . prepare_exe_dir.sh
351    JOB_FILE=${EXE_DIR}/run_job.sh
352    NPROC=16
353    \rm $JOB_FILE
354    cd ${EXE_DIR}
355    set_namelist namelist nn_it000 1
356    set_namelist namelist nn_itend 75
357    set_namelist namelist nn_fwb 0
358    set_namelist namelist ln_ctl .false.
359    set_namelist namelist ln_clobber .true.
360    set_namelist namelist jpni 4
361    set_namelist namelist jpnj 4
362    set_namelist namelist jpnij 16
363    set_namelist namelist nn_solv 2
364    set_namelist namelist_top ln_trcdta .false.
365    set_namelist namelist_top ln_diatrc .false.
366    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
367    # if not you need input files, and for tests is not necessary
368    set_namelist namelist_pisces ln_ironsed .false.
369    set_namelist namelist_pisces ln_river .false.
370    set_namelist namelist_pisces ln_ndepo .false.
371    set_namelist namelist_pisces ln_dust .false.
372    set_namelist namelist_pisces ln_presatm .false.
373    cd ${SETTE_DIR}
374    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
375    cd ${SETTE_DIR}
376    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
377
378    cd ${SETTE_DIR}
379    export TEST_NAME="REPRO_2_8"
380    . prepare_exe_dir.sh
381    cd ${EXE_DIR}
382    set_namelist namelist nn_it000 1
383    set_namelist namelist nn_itend 75
384    set_namelist namelist nn_fwb 0
385    set_namelist namelist ln_ctl .false.
386    set_namelist namelist ln_clobber .true.
387    set_namelist namelist jpni 2
388    set_namelist namelist jpnj 8
389    set_namelist namelist jpnij 16
390    set_namelist namelist nn_solv 2
391    set_namelist namelist_top ln_trcdta .false.
392    set_namelist namelist_top ln_diatrc .false.
393    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
394    # if not you need input files, and for tests is not necessary
395    set_namelist namelist_pisces ln_ironsed .false.
396    set_namelist namelist_pisces ln_river .false.
397    set_namelist namelist_pisces ln_ndepo .false.
398    set_namelist namelist_pisces ln_dust .false.
399    set_namelist namelist_pisces ln_presatm .false.
400    cd ${SETTE_DIR}
401    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
402    cd ${SETTE_DIR}
403    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
404fi
405
406# TESTS FOR ORCA2_OFF_PISCES CONFIGURATION
407if [ ${config} -eq 5 ] ;  then
408    ## Restartability tests for ORCA2_OFF_PISCES
409    export TEST_NAME="LONG"
410    cd ${SETTE_DIR}
411    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2OFFPIS_LONG -r ORCA2_OFF_PISCES -j 8 add_key "key_mpp_rep"
412    cd ${SETTE_DIR}
413    . param.cfg
414    . all_functions.sh
415    . prepare_exe_dir.sh
416    JOB_FILE=${EXE_DIR}/run_job.sh
417    NPROC=4
418    \rm $JOB_FILE
419    cd ${EXE_DIR}
420    set_namelist namelist cn_exp \"OFFP_LONG\"
421    set_namelist namelist nn_it000 1
422    set_namelist namelist nn_itend 40
423    set_namelist namelist nn_stock 20
424    set_namelist namelist ln_clobber .true.
425    set_namelist namelist jpni 2
426    set_namelist namelist jpnj 2
427    set_namelist namelist jpnij 4
428    set_namelist namelist_top ln_trcdta .false.
429    set_namelist namelist_top ln_diatrc .false.
430    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
431    # if not you need input files, and for tests is not necessary
432    set_namelist namelist_pisces ln_ironsed .false.
433    set_namelist namelist_pisces ln_river .false.
434    set_namelist namelist_pisces ln_ndepo .false.
435    set_namelist namelist_pisces ln_dust .false.
436    set_namelist namelist_pisces ln_presatm .false.
437    cd ${SETTE_DIR}
438    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
439   
440    cd ${SETTE_DIR}
441    export TEST_NAME="SHORT"
442    . prepare_exe_dir.sh
443    JOB_FILE=${EXE_DIR}/run_job.sh
444    NPROC=4
445    \rm $JOB_FILE
446    cd ${EXE_DIR}
447    set_namelist namelist cn_exp \"OFFP_SHORT\"
448    set_namelist namelist nn_it000 21
449    set_namelist namelist nn_itend 40
450    set_namelist namelist nn_stock 20
451    set_namelist namelist ln_clobber .true.
452    set_namelist namelist jpni 2
453    set_namelist namelist jpnj 2
454    set_namelist namelist jpnij 4
455    cp ../LONG/OFFP_LONG_00000020_restart*nc .
456    set_namelist namelist_top ln_diatrc .false.
457    set_namelist namelist_top ln_rsttr .true.
458    set_namelist namelist_top nn_rsttr 2
459    set_namelist namelist_top cn_trcrst_in \"OFFP_LONG_00000020_restart_trc\"
460    for (( i=1; i<=$NPROC; i++)) ; do
461        L_NPROC=$(( $i - 1 ))
462        L_NPROC=`printf "%04d\n" ${L_NPROC}`
463        ln -sf ../LONG/OFFP_LONG_00000020_restart_${L_NPROC-1}.nc .
464        ln -sf ../LONG/OFFP_LONG_00000020_restart_${L_NPROC-1}_trc.nc .
465    done
466    # put ln_ironsed, ln_river, ln_ndepo, ln_dust
467    # if not you need input files, and for tests is not necessary
468    set_namelist namelist_pisces ln_ironsed .false.
469    set_namelist namelist_pisces ln_river .false.
470    set_namelist namelist_pisces ln_ndepo .false.
471    set_namelist namelist_pisces ln_dust .false.
472    set_namelist namelist_pisces ln_presatm .false.
473    cd ${SETTE_DIR}
474    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME}  ${MPIRUN_FLAG} ${JOB_FILE}
475    cd ${SETTE_DIR}
476    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
477fi
478
479if [ ${config} -eq 6 ] ;  then
480    ## Repropducibility tests for ORCA2_OFF_PISCES
481    export TEST_NAME="REPRO_4_4"
482    cd ${SETTE_DIR}
483    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2OFFPIS_16 -r ORCA2_OFF_PISCES -j 8 add_key "key_mpp_rep key_mpp_mpi"
484    cd ${SETTE_DIR}
485    . param.cfg
486    . all_functions.sh
487    . prepare_exe_dir.sh
488    JOB_FILE=${EXE_DIR}/run_job.sh
489    NPROC=16
490    \rm $JOB_FILE
491    cd ${EXE_DIR}
492    set_namelist namelist nn_it000 1
493    set_namelist namelist nn_itend 40
494    set_namelist namelist ln_ctl .false.
495    set_namelist namelist ln_clobber .true.
496    set_namelist namelist jpni 4
497    set_namelist namelist jpnj 4
498    set_namelist namelist jpnij 16
499    set_namelist namelist_top ln_trcdta .false.
500    set_namelist namelist_top ln_diatrc .false.
501    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
502    # if not you need input files, and for tests is not necessary
503    set_namelist namelist_pisces ln_ironsed .false.
504    set_namelist namelist_pisces ln_river .false.
505    set_namelist namelist_pisces ln_ndepo .false.
506    set_namelist namelist_pisces ln_dust .false.
507    set_namelist namelist_pisces ln_presatm .false.
508    cd ${SETTE_DIR}
509    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
510    cd ${SETTE_DIR}
511    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
512
513    cd ${SETTE_DIR}
514    export TEST_NAME="REPRO_2_8"
515    . prepare_exe_dir.sh
516    cd ${EXE_DIR}
517    set_namelist namelist nn_it000 1
518    set_namelist namelist nn_itend 40
519    set_namelist namelist ln_ctl .false.
520    set_namelist namelist ln_clobber .true.
521    set_namelist namelist jpni 2
522    set_namelist namelist jpnj 8
523    set_namelist namelist jpnij 16
524    set_namelist namelist_top ln_trcdta .false.
525    set_namelist namelist_top ln_diatrc .false.
526    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
527    # if not you need input files, and for tests is not necessary
528    set_namelist namelist_pisces ln_ironsed .false.
529    set_namelist namelist_pisces ln_river .false.
530    set_namelist namelist_pisces ln_ndepo .false.
531    set_namelist namelist_pisces ln_dust .false.
532    set_namelist namelist_pisces ln_presatm .false.
533    cd ${SETTE_DIR}
534    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
535    cd ${SETTE_DIR}
536    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
537fi
538
539if [ ${config} -eq 7 ] ;  then
540    ## Restartability tests for AMM12
541    export TEST_NAME="LONG"
542    cd ${SETTE_DIR}
543    . ../CONFIG/makenemo -m ${CMP_NAM} -n AMM12_LONG -r AMM12
544    cd ${SETTE_DIR}
545    . param.cfg
546    . all_functions.sh
547    . prepare_exe_dir.sh
548    JOB_FILE=${EXE_DIR}/run_job.sh
549    NPROC=32
550    \rm $JOB_FILE
551    cd ${EXE_DIR}
552    set_namelist namelist nn_it000 1
553    set_namelist namelist nn_itend 12
554    set_namelist namelist nn_stock 6
555    set_namelist namelist nn_fwb 0
556    set_namelist namelist ln_ctl .false.
557    set_namelist namelist ln_clobber .true.
558    set_namelist namelist nn_dyn2d 2
559    set_namelist namelist nn_tra_dta 0
560    set_namelist namelist jpni 8
561    set_namelist namelist jpnj 4
562    set_namelist namelist jpnij 32
563    cd ${SETTE_DIR}
564    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
565
566    cd ${SETTE_DIR}
567    export TEST_NAME="SHORT"
568    . prepare_exe_dir.sh
569    cd ${EXE_DIR}
570    set_namelist namelist nn_it000 7
571    set_namelist namelist nn_itend 12
572    set_namelist namelist nn_fwb 0
573    set_namelist namelist ln_ctl .false.
574    set_namelist namelist ln_clobber .true.
575    set_namelist namelist nn_dyn2d 2
576    set_namelist namelist nn_tra_dta 0
577    set_namelist namelist jpni 8
578    set_namelist namelist jpnj 4
579    set_namelist namelist jpnij 32
580    set_namelist namelist ln_rstart .true.
581    set_namelist namelist nn_rstctl 2
582    set_namelist namelist cn_ocerst_in \"AMM12_00000006_restart\"
583    for (( i=1; i<=$NPROC; i++)) ; do
584        L_NPROC=$(( $i - 1 ))
585        L_NPROC=`printf "%04d\n" ${L_NPROC}`
586        ln -sf ../LONG/AMM12_00000006_restart_${L_NPROC-1}.nc .
587    done
588    cd ${SETTE_DIR}
589    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
590    cd ${SETTE_DIR}
591    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
592fi
593
594if [ ${config} -eq 8 ] ;  then
595    ## Reproducibility tests for AMM12
596    export TEST_NAME="REPO_8_4"
597    cd ${SETTE_DIR}
598    . ../CONFIG/makenemo -m ${CMP_NAM} -n AMM12_32 -r AMM12 add_key "key_mpp_rep"
599    cd ${SETTE_DIR}
600    . param.cfg
601    . all_functions.sh
602    . prepare_exe_dir.sh
603    JOB_FILE=${EXE_DIR}/run_job.sh
604    NPROC=32
605    \rm ${JOB_FILE}
606    cd ${EXE_DIR}
607    set_namelist namelist nn_it000 1
608    set_namelist namelist nn_itend 576
609    set_namelist namelist nn_fwb 0
610    set_namelist namelist ln_ctl .false.
611    set_namelist namelist ln_clobber .true.
612    set_namelist namelist nn_dyn2d 2
613    set_namelist namelist nn_tra_dta 0
614    set_namelist namelist jpni 8
615    set_namelist namelist jpnj 4
616    set_namelist namelist jpnij 32
617    cd ${SETTE_DIR}
618    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
619    cd ${SETTE_DIR}
620    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
621
622    cd ${SETTE_DIR}
623    export TEST_NAME="REPO_4_8"
624    . prepare_exe_dir.sh
625    cd ${EXE_DIR}
626    set_namelist namelist nn_it000 1
627    set_namelist namelist nn_itend 576
628    set_namelist namelist nn_fwb 0
629    set_namelist namelist ln_ctl .false.
630    set_namelist namelist nn_dyn2d 2
631    set_namelist namelist nn_tra_dta 0
632    set_namelist namelist ln_clobber .true.
633    set_namelist namelist jpni 4
634    set_namelist namelist jpnj 8
635    set_namelist namelist jpnij 32
636    cd ${SETTE_DIR}
637    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
638    cd ${SETTE_DIR}
639    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
640fi
641
642# TEST FOR ORCA2_LIM_AGRIF : simple test of running AGRIF (no restartability neither reproducibility tests)
643if [ ${config} -eq 9 ] ;  then
644    ## ORCA2_LIM with Agulhas AGRIF zoom in MPI
645    export TEST_NAME="SHORT"
646    cd ${SETTE_DIR}
647    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2AGUL_1_2 -r ORCA2_LIM -j 8 add_key "key_mpp_rep key_mpp_mpi key_agrif" del_key "key_zdftmx"
648    cd ${SETTE_DIR}
649    . param.cfg
650    . all_functions.sh
651    . prepare_exe_dir.sh
652    JOB_FILE=${EXE_DIR}/run_job.sh
653    NPROC=2
654    \rm ${JOB_FILE}
655    cd ${EXE_DIR}
656    set_namelist namelist nn_it000 1
657    set_namelist namelist nn_itend 75
658    set_namelist namelist ln_ctl .false.
659    set_namelist namelist ln_clobber .true.
660    set_namelist namelist jpni 1
661    set_namelist namelist jpnj 2
662    set_namelist namelist jpnij 2
663    set_namelist 1_namelist nn_it000 1
664    set_namelist 1_namelist nn_itend 150
665    set_namelist 1_namelist ln_ctl .false.
666    set_namelist 1_namelist ln_clobber .true.
667    cd ${SETTE_DIR}
668    . ./prepare_job.sh input_ORCA2_LIM_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
669    cd ${SETTE_DIR}
670    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
671fi
672
673done
Note: See TracBrowser for help on using the repository browser.