source: tags/libIGCM_v2.0_rc1/AA_job @ 1137

Last change on this file since 1137 was 712, checked in by aclsce, 12 years ago
  • Added TaskType? variable in jobs to specify the type of the job (computing or post-processing).
  • Added the use of TaskType? variable in Curie libsys to source the appropriate .atlas_env* configuration file.
  • 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.2 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 #!/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- Task type (computing or post-processing)
174TaskType=computing
175
176#D--------------------------------------------------------------------==
177#D-                   -1. User modification place
178#D-                      - Job Verbosity
179#D-                      - PeriodNb
180#D-                      - Experience type : DEB(ug), DEV(elopment), RUN
181#D--------------------------------------------------------------------==
182
183#D- Increased verbosity (1, 2, 3)
184Verbosity=3
185#D- Experience type : DEB(ug), DEV(elopment), RUN (default)
186JobType=RUN
187#D- Number of execution in one job
188PeriodNb=1
189#-Q- sx9mercure PeriodNb=60
190
191#D-
192# --------------------------------------------------------------------------------------------------#
193#D-                          ! Optionnal features /!\ Use with care !                               #
194# --------------------------------------------------------------------------------------------------#
195
196
197#D- Low level debug : to bypass lib test checks and stack construction
198#D- Default=true
199DEBUG_debug=false
200
201#D- Set DEBUG_sys to false to disable output calls of function
202#D- Default=true
203#DEBUG_sys=false
204
205#D- Define running directory
206#D- Default=${TMPDIR} ie temporary batch directory
207#RUN_DIR_PATH=/workdir/or/scratchdir/of/this/machine
208
209#D- Define submit directory
210#D- Default= where you launch qsub (variable from scheduler)
211#SUBMIT_DIR=$( pwd )
212
213#D- Define BIG_DIR directory
214#D- Default=(strongly machine dependant/see libIGCM_sys for details)
215#BIG_DIR=/somewhere/with/lot/of/space/scratchdir/may/be
216
217#D- Define input file root directory
218#D- Default=/IGCMG/common/account/of/this/machine
219#R_IN=/u/rech/por/rpor111/DATA
220
221#D- Turn in dry run mode ? (0,1,2,3)
222#D- Default=0
223#DRYRUN=3
224# YOU HAVE TO COMPILE YOUR EXE FILES to USE DRYRUN MODE !
225# -------------------------------------------------------------------------------------
226# | DRYRUN=  |  Date computations, | sys_Get    |  Exe    | sys_Put_Out; sys_Put_Rest |
227# |          |  Cp/Exe param files |            |  Chmod  |                           |
228# |          |      Qsub           |            |         |                           |
229# -------------------------------------------------------------------------------------
230# |    0     |       yes           |    yes     |  yes    |      yes                  |
231# -------------------------------------------------------------------------------------
232# |    1     |       yes           |    yes     |  yes    |      no                   |
233# -------------------------------------------------------------------------------------
234# |    2     |       yes           |    yes     |  no     |      no                   |
235# -------------------------------------------------------------------------------------
236# |    3     |       yes           |    no      |  no     |      no                   |
237# -------------------------------------------------------------------------------------
238
239#D-
240# --------------------------------------------------------------------------------------------------#
241#D- ! End of optionnal features /!\ Do not modify anything below unless you know what you are doing #
242# --------------------------------------------------------------------------------------------------#
243
244#D-
245#D--------------------------------------------------------------------==
246#D-                   0. System Environment
247#D-                      - Define variables for Number of processors
248#D-                      - Define MPI variables
249#D-                      - Define batch scheduler variables
250#D-                      - Source IGCM Library
251#D-                      - Get RESOLution in .resol file (temporary)
252#D--------------------------------------------------------------------==
253
254#D--------------------------------------------------------------------==
255
256. ${libIGCM}/libIGCM_debug/libIGCM_debug.ksh
257       ( ${DEBUG_debug} ) && IGCM_debug_Check
258. ${libIGCM}/libIGCM_card/libIGCM_card.ksh
259       ( ${DEBUG_debug} ) && IGCM_card_Check
260. ${libIGCM}/libIGCM_date/libIGCM_date.ksh
261       ( ${DEBUG_debug} ) && IGCM_date_Check
262#-------
263. ${libIGCM}/libIGCM_sys/libIGCM_sys.ksh
264. ${libIGCM}/libIGCM_config/libIGCM_config.ksh
265. ${libIGCM}/libIGCM_comp/libIGCM_comp.ksh
266. ${libIGCM}/libIGCM_post/libIGCM_post.ksh
267
268#D--------------------------------------------------------------------==
269
270#-- Resolution FLAG for oasis input
271#RESOL="ORCA2xLMD9671"
272[ -f ${SUBMIT_DIR}/../.resol ] && RESOL=$(head -1 ${SUBMIT_DIR}/../.resol)
273#-- Chemistrie FLAG to ease chemistries configurations management
274#CHEM="AER"
275[ -f ${SUBMIT_DIR}/../.chimie ] && eval $(grep CHEM ${SUBMIT_DIR}/../.chimie) 
276
277#D-
278#D--------------------------------------------------------------------==
279#D-           1. INITIALIZE CONFIGURATION AND THEN COMPONENTS
280#D--------------------------------------------------------------------==
281
282# --------------------------------------------------------------------==
283#D- Initialize configuration :
284#D-              - Simulation configuration
285#D-              - Simulation parameters
286#D-              - Execution parameter
287#D-              - Define input files directory
288#D-              - Read or initialize CumulPeriod
289#D-              - run.card
290#D-
291# --------------------------------------------------------------------==
292IGCM_config_Initialize
293
294# --------------------------------------------------------------------==
295#D- Define, create and cd RUN_DIR
296#D- 
297# --------------------------------------------------------------------==
298RUN_DIR=${RUN_DIR_PATH}/${config_UserChoices_TagName}/${config_UserChoices_JobName}.${$}
299IGCM_sys_MkdirWork ${RUN_DIR}
300IGCM_sys_Cd ${RUN_DIR}
301
302# ------------------------------------------------------------------
303# Test if all was right before proceeding further
304# ------------------------------------------------------------------
305IGCM_debug_Verif_Exit
306
307# --------------------------------------------------------------------==
308#D- Initialize each components taking part
309#D- into simulation configuration :
310#D-         - Define component executable
311#D-         - Define Write Frequency by component "1M" "1D" ...
312#D-         - Source ${comp}.driver
313#D-         - Define Storage Places by component
314#D-         - ${comp}_Initialize :
315#D-         - Patterns to sed
316#D-         - Variables from namelist
317#D-
318# --------------------------------------------------------------------==
319IGCM_comp_Initialize
320
321# --------------------------------------------------------------------==
322#D- Verify compatibility of period length, write frequencies, ...
323#D- Verify compatibility of rebuild choices and post-process choices
324#D- Will stop here if something is wrong
325# --------------------------------------------------------------------==
326IGCM_config_Check
327
328# ------------------------------------------------------------------
329#D- Test if all was right before entering the period loop
330# ------------------------------------------------------------------
331IGCM_debug_Verif_Exit
332
333#D--------------------------------------------------------------------==
334#D-                  2. ENTER THE DEEP EXECUTION LOOP
335#D-                  !!!! FASTEN YOUR SEAT BELTS !!!!
336#D-                  !!!!!      PLEASE.          !!!!
337#D-                  !! WE WILL CROSS TURBULENCES. !!
338#D--------------------------------------------------------------------==
339
340Period=1
341
342PeriodContinue=false
343if [ ${Period} -le ${PeriodNb} ]; then
344    PeriodContinue=true
345fi
346while ( ${PeriodContinue} ) ; do
347
348    echo
349    echo "Starting iteration ${Period} / ${PeriodNb}"
350
351    #D-
352    # ------------------------------------------------------------------
353    #D- COMPUTE AND DEFINE DATE STUFF.
354    # ------------------------------------------------------------------
355    IGCM_config_PeriodStart
356    #D- => ${PeriodDateBegin}
357    #D- => ${PeriodDateEnd}
358    #D- => ${CumulPeriod}
359    #D- => ${DatesPeriod}=${PeriodDateBegin}_${PeriodDateEnd}
360    #D- => ${PeriodLength} => JOURS=31 , 28, 29, 30 ; MOIS=0 ; ANS=0
361    #D- => update run.card value
362   
363    #D-
364    # ------------------------------------------------------------------
365    #D- BEGIN COMPUTATION ONLY IF NEEDED
366    # ------------------------------------------------------------------
367    if [ ${SimulationLengthInDays} -gt ${ExperienceLengthInDays} ] ; then
368        IGCM_debug_Print 1 "break because '${SimulationLengthInDays} -gt ${ExperienceLengthInDays}' : ${SimulationLengthInDays} -gt ${ExperienceLengthInDays}"
369        break ;
370    fi
371   
372    #D-
373    # ------------------------------------------------------------------
374    #D- Optionnal function in driver
375    #D- to set special variables used in forward lists (Param, Init or Bc).
376    # ------------------------------------------------------------------
377    IGCM_comp_PeriodStart
378   
379    #D-
380    # ------------------------------------------------------------------
381    #D- Get parameters text files updated by job (.def, namelist ...)
382    #D- READ AND USE BY GCM AT EACH EXECUTION.
383    # ------------------------------------------------------------------
384    IGCM_comp_GetInputParametersFiles
385
386    #D-
387    # ------------------------------------------------------------------
388    #D- Get initial state (Etat0, carteveg,relief...)
389    #D- NECESSARY ONLY IF CumulPeriod= (=> NUMERO) == 1
390    #D- AND ???_Restart=NO
391    #D- READ AND USE BY GCM FOR ONLY ONE EXECUTION.
392    # ------------------------------------------------------------------
393    IGCM_comp_GetInputInitialStateFiles
394
395    #D-
396    # ------------------------------------------------------------------
397    #D- Get Boundaries Conditions (SST, WIND[X,Y,Z], LAI ...)
398    #D- READ AND USE BY GCM AT EACH EXECUTION.
399    # ------------------------------------------------------------------
400    IGCM_comp_GetInputBoundaryFiles
401
402    #D-
403    # ------------------------------------------------------------------
404    #D- Get SmoothFiles Conditions (SST, WIND[X,Y,Z], LAI ...)
405    #D- READ AND USE BY GCM AT EACH EXECUTION but varying in time
406    # ------------------------------------------------------------------
407    IGCM_comp_GetInputSmoothFiles
408
409    #D-
410    # ------------------------------------------------------------------
411    #D- Get restart files (restartphy.nc, orca_restart.nc ...)
412    #D- READ AND USE BY GCM AT EACH EXECUTION.
413    #D-
414    #D- IF A COMPONENT DO NOT RESTART FROM PREVIOULSY COMPUTED RESTART
415    #D- ONLY IF CumulPeriod= (=> NUMERO) == 1
416    #D- MUST EXECUTE CREATE ETAT0_LIMIT (TYPICALLY LMDZ AND ./create_etat0_limit.e)
417    #D-
418    #D- IF CumulPeriod == 1
419    #D- AND A COMPONENT RESTART FROM PREVIOULSY COMPUTED RESTART
420    #D- MUST BRING THIS RESTART IN ${RUN_DIR_PATH}
421    #D-
422    #D- ELSE BRING RESTART FROM ${JobName} IN ${RUN_DIR_PATH}
423    # ------------------------------------------------------------------
424    IGCM_comp_GetInputRestartFiles
425   
426    #D-
427    # ------------------------------------------------------------------
428    #D- Test if all was right before Update
429    # ------------------------------------------------------------------
430    IGCM_debug_Verif_Exit
431
432    # ------------------------------------------------------------------
433    #D- Activate running environnement variables
434    # ------------------------------------------------------------------
435    IGCM_sys_activ_variables
436
437    #D-
438    # ------------------------------------------------------------------
439    #D- UPDATE ParametersFiles (.def, namelist ...) with
440    #D- current value of (ORCA_NIT00, ORCA_LRSTAR, RAZ_DATE, ...)
441    # ------------------------------------------------------------------
442    IGCM_comp_Update
443
444    #D-
445    # ------------------------------------------------------------------
446    #D- Test if all was right before execution
447    # ------------------------------------------------------------------
448    IGCM_debug_Verif_Exit
449
450    #D-
451    #D----------------------------------------------------------------==
452    #D-                          3. Execution
453    #D----------------------------------------------------------------==
454
455    echo
456    echo "#######################################"
457    echo "#      DIR BEFORE RUN EXECUTION       #"
458    echo "#######################################"
459    echo
460    ls -lrt
461
462    echo "========================================================================"
463    if [ ${DRYRUN} -le 1 ] ; then
464        REAL_DATE_INIT=$( date )
465        echo                                                                                   > ${Exe_Output}
466        echo "#######################################"                                        >> ${Exe_Output}
467        echo "EXECUTION of : ${EXECUTION}"
468        echo "EXECUTION of : ${EXECUTION}"                                                    >> ${Exe_Output}
469        echo                                                                                  >> ${Exe_Output}
470        typeset RET
471        RUN_DATE_BEGIN=$( date '+%Y-%m-%dT%H:%M:%S' )
472        ${EXECUTION}  >> ${Exe_Output} 2>&1
473        RET=$?
474        RUN_DATE_END=$( date '+%Y-%m-%dT%H:%M:%S' )
475        if [ ${RET} -gt 0 ] ; then
476            echo "Return code of executable :" ${RET}
477            IGCM_debug_Exit "EXECUTABLE"
478            IGCM_sys_Mkdir ${SUBMIT_DIR}/Debug
479            IGCM_sys_Cp ${Exe_Output} ${SUBMIT_DIR}/Debug/${PREFIX}_${Exe_Output}_error
480            ExecutionFail=true
481        fi
482        echo                                            >> ${Exe_Output}
483        echo "#######################################"  >> ${Exe_Output}
484        echo "libIGCM RunDateBegin=${RUN_DATE_BEGIN}"   >> ${Exe_Output}
485        echo "libIGCM RunDateEnd=${RUN_DATE_END}"       >> ${Exe_Output}
486        echo                                            >> ${Exe_Output}
487    else
488        echo "EXECUTION of : ${EXECUTION} simulated for DRYRUN = " $DRYRUN
489        echo "EXECUTION of : ${EXECUTION} simulated for DRYRUN = " $DRYRUN > ${Exe_Output}
490        if ( $DEBUG_debug ) ; then
491            echo "FOR EXECUTION DRYRUN mode = " $DRYRUN >> stack
492        fi
493    fi
494    echo "========================================================================"
495
496    echo
497    echo "#######################################"
498    echo "#       DIR AFTER RUN EXECUTION       #"
499    echo "#######################################"
500    echo
501    ls -lrt
502
503    #D-
504    # ------------------------------------------------------------------
505    #D- Desactivate running environnement variables
506    # ------------------------------------------------------------------
507    IGCM_sys_desactiv_variables
508
509    #D-
510    #D----------------------------------------------------------------==
511    #D-                    4. Post execution operations
512    #D----------------------------------------------------------------==
513
514    #D-
515    # ------------------------------------------------------------------
516    #D- Save on archive machine netcdf outputs, restarts
517    #D- and text files of models
518    # ------------------------------------------------------------------
519    IGCM_comp_Finalize
520
521    #D-
522    # ------------------------------------------------------------------
523    #D- Test if all was right after Finalize
524    # ------------------------------------------------------------------
525    IGCM_debug_Verif_Exit
526
527    #D-
528    # ------------------------------------------------------------------
529    #D- Configure asynchronous post-treatment (Level 0) when necessary (rebuild)
530    #D- Configure classic post-treatment (Level 1) when necessary (TimeSeries/Seasonal)
531    # ------------------------------------------------------------------
532    IGCM_post_Configure
533
534    #D-
535    # ------------------------------------------------------------------
536    #D- Launch remote rebuild or/and post-treatment process if necessary
537    # ------------------------------------------------------------------
538    IGCM_post_Submit
539
540    #D-
541    # ------------------------------------------------------------------
542    #D- Save job output
543    #D- Manage executable size to save only different binary
544    #D- Write in run.card user, system and elapse time
545    #D- Check that everything went well ! No ? then we stop.
546    #D- Determine next computed period
547    # ------------------------------------------------------------------
548    IGCM_config_PeriodEnd
549
550    echo "Ending iteration ${Period}"
551    (( Period = Period + 1 ))
552
553    # End loop if date end is reached
554    if [ ${SimulationLengthInDays} -ge ${ExperienceLengthInDays} ] ; then
555        break ;
556    fi
557
558    PeriodContinue=false
559    if [ ${Period} -le ${PeriodNb} ]; then
560        PeriodContinue=true
561    fi
562done
563
564#D-
565#D--------------------------------------------------------------------==
566#D-     5. Submit next job or send mail if simulation over.
567#D--------------------------------------------------------------------==
568IGCM_config_Finalize
569
570date
Note: See TracBrowser for help on using the repository browser.