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

Last change on this file since 3555 was 3555, checked in by flavoni, 8 years ago

correct bad L_NPROC-1,see ticket #941

  • Property svn:executable set to *
File size: 23.2 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    set_namelist namelist cn_ocerst_in \"O2LP_LONG_00000075_restart\"
316    set_namelist namelist_ice cn_icerst_in \"O2LP_LONG_00000075_restart_ice\"
317    set_namelist namelist_top cn_trcrst_in \"O2LP_LONG_00000075_restart_trc\"
318    set_namelist namelist_top ln_diatrc .false.
319    set_namelist namelist_top ln_rsttr .true.
320    set_namelist namelist_top nn_rsttr 2
321    # put ln_ironsed, ln_river, ln_ndepo, ln_dust
322    # if not you need input files, and for tests is not necessary
323    set_namelist namelist_pisces ln_ironsed .false.
324    set_namelist namelist_pisces ln_river .false.
325    set_namelist namelist_pisces ln_ndepo .false.
326    set_namelist namelist_pisces ln_dust .false.
327    set_namelist namelist_pisces ln_presatm .false.
328    for (( i=1; i<=$NPROC; i++)) ; do
329        L_NPROC=$(( $i - 1 ))
330        L_NPROC=`printf "%04d\n" ${L_NPROC}`
331        ln -sf ../LONG/O2LP_LONG_00000075_restart_${L_NPROC}.nc .
332        ln -sf ../LONG/O2LP_LONG_00000075_restart_trc_${L_NPROC}.nc .
333        ln -sf ../LONG/O2LP_LONG_00000075_restart_ice_${L_NPROC}.nc .
334    done
335    cd ${SETTE_DIR}
336    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
337    cd ${SETTE_DIR}
338    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
339fi
340
341if [ ${config} -eq 4 ] ;  then
342    ## Repropducibility tests for ORCA2_LIM_PISCES
343    export TEST_NAME="REPRO_4_4"
344    cd ${SETTE_DIR}
345    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2LIMPIS_16 -r ORCA2_LIM_PISCES -j 8 add_key "key_mpp_rep key_mpp_mpi"
346    cd ${SETTE_DIR}
347    . param.cfg
348    . all_functions.sh
349    . prepare_exe_dir.sh
350    JOB_FILE=${EXE_DIR}/run_job.sh
351    NPROC=16
352    \rm $JOB_FILE
353    cd ${EXE_DIR}
354    set_namelist namelist nn_it000 1
355    set_namelist namelist nn_itend 75
356    set_namelist namelist nn_fwb 0
357    set_namelist namelist ln_ctl .false.
358    set_namelist namelist ln_clobber .true.
359    set_namelist namelist jpni 4
360    set_namelist namelist jpnj 4
361    set_namelist namelist jpnij 16
362    set_namelist namelist nn_solv 2
363    set_namelist namelist_top ln_trcdta .false.
364    set_namelist namelist_top ln_diatrc .false.
365    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
366    # if not you need input files, and for tests is not necessary
367    set_namelist namelist_pisces ln_ironsed .false.
368    set_namelist namelist_pisces ln_river .false.
369    set_namelist namelist_pisces ln_ndepo .false.
370    set_namelist namelist_pisces ln_dust .false.
371    set_namelist namelist_pisces ln_presatm .false.
372    cd ${SETTE_DIR}
373    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
374    cd ${SETTE_DIR}
375    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
376
377    cd ${SETTE_DIR}
378    export TEST_NAME="REPRO_2_8"
379    . prepare_exe_dir.sh
380    cd ${EXE_DIR}
381    set_namelist namelist nn_it000 1
382    set_namelist namelist nn_itend 75
383    set_namelist namelist nn_fwb 0
384    set_namelist namelist ln_ctl .false.
385    set_namelist namelist ln_clobber .true.
386    set_namelist namelist jpni 2
387    set_namelist namelist jpnj 8
388    set_namelist namelist jpnij 16
389    set_namelist namelist nn_solv 2
390    set_namelist namelist_top ln_trcdta .false.
391    set_namelist namelist_top ln_diatrc .false.
392    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
393    # if not you need input files, and for tests is not necessary
394    set_namelist namelist_pisces ln_ironsed .false.
395    set_namelist namelist_pisces ln_river .false.
396    set_namelist namelist_pisces ln_ndepo .false.
397    set_namelist namelist_pisces ln_dust .false.
398    set_namelist namelist_pisces ln_presatm .false.
399    cd ${SETTE_DIR}
400    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
401    cd ${SETTE_DIR}
402    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
403fi
404
405# TESTS FOR ORCA2_OFF_PISCES CONFIGURATION
406if [ ${config} -eq 5 ] ;  then
407    ## Restartability tests for ORCA2_OFF_PISCES
408    export TEST_NAME="LONG"
409    cd ${SETTE_DIR}
410    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2OFFPIS_LONG -r ORCA2_OFF_PISCES -j 8 add_key "key_mpp_mpi key_mpp_rep"
411    cd ${SETTE_DIR}
412    . param.cfg
413    . all_functions.sh
414    . prepare_exe_dir.sh
415    JOB_FILE=${EXE_DIR}/run_job.sh
416    NPROC=4
417    \rm $JOB_FILE
418    cd ${EXE_DIR}
419    set_namelist namelist cn_exp \"OFFP_LONG\"
420    set_namelist namelist nn_it000 1
421    set_namelist namelist nn_itend 40
422    set_namelist namelist nn_stock 20
423    set_namelist namelist ln_clobber .true.
424    set_namelist namelist jpni 2
425    set_namelist namelist jpnj 2
426    set_namelist namelist jpnij 4
427    set_namelist namelist_top ln_trcdta .false.
428    set_namelist namelist_top ln_diatrc .false.
429    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
430    # if not you need input files, and for tests is not necessary
431    set_namelist namelist_pisces ln_ironsed .false.
432    set_namelist namelist_pisces ln_river .false.
433    set_namelist namelist_pisces ln_ndepo .false.
434    set_namelist namelist_pisces ln_dust .false.
435    set_namelist namelist_pisces ln_presatm .false.
436    cd ${SETTE_DIR}
437    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
438   
439    cd ${SETTE_DIR}
440    export TEST_NAME="SHORT"
441    . prepare_exe_dir.sh
442    JOB_FILE=${EXE_DIR}/run_job.sh
443    NPROC=4
444    \rm $JOB_FILE
445    cd ${EXE_DIR}
446    set_namelist namelist cn_exp \"OFFP_SHORT\"
447    set_namelist namelist nn_it000 21
448    set_namelist namelist nn_itend 40
449    set_namelist namelist nn_stock 20
450    set_namelist namelist ln_clobber .true.
451    set_namelist namelist jpni 2
452    set_namelist namelist jpnj 2
453    set_namelist namelist jpnij 4
454    cp ../LONG/OFFP_LONG_00000020_restart*nc .
455    set_namelist namelist_top ln_diatrc .false.
456    set_namelist namelist_top ln_rsttr .true.
457    set_namelist namelist_top nn_rsttr 2
458    set_namelist namelist_top cn_trcrst_in \"OFFP_LONG_00000020_restart_trc\"
459    for (( i=1; i<=$NPROC; i++)) ; do
460        L_NPROC=$(( $i - 1 ))
461        L_NPROC=`printf "%04d\n" ${L_NPROC}`
462        ln -sf ../LONG/OFFP_LONG_00000020_restart_trc_${L_NPROC}.nc .
463    done
464    # put ln_ironsed, ln_river, ln_ndepo, ln_dust
465    # if not you need input files, and for tests is not necessary
466    set_namelist namelist_pisces ln_ironsed .false.
467    set_namelist namelist_pisces ln_river .false.
468    set_namelist namelist_pisces ln_ndepo .false.
469    set_namelist namelist_pisces ln_dust .false.
470    set_namelist namelist_pisces ln_presatm .false.
471    cd ${SETTE_DIR}
472    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME}  ${MPIRUN_FLAG} ${JOB_FILE}
473    cd ${SETTE_DIR}
474    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
475fi
476
477if [ ${config} -eq 6 ] ;  then
478    ## Repropducibility tests for ORCA2_OFF_PISCES
479    export TEST_NAME="REPRO_4_4"
480    cd ${SETTE_DIR}
481    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2OFFPIS_16 -r ORCA2_OFF_PISCES -j 8 add_key "key_mpp_rep key_mpp_mpi"
482    cd ${SETTE_DIR}
483    . param.cfg
484    . all_functions.sh
485    . prepare_exe_dir.sh
486    JOB_FILE=${EXE_DIR}/run_job.sh
487    NPROC=16
488    \rm $JOB_FILE
489    cd ${EXE_DIR}
490    set_namelist namelist nn_it000 1
491    set_namelist namelist nn_itend 40
492    set_namelist namelist ln_ctl .false.
493    set_namelist namelist ln_clobber .true.
494    set_namelist namelist jpni 4
495    set_namelist namelist jpnj 4
496    set_namelist namelist jpnij 16
497    set_namelist namelist_top ln_trcdta .false.
498    set_namelist namelist_top ln_diatrc .false.
499    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
500    # if not you need input files, and for tests is not necessary
501    set_namelist namelist_pisces ln_ironsed .false.
502    set_namelist namelist_pisces ln_river .false.
503    set_namelist namelist_pisces ln_ndepo .false.
504    set_namelist namelist_pisces ln_dust .false.
505    set_namelist namelist_pisces ln_presatm .false.
506    cd ${SETTE_DIR}
507    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
508    cd ${SETTE_DIR}
509    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
510
511    cd ${SETTE_DIR}
512    export TEST_NAME="REPRO_2_8"
513    . prepare_exe_dir.sh
514    cd ${EXE_DIR}
515    set_namelist namelist nn_it000 1
516    set_namelist namelist nn_itend 40
517    set_namelist namelist ln_ctl .false.
518    set_namelist namelist ln_clobber .true.
519    set_namelist namelist jpni 2
520    set_namelist namelist jpnj 8
521    set_namelist namelist jpnij 16
522    set_namelist namelist_top ln_trcdta .false.
523    set_namelist namelist_top ln_diatrc .false.
524    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
525    # if not you need input files, and for tests is not necessary
526    set_namelist namelist_pisces ln_ironsed .false.
527    set_namelist namelist_pisces ln_river .false.
528    set_namelist namelist_pisces ln_ndepo .false.
529    set_namelist namelist_pisces ln_dust .false.
530    set_namelist namelist_pisces ln_presatm .false.
531    cd ${SETTE_DIR}
532    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
533    cd ${SETTE_DIR}
534    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
535fi
536
537if [ ${config} -eq 7 ] ;  then
538    ## Restartability tests for AMM12
539    export TEST_NAME="LONG"
540    cd ${SETTE_DIR}
541    . ../CONFIG/makenemo -m ${CMP_NAM} -n AMM12_LONG -r AMM12
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=32
548    \rm $JOB_FILE
549    cd ${EXE_DIR}
550    set_namelist namelist nn_it000 1
551    set_namelist namelist nn_itend 12
552    set_namelist namelist nn_stock 6
553    set_namelist namelist nn_fwb 0
554    set_namelist namelist ln_ctl .false.
555    set_namelist namelist ln_clobber .true.
556    set_namelist namelist nn_dyn2d 2
557    set_namelist namelist nn_tra_dta 0
558    set_namelist namelist jpni 8
559    set_namelist namelist jpnj 4
560    set_namelist namelist jpnij 32
561    cd ${SETTE_DIR}
562    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
563
564    cd ${SETTE_DIR}
565    export TEST_NAME="SHORT"
566    . prepare_exe_dir.sh
567    cd ${EXE_DIR}
568    set_namelist namelist nn_it000 7
569    set_namelist namelist nn_itend 12
570    set_namelist namelist nn_fwb 0
571    set_namelist namelist ln_ctl .false.
572    set_namelist namelist ln_clobber .true.
573    set_namelist namelist nn_dyn2d 2
574    set_namelist namelist nn_tra_dta 0
575    set_namelist namelist jpni 8
576    set_namelist namelist jpnj 4
577    set_namelist namelist jpnij 32
578    set_namelist namelist ln_rstart .true.
579    set_namelist namelist nn_rstctl 2
580    set_namelist namelist cn_ocerst_in \"AMM12_00000006_restart\"
581    for (( i=1; i<=$NPROC; i++)) ; do
582        L_NPROC=$(( $i - 1 ))
583        L_NPROC=`printf "%04d\n" ${L_NPROC}`
584        ln -sf ../LONG/AMM12_00000006_restart_${L_NPROC}.nc .
585    done
586    cd ${SETTE_DIR}
587    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
588    cd ${SETTE_DIR}
589    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
590fi
591
592if [ ${config} -eq 8 ] ;  then
593    ## Reproducibility tests for AMM12
594    export TEST_NAME="REPO_8_4"
595    cd ${SETTE_DIR}
596    . ../CONFIG/makenemo -m ${CMP_NAM} -n AMM12_32 -r AMM12 add_key "key_mpp_rep"
597    cd ${SETTE_DIR}
598    . param.cfg
599    . all_functions.sh
600    . prepare_exe_dir.sh
601    JOB_FILE=${EXE_DIR}/run_job.sh
602    NPROC=32
603    \rm ${JOB_FILE}
604    cd ${EXE_DIR}
605    set_namelist namelist nn_it000 1
606    set_namelist namelist nn_itend 576
607    set_namelist namelist nn_fwb 0
608    set_namelist namelist ln_ctl .false.
609    set_namelist namelist ln_clobber .true.
610    set_namelist namelist nn_dyn2d 2
611    set_namelist namelist nn_tra_dta 0
612    set_namelist namelist jpni 8
613    set_namelist namelist jpnj 4
614    set_namelist namelist jpnij 32
615    cd ${SETTE_DIR}
616    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
617    cd ${SETTE_DIR}
618    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
619
620    cd ${SETTE_DIR}
621    export TEST_NAME="REPO_4_8"
622    . prepare_exe_dir.sh
623    cd ${EXE_DIR}
624    set_namelist namelist nn_it000 1
625    set_namelist namelist nn_itend 576
626    set_namelist namelist nn_fwb 0
627    set_namelist namelist ln_ctl .false.
628    set_namelist namelist nn_dyn2d 2
629    set_namelist namelist nn_tra_dta 0
630    set_namelist namelist ln_clobber .true.
631    set_namelist namelist jpni 4
632    set_namelist namelist jpnj 8
633    set_namelist namelist jpnij 32
634    cd ${SETTE_DIR}
635    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
636    cd ${SETTE_DIR}
637    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
638fi
639
640# TEST FOR ORCA2_LIM_AGRIF : simple test of running AGRIF (no restartability neither reproducibility tests)
641if [ ${config} -eq 9 ] ;  then
642    ## ORCA2_LIM with Agulhas AGRIF zoom in MPI
643    export TEST_NAME="SHORT"
644    cd ${SETTE_DIR}
645    . ../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"
646    cd ${SETTE_DIR}
647    . param.cfg
648    . all_functions.sh
649    . prepare_exe_dir.sh
650    JOB_FILE=${EXE_DIR}/run_job.sh
651    NPROC=2
652    \rm ${JOB_FILE}
653    cd ${EXE_DIR}
654    set_namelist namelist nn_it000 1
655    set_namelist namelist nn_itend 75
656    set_namelist namelist ln_ctl .false.
657    set_namelist namelist ln_clobber .true.
658    set_namelist namelist jpni 1
659    set_namelist namelist jpnj 2
660    set_namelist namelist jpnij 2
661    set_namelist 1_namelist nn_it000 1
662    set_namelist 1_namelist nn_itend 150
663    set_namelist 1_namelist ln_ctl .false.
664    set_namelist 1_namelist ln_clobber .true.
665    cd ${SETTE_DIR}
666    . ./prepare_job.sh input_ORCA2_LIM_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
667    cd ${SETTE_DIR}
668    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
669fi
670
671done
Note: See TracBrowser for help on using the repository browser.