source: tags/libIGCM_v2.0_beta4/AA_job

Last change on this file was 681, checked in by mafoipsl, 12 years ago

On curie : Computing job on -q standard ie thin nodes, post-processing jobs on -q large ie large nodes. Stop default echo of commands.

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