source: branches/libIGCM_MPI_OpenMP/AA_job

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

Keep echo of execution command.

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