source: trunk/libIGCM/AA_job @ 380

Last change on this file since 380 was 380, checked in by sdipsl, 14 years ago
  • Add a IGCM_config_Check function to test coherency between post-processing frequency. See #29. Will exit before execution if incoherency are found (example rebuild every 6 months, having a 1Y PeriodLenght? and a 2 months TimeSeriesFrequency?...)
  • libIGCM_post.ksh refactoring, making general function to handle frequency, easier to read hopefully. Still some simplification to add
  • DRYRUN was not maintain since a long time. Fix that. Minor adaptation still need to be done for sx8 and sx9 (ie when you want to DRYRUN from a machine initially devoted to the post-processing). DRYRUN is aimed for developpement purpose, prefer StandAlone? method to post-process after the fact.
  • we clean SUBMIT_DIR keeping only the 5 youngest Script_Output_* files. Good for workdir quota.
  • simplify rebuildFrom* options : remove R_SAVE and config_UserChoices_JobName used by IGCM_Patch_20091118_mask.ksh. rebuild.ksh will define that ; AA_create* already know that.
  • when exiting because of a RErun an old job : be more explicit and point the files who initiated this action, together with a link to clean_month.job
  • remove some redundant typeset
  • clean libIGCM_sys.ksh : remove machines
  • and cosmetics.
  • Property licence set to
    The following licence information concerns ONLY the libIGCM tools
    ==================================================================

    Copyright © Centre National de la Recherche Scientifique CNRS
    Commissariat à l'Énergie Atomique CEA

    libIGCM : Library for Portable Models Computation of IGCM Group.

    IGCM Group is the french IPSL Global Climate Model Group.

    This library is a set of shell scripts and functions whose purpose is
    the management of the initialization, the launch, the transfer of
    output files, the post-processing and the monitoring of datas produce
    by any numerical program on any plateforme.

    This software is governed by the CeCILL license under French law and
    abiding by the rules of distribution of free software. You can use,
    modify and/ or redistribute the software under the terms of the CeCILL
    license as circulated by CEA, CNRS and INRIA at the following URL
    "http://www.cecill.info".

    As a counterpart to the access to the source code and rights to copy,
    modify and redistribute granted by the license, users are provided only
    with a limited warranty and the software's author, the holder of the
    economic rights, and the successive licensors have only limited
    liability.

    In this respect, the user's attention is drawn to the risks associated
    with loading, using, modifying and/or developing or reproducing the
    software by the user in light of its specific status of free software,
    that may mean that it is complicated to manipulate, and that also
    therefore means that it is reserved for developers and experienced
    professionals having in-depth computer knowledge. Users are therefore
    encouraged to load and test the software's suitability as regards their
    requirements in conditions enabling the security of their systems and/or
    data to be ensured and, more generally, to use and operate it in the
    same conditions as regards security.

    The fact that you are presently reading this means that you have had
    knowledge of the CeCILL license and that you accept its terms.
  • Property svn:keywords set to Revision Author Date
File size: 22.4 KB
Line 
1#-Q- cesium #!/bin/ksh
2#-Q- cesium ###################################################
3#-Q- cesium ## CESIUM   CEA                                  ##
4#-Q- cesium ## Usefull for postprocessing. AA_job not tested ##
5#-Q- cesium ###################################################
6#-Q- cesium #MSUB -r ::Jobname::    # Nom du job               
7#-Q- cesium #MSUB -N 1              # Reservation du noeud
8#-Q- cesium #MSUB -n 1              # Reservation du processus
9#-Q- cesium #MSUB -T 86400          # Limite de temps elapsed du job
10#-Q- cesium #MSUB -E "-j o"
11#-Q- cesium #MSUB -E "-S /bin/ksh"
12#-Q- platine #!/usr/bin/ksh
13#-Q- platine ##################
14#-Q- platine ## PLATINE   CEA ##
15#-Q- platine ##################
16#-Q- platine #BSUB -J ::Jobname::       # nom de la requete
17#-Q- platine #BSUB -N                   # message a la fin du job
18#-Q- platine #BSUB -o Script_Output_::Jobname::.000001    # nom du fichier de sortie
19#-Q- platine #BSUB -n ::JobNumProcTot::             # reservation des processeurs pour le job
20#-Q- platine #BSUB -W 1:00           # Limite temps
21#-Q- platine BATCH_NUM_PROC_TOT=$SLURM_NPROCS
22#-Q- titane #!/usr/bin/ksh
23#-Q- titane ##################
24#-Q- titane ## TITANE   CEA ##
25#-Q- titane ##################
26#-Q- titane #MSUB -r ::Jobname::       # nom de la requete
27#-Q- titane #MSUB -o Script_Output_::Jobname::.000001    # nom du fichier de sortie
28#-Q- titane #MSUB -n ::JobNumProcTot::             # reservation des processeurs pour le job
29#-Q- titane #MSUB -T 86400           # Limite temps (en secondes)
30#-Q- titane #MSUB -p gen2211
31#-Q- titane BATCH_NUM_PROC_TOT=$BRIDGE_MSUB_NPROC
32#-Q- sx8brodie #######################
33#-Q- sx8brodie ## SX8BRODIE   IDRIS ##
34#-Q- sx8brodie #######################
35#-Q- sx8brodie #PBS -N ::Jobname::         # nom de la requete
36#-Q- sx8brodie #PBS -m a                   # message a la fin du job
37#-Q- sx8brodie #PBS -j o                   # regroupement des sorties du job : standard error et output
38#-Q- sx8brodie #PBS -o Script_Output_::Jobname::.000001  # nom du fichier de sortie
39#-Q- sx8brodie #PBS -S /usr/bin/ksh        # shell de soumission
40#-Q- sx8brodie #PBS -v BATCH_NUM_PROC_TOT=::JobNumProcTot::
41#-Q- sx8brodie #PBS -q ::JobClass::                # classe multi pour BATCH_NUM_PROC_TOT superieur a 2, mono sinon
42#-Q- sx8brodie #PBS -l cpunum_job=${BATCH_NUM_PROC_TOT}  # reservation des processeurs pour le job
43#-Q- sx8brodie #PBS -l memsz_job=15.0gb     # Limite memoire
44#-Q- sx8brodie #PBS -l cputim_job=1:00:00  # Limite temps
45#-Q- aix6 #!/usr/bin/ksh
46#-Q- aix6 # ######################
47#-Q- aix6 # ##   VARGAS IDRIS   ##
48#-Q- aix6 # ######################
49#-Q- aix6 # Nom de la requete
50#-Q- aix6 # @ job_name = ::Jobname::
51#-Q- aix6 # Type de travail
52#-Q- aix6 # @ job_type = parallel
53#-Q- aix6 # Fichier de sortie standard
54#-Q- aix6 # @ output = $(job_name).$(jobid)
55#-Q- aix6 # Fichier de sortie erreur (le meme)
56#-Q- aix6 # @ error =  $(job_name).$(jobid)
57#-Q- aix6 # Nombre de processus demandes
58#-Q- aix6 # @ total_tasks = ::JobNumProcTot::
59#-Q- aix6 # @ environment = "BATCH_NUM_PROC_TOT=::JobNumProcTot::"
60#-Q- aix6 # Temps CPU max. par processus MPI hh:mm:ss
61#-Q- aix6 # @ wall_clock_limit = 1:00:00
62#-Q- aix6 # Memoire max. utilisee par processus
63#-Q- aix6 # @ data_limit = 3.2gb
64#-Q- aix6 # Memoire stack demandee
65#-Q- aix6 # @ stack_limit = 0.3gb,0.3gb
66#-Q- aix6 # Pas d OpenMP
67#-Q- aix6 # @ resources = ConsumableCpus(1)
68#-Q- aix6 # Fin de l entete
69#-Q- aix6 # @ queue
70#-Q- sx8mercure #!/bin/ksh
71#-Q- sx8mercure ######################
72#-Q- sx8mercure ## SX8MERCURE   CEA ##
73#-Q- sx8mercure ######################
74#-Q- sx8mercure #PBS -N ::Jobname::           # nom de la requete
75#-Q- sx8mercure #PBS -m a                     # message a la fin du job
76#-Q- sx8mercure #PBS -j o                     # regroupement des sorties du job : standard error et output
77#-Q- sx8mercure ####PBS -A gen6178
78#-Q- sx8mercure #PBS -o Script_Output_::Jobname::.000001   # nom du fichier de sortie
79#-Q- sx8mercure #PBS -S /usr/bin/ksh          # shell de soumission
80#-Q- sx8mercure #PBS -v BATCH_NUM_PROC_TOT=::JobNumProcTot::
81#-Q- sx8mercure #PBS -l cpunum_job=${BATCH_NUM_PROC_TOT}          # reservation des processeurs pour le job
82#-Q- sx8mercure #PBS -l memsz_job=15.0gb       # limite memoire
83#-Q- sx8mercure #PBS -l elapstim_req=01:00:00 # limite en temps elapsed
84#-Q- sx9mercure #!/bin/ksh
85#-Q- sx9mercure ######################
86#-Q- sx9mercure ## SX9MERCURE   CEA ##
87#-Q- sx9mercure ######################
88#-Q- sx9mercure #PBS -N ::Jobname::           # nom de la requete
89#-Q- sx9mercure #PBS -m a                     # message a la fin du job
90#-Q- sx9mercure #PBS -j o                     # regroupement des sorties du job : standard error et output
91#-Q- sx9mercure #PBS -o Script_Output_::Jobname::.000001   # nom du fichier de sortie
92#-Q- sx9mercure #PBS -S /usr/bin/ksh          # shell de soumission
93#-Q- sx9mercure #PBS -v BATCH_NUM_PROC_TOT=::JobNumProcTot::
94#-Q- sx9mercure #PBS -l cpunum_job=${BATCH_NUM_PROC_TOT}          # reservation des processeurs pour le job
95#-Q- sx9mercure #PBS -l memsz_job=16.0gb       # limite memoire
96#-Q- sx9mercure #PBS -l elapstim_req=24:00:00 # limite en temps elapsed
97#-Q- sx9mercure #PBS -A gen6178               # groupe obligatoire sur SX9
98#-Q- sx9mercure #PBS -q para-sx9              # para-sx9 or prio-sx9 (for CMIP5 top priorities), bckg-sx9 (run with free slot) and test-sx9 (if elapsed<1h)
99#-Q- lxiv8 ######################
100#-Q- lxiv8 ## OBELIX      LSCE ##
101#-Q- lxiv8 ######################
102#-Q- lxiv8 #PBS -N ::Jobname::
103#-Q- lxiv8 #PBS -m a
104#-Q- lxiv8 #PBS -j oe
105#-Q- lxiv8 #PBS -q medium
106#-Q- lxiv8 #PBS -o Script_Output_::Jobname::.000001
107#-Q- lxiv8 #PBS -S /bin/ksh
108#-Q- lxiv8 #PBS -v BATCH_NUM_PROC_TOT=::JobNumProcTot::
109#-Q- lxiv8 #PBS -l nodes=1:ppn=::JobNumProcTot::
110#-Q- default #!/bin/ksh
111#-Q- default ##################
112#-Q- default ## DEFAULT HOST ##
113#-Q- default ##################
114#-Q- default #For MPI use, uncomment next line :
115#-Q- default #BATCH_NUM_PROC_TOT=::JobNumProcTot::
116
117#**************************************************************
118# Author: Sebastien Denvil
119# Contact: Sebastien.Denvil__at__ipsl.jussieu.fr
120# $Revision::                                          $ Revision of last commit
121# $Author::                                            $ Author of last commit
122# $Date::                                              $ Date of last commit
123# IPSL (2006)
124#  This software is governed by the CeCILL licence see libIGCM/libIGCM_CeCILL.LIC
125#
126#**************************************************************
127
128#set -eu
129#set -vx
130
131date
132echo
133echo "#######################################"
134echo "#       ANOTHER GREAT SIMULATION      #"
135echo "#######################################"
136echo
137
138#D--------------------------------------------------------------------==
139#D--------------------------------------------------------------------==
140#D-
141#D-                      Job to launch IGCM models
142#D-
143#D--------------------------------------------------------------------==
144#D--------------------------------------------------------------------==
145#D-
146
147MODIPSL=::modipsl::
148libIGCM=${MODIPSL}/libIGCM
149
150#D--------------------------------------------------------------------==
151#D-                   -1. User modification place
152#D-                      - Job Verbosity
153#D-                      - PeriodNb
154#D-                      - Experience type : DEB(ug), DEV(elopment), RUN
155#D--------------------------------------------------------------------==
156
157#D- Increased verbosity (1, 2, 3)
158Verbosity=3
159#D- Number of execution in one job
160PeriodNb=1
161#-Q- sx9mercure PeriodNb=60
162
163#D-
164# --------------------------------------------------------------------
165#D- ! Optionnal features /!\ Use with care !
166# --------------------------------------------------------------------
167
168#D- Low level debug : to bypass lib test checks and stack construction
169#D- Default=true
170DEBUG_debug=false
171
172#D- Set DEBUG_sys to false to disable output calls of function
173#D- Default=true
174#DEBUG_sys=false
175
176#D- Experience type : DEB(ug), DEV(elopment), RUN (default)
177JobType=RUN
178
179#D- Define running directory
180#D- Default=${TMPDIR} ie temporary batch directory
181#RUN_DIR_PATH=/workdir/or/scratchdir/of/this/machine
182
183#D- Define submit directory
184#D- Default= where you launch qsub (variable from scheduler)
185#SUBMIT_DIR=$( pwd )
186
187#D- Define BIG_DIR directory
188#D- Default=(strongly machine dependant/see libIGCM_sys for details)
189#BIG_DIR=/somewhere/with/lot/of/space/scratchdir/may/be
190
191#D- Turn in dry run mode ? (0,1,2,3)
192#D- Default=0
193#DRYRUN=3
194# YOU MUST COMPILE YOUR EXE FILES FOR DRYRUN MODE !
195# -------------------------------------------------------------------------------------
196# | DRYRUN=  |  Date computations, | sys_Get    |  Exe    | sys_Put_Out; sys_Put_Rest |
197# |          |  Cp/Exe param files |            |  Chmod  |                           |
198# |          |      Qsub           |            |         |                           |
199# -------------------------------------------------------------------------------------
200# |    0     |       yes           |    yes     |  yes    |      yes                  |
201# -------------------------------------------------------------------------------------
202# |    1     |       yes           |    yes     |  yes    |      no                   |
203# -------------------------------------------------------------------------------------
204# |    2     |       yes           |    yes     |  no     |      no                   |
205# -------------------------------------------------------------------------------------
206# |    3     |       yes           |    no      |  no     |      no                   |
207# -------------------------------------------------------------------------------------
208
209#D- Define input file root directory
210#D- Default=/IGCMG/common/account/of/this/machine
211#R_IN=/u/rech/por/rpor111/DATA
212
213#D-
214#D--------------------------------------------------------------------==
215#D-                   0. System Environment
216#D-                      - Define variables for Number of processors
217#D-                      - Define MPI variables
218#D-                      - Define batch scheduler variables
219#D-                      - Source IGCM Library
220#D-                      - Get RESOLution in .resol file (temporary)
221#D--------------------------------------------------------------------==
222
223#D--------------------------------------------------------------------==
224
225. ${libIGCM}/libIGCM_debug/libIGCM_debug.ksh
226       ( ${DEBUG_debug} ) && IGCM_debug_Check
227. ${libIGCM}/libIGCM_card/libIGCM_card.ksh
228       ( ${DEBUG_debug} ) && IGCM_card_Check
229. ${libIGCM}/libIGCM_date/libIGCM_date.ksh
230       ( ${DEBUG_debug} ) && IGCM_date_Check
231#-------
232. ${libIGCM}/libIGCM_sys/libIGCM_sys.ksh
233. ${libIGCM}/libIGCM_config/libIGCM_config.ksh
234. ${libIGCM}/libIGCM_comp/libIGCM_comp.ksh
235. ${libIGCM}/libIGCM_post/libIGCM_post.ksh
236
237#D--------------------------------------------------------------------==
238
239#-- Resolution FLAG for oasis input
240[ -f ${SUBMIT_DIR}/../.resol ] && RESOL=$(head -1 ${SUBMIT_DIR}/../.resol)
241#RESOL="ORCA2xLMD9671"
242
243#D-
244#D--------------------------------------------------------------------==
245#D-           1. INITIALIZE CONFIGURATION AND THEN COMPONENTS
246#D--------------------------------------------------------------------==
247
248# --------------------------------------------------------------------==
249#D- Initialize configuration :
250#D-              - Simulation configuration
251#D-              - Simulation parameters
252#D-              - Execution parameter
253#D-              - Define input files directory
254#D-              - Read or initialize CumulPeriod
255#D-              - run.card
256#D-
257# --------------------------------------------------------------------==
258IGCM_config_Initialize
259
260# --------------------------------------------------------------------==
261#D- Define, create and cd RUN_DIR
262#D- 
263# --------------------------------------------------------------------==
264RUN_DIR=${RUN_DIR_PATH}/${config_UserChoices_TagName}/${config_UserChoices_JobName}.${$}
265IGCM_sys_MkdirWork ${RUN_DIR}
266IGCM_sys_Cd ${RUN_DIR}
267
268# --------------------------------------------------------------------==
269#D- Initialize each components taking part
270#D- into simulation configuration :
271#D-         - Define component executable
272#D-         - Define Write Frequency by component "1M" "1D" ...
273#D-         - Source ${comp}.driver
274#D-         - Define Storage Places by component
275#D-         - ${comp}_Initialize :
276#D-         - Patterns to sed
277#D-         - Variables from namelist
278#D-
279# --------------------------------------------------------------------==
280IGCM_comp_Initialize
281
282# --------------------------------------------------------------------==
283#D- Verify compatibility of period length, write frequencies, ...
284#D- Verify compatibility of rebuild choices and post-process choices
285#D- Will stop here if something is wrong
286# --------------------------------------------------------------------==
287IGCM_config_Check
288
289# ------------------------------------------------------------------
290#D- Test if all was right before entering the period loop
291# ------------------------------------------------------------------
292IGCM_debug_Verif_Exit
293
294#D--------------------------------------------------------------------==
295#D-                  2. ENTER THE DEEP EXECUTION LOOP
296#D-                  !!!! FASTEN YOUR SEAT BELTS !!!!
297#D-                  !!!!!      PLEASE.          !!!!
298#D-                  !! WE WILL CROSS TURBULENCES. !!
299#D--------------------------------------------------------------------==
300
301Period=1
302
303PeriodContinue=false
304if [ ${Period} -le ${PeriodNb} ]; then
305    PeriodContinue=true
306fi
307while ( ${PeriodContinue} ) ; do
308
309    echo
310    echo "Starting iteration ${Period} / ${PeriodNb}"
311
312    #D-
313    # ------------------------------------------------------------------
314    #D- COMPUTE AND DEFINE DATE STUFF.
315    # ------------------------------------------------------------------
316    IGCM_config_PeriodStart
317    #D- => ${PeriodDateBegin}
318    #D- => ${PeriodDateEnd}
319    #D- => ${CumulPeriod}
320    #D- => ${DatesPeriod}=${PeriodDateBegin}_${PeriodDateEnd}
321    #D- => ${PeriodLength} => JOURS=31 , 28, 29, 30 ; MOIS=0 ; ANS=0
322    #D- => update run.card value
323   
324    #D-
325    # ------------------------------------------------------------------
326    #D- BEGIN COMPUTATION ONLY IF NEEDED
327    # ------------------------------------------------------------------
328    if [ ${SimulationLengthInDays} -gt ${ExperienceLengthInDays} ] ; then
329        break ;
330    fi
331   
332    #D-
333    # ------------------------------------------------------------------
334    #D- Optionnal function in driver
335    #D- to set special variables used in forward lists (Param, Init or Bc).
336    # ------------------------------------------------------------------
337    IGCM_comp_PeriodStart
338   
339    #D-
340    # ------------------------------------------------------------------
341    #D- Get parameters text files updated by job (.def, namelist ...)
342    #D- READ AND USE BY GCM AT EACH EXECUTION.
343    # ------------------------------------------------------------------
344    IGCM_comp_GetInputParametersFiles
345
346    #D-
347    # ------------------------------------------------------------------
348    #D- Get initial state (Etat0, carteveg,relief...)
349    #D- NECESSARY ONLY IF CumulPeriod= (=> NUMERO) == 1
350    #D- AND ???_Restart=NO
351    #D- READ AND USE BY GCM FOR ONLY ONE EXECUTION.
352    # ------------------------------------------------------------------
353    IGCM_comp_GetInputInitialStateFiles
354
355    #D-
356    # ------------------------------------------------------------------
357    #D- Get Boundaries Conditions (SST, WIND[X,Y,Z], LAI ...)
358    #D- READ AND USE BY GCM AT EACH EXECUTION.
359    # ------------------------------------------------------------------
360    IGCM_comp_GetInputBoundaryFiles
361
362    #D-
363    # ------------------------------------------------------------------
364    #D- Get SmoothFiles Conditions (SST, WIND[X,Y,Z], LAI ...)
365    #D- READ AND USE BY GCM AT EACH EXECUTION but varying in time
366    # ------------------------------------------------------------------
367    IGCM_comp_GetInputSmoothFiles
368
369    #D-
370    # ------------------------------------------------------------------
371    #D- Get restart files (restartphy.nc, orca_restart.nc ...)
372    #D- READ AND USE BY GCM AT EACH EXECUTION.
373    #D-
374    #D- IF A COMPONENT DO NOT RESTART FROM PREVIOULSY COMPUTED RESTART
375    #D- ONLY IF CumulPeriod= (=> NUMERO) == 1
376    #D- MUST EXECUTE CREATE ETAT0_LIMIT (TYPICALLY LMDZ AND ./create_etat0_limit.e)
377    #D-
378    #D- IF CumulPeriod == 1
379    #D- AND A COMPONENT RESTART FROM PREVIOULSY COMPUTED RESTART
380    #D- MUST BRING THIS RESTART IN ${RUN_DIR_PATH}
381    #D-
382    #D- ELSE BRING RESTART FROM ${JobName} IN ${RUN_DIR_PATH}
383    # ------------------------------------------------------------------
384    IGCM_comp_GetInputRestartFiles
385   
386    #D-
387    # ------------------------------------------------------------------
388    #D- Test if all was right before Update
389    # ------------------------------------------------------------------
390    IGCM_debug_Verif_Exit
391
392    # ------------------------------------------------------------------
393    #D- Activate running environnement variables
394    # ------------------------------------------------------------------
395    IGCM_sys_activ_variables
396
397    #D-
398    # ------------------------------------------------------------------
399    #D- UPDATE ParametersFiles (.def, namelist ...) with
400    #D- current value of (ORCA_NIT00, ORCA_LRSTAR, RAZ_DATE, ...)
401    # ------------------------------------------------------------------
402    IGCM_comp_Update
403
404    #D-
405    # ------------------------------------------------------------------
406    #D- Test if all was right before execution
407    # ------------------------------------------------------------------
408    IGCM_debug_Verif_Exit
409
410    #D-
411    #D----------------------------------------------------------------==
412    #D-                          3. Execution
413    #D----------------------------------------------------------------==
414
415    echo
416    echo "#######################################"
417    echo "#      DIR BEFORE RUN EXECUTION       #"
418    echo "#######################################"
419    echo
420    ls -lrt
421
422    echo "========================================================================"
423    if ( [ X${BATCH_NUM_PROC_TOT} != X ] && [ "${BATCH_NUM_PROC_TOT}" -gt 1 ] ) ; then
424        MPIRUN_COMMAND=${HOST_MPIRUN_COMMAND}
425        eval MPIRUN_OPTIONS=${config_UserChoices_JobRunOptions}
426    else
427        MPIRUN_COMMAND=${MPIRUN_COMMAND:="time "}
428        MPIRUN_OPTIONS=${MPIRUN_OPTIONS:=""}
429    fi
430
431    if [ ${DRYRUN} -le 1 ] ; then
432        REAL_DATE_INIT=$( date )
433        echo "EXECUTION of : ${MPIRUN_COMMAND} ${MPIRUN_OPTIONS} ./${config_Executable_Name}   > ${Exe_Output} 2>&1"
434        echo                                                                                   > ${Exe_Output}
435        echo "#######################################"                                        >> ${Exe_Output}
436        echo "EXECUTION of : ${MPIRUN_COMMAND} ${MPIRUN_OPTIONS} ./${config_Executable_Name}" >> ${Exe_Output}
437        echo                                                                                  >> ${Exe_Output}
438        typeset RET
439        RUN_DATE_BEGIN=$( date '+%Y-%m-%dT%H:%M:%S' )
440        ${MPIRUN_COMMAND} ${MPIRUN_OPTIONS} ./${config_Executable_Name} >> ${Exe_Output} 2>&1
441        RET=$?
442        RUN_DATE_END=$( date '+%Y-%m-%dT%H:%M:%S' )
443        if [ ${RET} -gt 0 ] ; then
444            echo "Return code of executable :" ${RET}
445            IGCM_debug_Exit "EXECUTABLE"
446            IGCM_sys_Cp ${Exe_Output} ${SUBMIT_DIR}/${PREFIX}_${Exe_Output}_error
447        fi
448        echo                                            >> ${Exe_Output}
449        echo "#######################################"  >> ${Exe_Output}
450        echo "libIGCM RunDateBegin=${RUN_DATE_BEGIN}"   >> ${Exe_Output}
451        echo "libIGCM RunDateEnd=${RUN_DATE_END}"       >> ${Exe_Output}
452        echo                                            >> ${Exe_Output}
453    else
454        echo "EXECUTION of : ${MPIRUN_COMMAND} ${MPIRUN_OPTIONS} ./${config_Executable_Name} simulated for DRYRUN = " $DRYRUN
455        if ( $DEBUG_debug ) ; then
456            echo "FOR EXECUTION DRYRUN mode = " $DRYRUN >> stack
457        fi
458    fi
459    echo "========================================================================"
460
461    echo
462    echo "#######################################"
463    echo "#       DIR AFTER RUN EXECUTION       #"
464    echo "#######################################"
465    echo
466    ls -lrt
467
468    #D-
469    # ------------------------------------------------------------------
470    #D- Desactivate running environnement variables
471    # ------------------------------------------------------------------
472    IGCM_sys_desactiv_variables
473
474    #D-
475    #D----------------------------------------------------------------==
476    #D-                    4. Post execution operations
477    #D----------------------------------------------------------------==
478
479    #D-
480    # ------------------------------------------------------------------
481    #D- Save on archive machine netcdf outputs, restarts
482    #D- and text files of models
483    # ------------------------------------------------------------------
484    IGCM_comp_Finalize
485
486    #D-
487    # ------------------------------------------------------------------
488    #D- Test if all was right after Finalize
489    # ------------------------------------------------------------------
490    IGCM_debug_Verif_Exit
491
492    #D-
493    # ------------------------------------------------------------------
494    #D- Configure asynchronous post-treatment (Level 0) when necessary (rebuild)
495    #D- Configure classic post-treatment (Level 1) when necessary (TimeSeries/Seasonal)
496    # ------------------------------------------------------------------
497    IGCM_post_Configure
498
499    #D-
500    # ------------------------------------------------------------------
501    #D- Launch remote rebuild or/and post-treatment process if necessary
502    # ------------------------------------------------------------------
503    IGCM_post_Submit
504
505    #D-
506    # ------------------------------------------------------------------
507    #D- Save job output
508    #D- Manage executable size to save only different binary
509    #D- Write in run.card user, system and elapse time
510    #D- Check that everything went well ! No ? then we stop.
511    #D- Determine next computed period
512    # ------------------------------------------------------------------
513    IGCM_config_PeriodEnd
514
515    echo "Ending iteration ${Period}"
516    (( Period = Period + 1 ))
517
518    # End loop if date end is reached
519    if [ ${SimulationLengthInDays} -ge ${ExperienceLengthInDays} ] ; then
520        break ;
521    fi
522
523    PeriodContinue=false
524    if [ ${Period} -le ${PeriodNb} ]; then
525        PeriodContinue=true
526    fi
527done
528
529#D-
530#D--------------------------------------------------------------------==
531#D-     5. Submit next job or send mail if simulation over.
532#D--------------------------------------------------------------------==
533IGCM_config_Finalize
534
535date
Note: See TracBrowser for help on using the repository browser.