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

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

sette: add missing CPP key key_mpp_mpi in ORCA2_OFF config, 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    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-1}.nc .
332        ln -sf ../LONG/O2LP_LONG_00000075_restart_trc_${L_NPROC-1}.nc .
333        ln -sf ../LONG/O2LP_LONG_00000075_restart_ice_${L_NPROC-1}.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_${L_NPROC-1}.nc .
463        ln -sf ../LONG/OFFP_LONG_00000020_restart_${L_NPROC-1}_trc.nc .
464    done
465    # put ln_ironsed, ln_river, ln_ndepo, ln_dust
466    # if not you need input files, and for tests is not necessary
467    set_namelist namelist_pisces ln_ironsed .false.
468    set_namelist namelist_pisces ln_river .false.
469    set_namelist namelist_pisces ln_ndepo .false.
470    set_namelist namelist_pisces ln_dust .false.
471    set_namelist namelist_pisces ln_presatm .false.
472    cd ${SETTE_DIR}
473    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME}  ${MPIRUN_FLAG} ${JOB_FILE}
474    cd ${SETTE_DIR}
475    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
476fi
477
478if [ ${config} -eq 6 ] ;  then
479    ## Repropducibility tests for ORCA2_OFF_PISCES
480    export TEST_NAME="REPRO_4_4"
481    cd ${SETTE_DIR}
482    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2OFFPIS_16 -r ORCA2_OFF_PISCES -j 8 add_key "key_mpp_rep key_mpp_mpi"
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=16
489    \rm $JOB_FILE
490    cd ${EXE_DIR}
491    set_namelist namelist nn_it000 1
492    set_namelist namelist nn_itend 40
493    set_namelist namelist ln_ctl .false.
494    set_namelist namelist ln_clobber .true.
495    set_namelist namelist jpni 4
496    set_namelist namelist jpnj 4
497    set_namelist namelist jpnij 16
498    set_namelist namelist_top ln_trcdta .false.
499    set_namelist namelist_top ln_diatrc .false.
500    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
501    # if not you need input files, and for tests is not necessary
502    set_namelist namelist_pisces ln_ironsed .false.
503    set_namelist namelist_pisces ln_river .false.
504    set_namelist namelist_pisces ln_ndepo .false.
505    set_namelist namelist_pisces ln_dust .false.
506    set_namelist namelist_pisces ln_presatm .false.
507    cd ${SETTE_DIR}
508    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
509    cd ${SETTE_DIR}
510    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
511
512    cd ${SETTE_DIR}
513    export TEST_NAME="REPRO_2_8"
514    . prepare_exe_dir.sh
515    cd ${EXE_DIR}
516    set_namelist namelist nn_it000 1
517    set_namelist namelist nn_itend 40
518    set_namelist namelist ln_ctl .false.
519    set_namelist namelist ln_clobber .true.
520    set_namelist namelist jpni 2
521    set_namelist namelist jpnj 8
522    set_namelist namelist jpnij 16
523    set_namelist namelist_top ln_trcdta .false.
524    set_namelist namelist_top ln_diatrc .false.
525    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
526    # if not you need input files, and for tests is not necessary
527    set_namelist namelist_pisces ln_ironsed .false.
528    set_namelist namelist_pisces ln_river .false.
529    set_namelist namelist_pisces ln_ndepo .false.
530    set_namelist namelist_pisces ln_dust .false.
531    set_namelist namelist_pisces ln_presatm .false.
532    cd ${SETTE_DIR}
533    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
534    cd ${SETTE_DIR}
535    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
536fi
537
538if [ ${config} -eq 7 ] ;  then
539    ## Restartability tests for AMM12
540    export TEST_NAME="LONG"
541    cd ${SETTE_DIR}
542    . ../CONFIG/makenemo -m ${CMP_NAM} -n AMM12_LONG -r AMM12
543    cd ${SETTE_DIR}
544    . param.cfg
545    . all_functions.sh
546    . prepare_exe_dir.sh
547    JOB_FILE=${EXE_DIR}/run_job.sh
548    NPROC=32
549    \rm $JOB_FILE
550    cd ${EXE_DIR}
551    set_namelist namelist nn_it000 1
552    set_namelist namelist nn_itend 12
553    set_namelist namelist nn_stock 6
554    set_namelist namelist nn_fwb 0
555    set_namelist namelist ln_ctl .false.
556    set_namelist namelist ln_clobber .true.
557    set_namelist namelist nn_dyn2d 2
558    set_namelist namelist nn_tra_dta 0
559    set_namelist namelist jpni 8
560    set_namelist namelist jpnj 4
561    set_namelist namelist jpnij 32
562    cd ${SETTE_DIR}
563    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
564
565    cd ${SETTE_DIR}
566    export TEST_NAME="SHORT"
567    . prepare_exe_dir.sh
568    cd ${EXE_DIR}
569    set_namelist namelist nn_it000 7
570    set_namelist namelist nn_itend 12
571    set_namelist namelist nn_fwb 0
572    set_namelist namelist ln_ctl .false.
573    set_namelist namelist ln_clobber .true.
574    set_namelist namelist nn_dyn2d 2
575    set_namelist namelist nn_tra_dta 0
576    set_namelist namelist jpni 8
577    set_namelist namelist jpnj 4
578    set_namelist namelist jpnij 32
579    set_namelist namelist ln_rstart .true.
580    set_namelist namelist nn_rstctl 2
581    set_namelist namelist cn_ocerst_in \"AMM12_00000006_restart\"
582    for (( i=1; i<=$NPROC; i++)) ; do
583        L_NPROC=$(( $i - 1 ))
584        L_NPROC=`printf "%04d\n" ${L_NPROC}`
585        ln -sf ../LONG/AMM12_00000006_restart_${L_NPROC-1}.nc .
586    done
587    cd ${SETTE_DIR}
588    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
589    cd ${SETTE_DIR}
590    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
591fi
592
593if [ ${config} -eq 8 ] ;  then
594    ## Reproducibility tests for AMM12
595    export TEST_NAME="REPO_8_4"
596    cd ${SETTE_DIR}
597    . ../CONFIG/makenemo -m ${CMP_NAM} -n AMM12_32 -r AMM12 add_key "key_mpp_rep"
598    cd ${SETTE_DIR}
599    . param.cfg
600    . all_functions.sh
601    . prepare_exe_dir.sh
602    JOB_FILE=${EXE_DIR}/run_job.sh
603    NPROC=32
604    \rm ${JOB_FILE}
605    cd ${EXE_DIR}
606    set_namelist namelist nn_it000 1
607    set_namelist namelist nn_itend 576
608    set_namelist namelist nn_fwb 0
609    set_namelist namelist ln_ctl .false.
610    set_namelist namelist ln_clobber .true.
611    set_namelist namelist nn_dyn2d 2
612    set_namelist namelist nn_tra_dta 0
613    set_namelist namelist jpni 8
614    set_namelist namelist jpnj 4
615    set_namelist namelist jpnij 32
616    cd ${SETTE_DIR}
617    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
618    cd ${SETTE_DIR}
619    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
620
621    cd ${SETTE_DIR}
622    export TEST_NAME="REPO_4_8"
623    . prepare_exe_dir.sh
624    cd ${EXE_DIR}
625    set_namelist namelist nn_it000 1
626    set_namelist namelist nn_itend 576
627    set_namelist namelist nn_fwb 0
628    set_namelist namelist ln_ctl .false.
629    set_namelist namelist nn_dyn2d 2
630    set_namelist namelist nn_tra_dta 0
631    set_namelist namelist ln_clobber .true.
632    set_namelist namelist jpni 4
633    set_namelist namelist jpnj 8
634    set_namelist namelist jpnij 32
635    cd ${SETTE_DIR}
636    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
637    cd ${SETTE_DIR}
638    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
639fi
640
641# TEST FOR ORCA2_LIM_AGRIF : simple test of running AGRIF (no restartability neither reproducibility tests)
642if [ ${config} -eq 9 ] ;  then
643    ## ORCA2_LIM with Agulhas AGRIF zoom in MPI
644    export TEST_NAME="SHORT"
645    cd ${SETTE_DIR}
646    . ../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"
647    cd ${SETTE_DIR}
648    . param.cfg
649    . all_functions.sh
650    . prepare_exe_dir.sh
651    JOB_FILE=${EXE_DIR}/run_job.sh
652    NPROC=2
653    \rm ${JOB_FILE}
654    cd ${EXE_DIR}
655    set_namelist namelist nn_it000 1
656    set_namelist namelist nn_itend 75
657    set_namelist namelist ln_ctl .false.
658    set_namelist namelist ln_clobber .true.
659    set_namelist namelist jpni 1
660    set_namelist namelist jpnj 2
661    set_namelist namelist jpnij 2
662    set_namelist 1_namelist nn_it000 1
663    set_namelist 1_namelist nn_itend 150
664    set_namelist 1_namelist ln_ctl .false.
665    set_namelist 1_namelist ln_clobber .true.
666    cd ${SETTE_DIR}
667    . ./prepare_job.sh input_ORCA2_LIM_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
668    cd ${SETTE_DIR}
669    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
670fi
671
672done
Note: See TracBrowser for help on using the repository browser.