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

Last change on this file since 2675 was 2675, checked in by flavoni, 11 years ago

commit sette.sh ready to test 3 reference configuration: GYRE_LOBSTER, ORCA2_LIM_PISCES, POMME. (restartability and reproductibility tests), see ticket #752

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 10.8 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# principal script is sette.sh, that calls
38#
39#  makenemo
40#
41#   creates the exectuable in ${CONFIG_NAME}/BLD/bin/nemo.exe
42#
43#   (and its link opa in ${CONFIG_NAME}/EXP00)
44#
45#  param.cfg : sets and loads following directories
46#
47#   Executing directory (EXE_DIR)
48#
49
50#
51#   Input files storing (INPUT_DIR)
52#
53#   Temporary directory (if needed) (TMPDIR)
54#
55#   Validation directory (NEMO_VALIDATION_DIR)
56#
57#   (note: this file is the same for all configrations to be tested with sette)
58#
59#  all_functions.sh : loads functions used by sette (note: new functions can be added here)
60#
61#  set_namelist : function declared in all_functions that set namelist parameters for tests
62#
63#  fcm_job.sh
64#
65#   runs job and saves output files (grid_files, restarts, ice_evolu, ftrace.out)
66#
67#   and it creates tree of VALIDATION, in which there are restart files, solver.stat and ocean.output
68#
69#   Tree of VALIDATION is:
70#
71#   NEMO_VALIDATION_DIR/WCONFIG_NAME/WCOMPILER_NAME/TEST_NAME/REVISION_NUMBER(or DATE)
72#
73#   (note this job needs to have an input_CONFIG.cfg in which can be found input tar file)
74#
75#   (note other files can be saved adding at the end of fcm_job list of saved files)
76#
77#  NOTE: if job is not launched for some problems you have executable ready in ${CONFIG_NAME}/EXP00 directory
78#
79#  NOTE: the changed namelists are leaved in ${CONFIG_NAME}/EXP00 directory
80#
81#  in ${SETTE_DIR} is created output.sette with the echo of commands run
82#
83#  if sette.sh is stopped in output.sette there is written the last command executed by sette.sh
84#
85#  if you run: ./sette.sh 2>&1 | tee out.sette
86#
87#  in ${SETTE_DIR} out.sette is redirected standard error & standard output
88#
89#
90# EXAMPLES
91# ========
92#
93# ::
94#
95#  $ ./sette.sh
96#
97#
98# TODO
99# ====
100#
101# option debug
102#
103# EVOLUTIONS
104# ==========
105#
106# $Id$
107#
108#   * creation
109#
110#-
111#
112
113SETTE_DIR=/PATH/OF/SETTE
114
115## NBTEST=6
116## echo "TOTAL NUMBER OF TEST" ${NBTEST}
117## for (( config=2; config<=${NBTEST}; config++ ))
118
119for config in 1 2 3 4 5 6
120do
121
122if [ ${config} -eq 1 ] ;  then
123    # Restartability tests for GYRE_LOBSTER
124    cd ${SETTE_DIR}
125    . ../CONFIG/makenemo -m PW6MONO_VARGAS -n GYRELOB_LONG -r GYRE_LOBSTER del_key "key_diatrc"
126    cd ${SETTE_DIR}
127    . param.cfg
128    . all_functions.sh
129    set_namelist namelist cn_exp \"GYRELOB_LONG\"
130    set_namelist namelist nn_it000 1
131    set_namelist namelist nn_itend 120
132    set_namelist namelist nn_stock 60
133    set_namelist namelist_top ln_trcrad .false.
134    cd ${SETTE_DIR}
135    . ./fcm_job.sh input_GYRE.cfg 1 LONG
136   
137    cd ${SETTE_DIR}
138    set_namelist namelist cn_exp \"GYRELOB_SHORT\"
139    set_namelist namelist nn_it000 61
140    set_namelist namelist nn_itend 120
141    set_namelist namelist nn_stock 60
142    set_namelist namelist ln_rstart .true.
143    set_namelist namelist nn_rstctl 2
144    set_namelist namelist cn_ocerst_in \"GYRELOB_LONG_00000060_restart\"
145    set_namelist namelist_top ln_trcrad .false.
146    set_namelist namelist_top ln_rsttr .true.
147    set_namelist namelist_top nn_rsttr 2
148    set_namelist namelist_top cn_trcrst_in \"GYRELOB_LONG_00000060_restart_trc\"
149    cd ${SETTE_DIR}
150    . ./fcm_job.sh input_GYRE.cfg 1 SHORT
151fi
152
153if [ ${config} -eq 2 ] ;  then
154    # Restartability tests for ORCA2_LIM_PISCES
155    cd ${SETTE_DIR}
156    . ../CONFIG/makenemo -m PW6MONO_VARGAS -n ORCA2LIMPIS_LONG -r ORCA2_LIM_PISCES del_key "key_dtatrc key_diatrc"
157    cd ${SETTE_DIR}
158    . param.cfg
159    . all_functions.sh
160    set_namelist namelist cn_exp \"O2LP_LONG\"
161    set_namelist namelist nn_it000 1
162    set_namelist namelist nn_itend 150
163    set_namelist namelist nn_stock 75
164    set_namelist namelist_top ln_trcrad .false.
165    # put ln_pisdmp, ln_dustfer, ln_river, ln_ndepo, ln_sedinput to false
166    # if not you need input files, and for tests is not necessary
167    set_namelist namelist_pisces ln_pisdmp .false.
168    set_namelist namelist_pisces ln_dustfer .false.
169    set_namelist namelist_pisces ln_river .false.
170    set_namelist namelist_pisces ln_ndepo .false.
171    set_namelist namelist_pisces ln_sedinput .false.
172    cd ${SETTE_DIR}
173    . ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 1 LONG
174   
175    cd ${SETTE_DIR}
176    . param.cfg
177    . all_functions.sh
178    set_namelist namelist cn_exp \"O2LP_SHORT\"
179    set_namelist namelist nn_it000 76
180    set_namelist namelist nn_itend 150
181    set_namelist namelist nn_stock 75
182    set_namelist namelist ln_rstart .true.
183    set_namelist namelist nn_rstctl 2
184    set_namelist namelist cn_ocerst_in \"O2LP_LONG_00000075_restart\"
185    set_namelist namelist_ice_lim2 cn_icerst_in \"O2LP_LONG_00000075_restart_ice\"
186    set_namelist namelist_top ln_trcrad .false.
187    set_namelist namelist_top ln_rsttr .true.
188    set_namelist namelist_top nn_rsttr 2
189    set_namelist namelist_top cn_trcrst_in \"O2LP_LONG_00000075_restart_trc\"
190    # put ln_pisdmp, ln_dustfer, ln_river, ln_ndepo, ln_sedinput
191    # if not you need input files, and for tests is not necessary
192    set_namelist namelist_pisces ln_pisdmp .false.
193    set_namelist namelist_pisces ln_dustfer .false.
194    set_namelist namelist_pisces ln_river .false.
195    set_namelist namelist_pisces ln_ndepo .false.
196    set_namelist namelist_pisces ln_sedinput .false.
197    cd ${SETTE_DIR}
198    . ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 1 SHORT
199fi
200
201if [ ${config} -eq 3 ] ;  then
202    ## Restartability tests for POMME
203    cd ${SETTE_DIR}
204    . ../CONFIG/makenemo -m PW6MONO_VARGAS -n POMME_LONG -r POMME
205    cd ${SETTE_DIR}
206    . param.cfg
207    . all_functions.sh
208    set_namelist namelist cn_exp \"POMME_LONG\"
209    set_namelist namelist nn_it000 1
210    set_namelist namelist nn_itend 600
211    set_namelist namelist nn_stock 300
212    set_namelist namelist nn_write 300
213    cd ${SETTE_DIR}
214    . ./fcm_job.sh input_POMME.cfg 1 LONG
215    cd ${CONFIG_DIR}
216    `mv ${NEW_CONF}/EXP00/restart.obc.output ${NEW_CONF}/EXP00/restart.obc`
217   
218    cd ${SETTE_DIR}
219    set_namelist namelist cn_exp \"POMME_SHORT\"
220    set_namelist namelist nn_it000 301
221    set_namelist namelist nn_itend 600
222    set_namelist namelist nn_stock 300
223    set_namelist namelist ln_rstart .true.
224    set_namelist namelist nn_rstctl 2
225    set_namelist namelist nn_write 300
226    set_namelist namelist cn_ocerst_in \"POMME_LONG_00000300_restart\"
227    cd ${SETTE_DIR}
228    . ./fcm_job.sh input_POMME.cfg 1 SHORT
229fi
230
231if [ ${config} -eq 4 ] ;  then
232    ## Repropducilibity tests for GYRE_LOBSTER
233    cd ${SETTE_DIR}
234    . ../CONFIG/makenemo -m PW6_VARGAS -n GYRELOB_1_4 -r GYRE_LOBSTER add_key "key_mpp_mpi key_mpp_rep key_nproci=1 key_nprocj=4" del_key "key_vectopt_loop key_diatrc"
235    cd ${SETTE_DIR}
236    . param.cfg
237    . all_functions.sh
238    set_namelist namelist nn_it000 1
239    set_namelist namelist nn_itend 75
240    set_namelist namelist nn_fwb 0
241    set_namelist namelist nn_bench 0
242    set_namelist namelist ln_ctl .false.
243    cd ${SETTE_DIR}
244    . ./fcm_job.sh input_GYRE.cfg 4 SHORT
245   
246    cd ${SETTE_DIR}
247    . ../CONFIG/makenemo -m PW6_VARGAS -n GYRELOB_2_2 -r GYRE_LOBSTER add_key "key_mpp_rep key_mpp_mpi key_nproci=2 key_nprocj=2" del_key "key_vectopt_loop key_diatrc"
248    cd ${SETTE_DIR}
249    . param.cfg
250    . all_functions.sh
251    set_namelist namelist nn_it000 1
252    set_namelist namelist nn_itend 75
253    set_namelist namelist nn_fwb 0
254    set_namelist namelist nn_bench 0
255    set_namelist namelist ln_ctl .false.
256    cd ${SETTE_DIR}
257    . ./fcm_job.sh input_GYRE.cfg 4 SHORT
258fi
259
260if [ ${config} -eq 5 ] ;  then
261    ## Repropducilibity tests for ORCA2_LIM_PISCES
262    cd ${SETTE_DIR}
263    . ../CONFIG/makenemo -m PW6_VARGAS -n ORCA2LIMPIS_4_4 -r ORCA2_LIM_PISCES add_key "key_mpp_mpi key_mpp_rep key_nproci=4 key_nprocj=4" del_key "key_vectopt_loop key_dtatrc key_diatrc" 
264    cd ${SETTE_DIR}
265    . param.cfg
266    . all_functions.sh
267    set_namelist namelist nn_it000 1
268    set_namelist namelist nn_itend 75
269    set_namelist namelist nn_fwb 0
270    set_namelist namelist nn_bench 0
271    set_namelist namelist ln_ctl .false.
272    # put ln_pisdmp, ln_dustfer, ln_river, ln_ndepo, ln_sedinput to false
273    # if not you need input files, and for tests is not necessary
274    set_namelist namelist_pisces ln_pisdmp .false.
275    set_namelist namelist_pisces ln_dustfer .false.
276    set_namelist namelist_pisces ln_river .false.
277    set_namelist namelist_pisces ln_ndepo .false.
278    set_namelist namelist_pisces ln_sedinput .false.
279    cd ${SETTE_DIR}
280    . ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 16 SHORT
281
282    cd ${SETTE_DIR}
283    . ../CONFIG/makenemo -m PW6_VARGAS -n ORCA2LIMPIS_2_8 -r ORCA2_LIM_PISCES add_key "key_mpp_rep key_mpp_mpi key_nproci=2 key_nprocj=8" del_key "key_vectopt_loop key_dtatrc key_diatrc"
284    cd ${SETTE_DIR}
285    . param.cfg
286    . all_functions.sh
287    set_namelist namelist nn_it000 1
288    set_namelist namelist nn_itend 75
289    set_namelist namelist nn_fwb 0
290    set_namelist namelist nn_bench 0
291    set_namelist namelist ln_ctl .false.
292    # put ln_pisdmp, ln_dustfer, ln_river, ln_ndepo, ln_sedinput to false
293    # if not you need input files, and for tests is not necessary
294    set_namelist namelist_pisces ln_pisdmp .false.
295    set_namelist namelist_pisces ln_dustfer .false.
296    set_namelist namelist_pisces ln_river .false.
297    set_namelist namelist_pisces ln_ndepo .false.
298    set_namelist namelist_pisces ln_sedinput .false.
299    cd ${SETTE_DIR}
300    . ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 16 SHORT
301fi
302
303if [ ${config} -eq 6 ] ;  then
304    ## Reproductibility tests for POMME
305    cd ${SETTE_DIR}
306    . ../CONFIG/makenemo -m PW6_VARGAS -n POMME_1_4 -r POMME add_key "key_mpp_mpi key_mpp_rep key_nproci=1 key_nprocj=4"
307    cd ${SETTE_DIR}
308    . param.cfg
309    . all_functions.sh
310    set_namelist namelist nn_it000 1
311    set_namelist namelist nn_itend 300
312    set_namelist namelist nn_fwb 0
313    set_namelist namelist nn_bench 0
314    set_namelist namelist ln_ctl .false.
315    cd ${SETTE_DIR}
316    . ./fcm_job.sh input_POMME.cfg 4 SHORT
317   
318    cd ${SETTE_DIR}
319    . ../CONFIG/makenemo -m PW6_VARGAS -n POMME_2_2 -r POMME add_key "key_mpp_mpi key_mpp_rep key_nproci=2 key_nprocj=2" 
320    cd ${SETTE_DIR}
321    . param.cfg
322    . all_functions.sh
323    set_namelist namelist nn_it000 1
324    set_namelist namelist nn_itend 300
325    set_namelist namelist nn_fwb 0
326    set_namelist namelist nn_bench 0
327    set_namelist namelist ln_ctl .false.
328    cd ${SETTE_DIR}
329    . ./fcm_job.sh input_POMME.cfg 4 SHORT
330fi
331
332done
Note: See TracBrowser for help on using the repository browser.