source: trunk/libIGCM/AA_job @ 1390

Last change on this file since 1390 was 1389, checked in by cetlod, 7 years ago

remove comments

  • 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.0 KB
RevLine 
[704]1#-Q- curie #!/bin/ksh
[619]2#-Q- curie ######################
3#-Q- curie ## CURIE   TGCC/CEA ##
4#-Q- curie ######################
[1030]5#-Q- curie #MSUB -r ::Jobname::        # Job Name
6#-Q- curie #MSUB -o Script_Output_::Jobname::.000001    # standard output
7#-Q- curie #MSUB -e Script_Output_::Jobname::.000001    # error output
[619]8#-Q- curie #MSUB -eo
[1149]9#-Q- curie #MSUB -n ::JobNumProcTot::  # Number of MPI tasks (SPMD case) or cores (MPMD case)
[1238]10#-Q- curie #MSUB -c ::openMPthreads::  # Number of openMP threads. To specify only for SMPD
11#-Q- curie #MSUB -x                    # exclusive node. To specify only for MPMD together with the one below
12#-Q- curie #MSUB -E '--cpu_bind=none'
[1389]13#-Q- curie ##MSUB -E '--distribution cyclic'
[1030]14#-Q- curie #MSUB -T 86400              # Wall clock limit (seconds)
15#-Q- curie #MSUB -q standard           # thin nodes
[1315]16#-Q- curie #MSUB -U medium             # priority within a project
[837]17#-Q- curie #MSUB -A ::default_project::
[1108]18#-Q- curie # Below specific options that can be activated
19#-Q- curie ##MSUB -q ivybridge         # Option for Airain
20#-Q- curie
[619]21#-Q- curie BATCH_NUM_PROC_TOT=$BRIDGE_MSUB_NPROC
[681]22#-Q- curie set +x
[770]23#-Q- ada #!/bin/ksh
24#-Q- ada # ######################
[929]25#-Q- ada # ##  ADA       IDRIS ##
[770]26#-Q- ada # ######################
[1108]27#-Q- ada # Job name
[770]28#-Q- ada # @ job_name = ::Jobname::
[1108]29#-Q- ada # Standard output file name
[770]30#-Q- ada # @ output = Script_Output_::Jobname::.000001
[1108]31#-Q- ada # Error output file name
[770]32#-Q- ada # @ error = Script_Output_::Jobname::.000001
[1240]33#-Q- ada # Job type
34#-Q- ada # @ job_type = parallel
[1108]35#-Q- ada # Total number of tasks
[770]36#-Q- ada # @ total_tasks = ::JobNumProcTot::
[1240]37#-Q- ada # Specific option for OpenMP parallelization: Number of OpenMP threads per MPI task
38#-Q- ada # @ parallel_threads = ::openMPthreads::
[1247]39#-Q- ada # Memory : as_limit=3.5gb max per process per core. With 4 threads per process use max as_limit=14gb
40#-Q- ada # @ as_limit = 3.5gb
[1108]41#-Q- ada # Maximum CPU time per task hh:mm:ss
[770]42#-Q- ada # @ wall_clock_limit = 1:00:00
[1240]43#-Q- ada # @ environment = "BATCH_NUM_PROC_TOT=::JobNumProcTot::" ; wall_clock_limit=$(wall_clock_limit)
[1108]44#-Q- ada # End of the header options
[770]45#-Q- ada # @ queue
[281]46#-Q- lxiv8 ######################
47#-Q- lxiv8 ## OBELIX      LSCE ##
48#-Q- lxiv8 ######################
49#-Q- lxiv8 #PBS -N ::Jobname::
50#-Q- lxiv8 #PBS -m a
51#-Q- lxiv8 #PBS -j oe
[1126]52#-Q- lxiv8 #PBS -q mediump
[281]53#-Q- lxiv8 #PBS -o Script_Output_::Jobname::.000001
54#-Q- lxiv8 #PBS -S /bin/ksh
55#-Q- lxiv8 #PBS -v BATCH_NUM_PROC_TOT=::JobNumProcTot::
56#-Q- lxiv8 #PBS -l nodes=1:ppn=::JobNumProcTot::
[1184]57#-Q- ifort_CICLAD ######################
58#-Q- ifort_CICLAD ##   CICLAD    IPSL ##
59#-Q- ifort_CICLAD ######################
60#-Q- ifort_CICLAD #PBS -N ::Jobname::
61#-Q- ifort_CICLAD #PBS -m a
62#-Q- ifort_CICLAD #PBS -j oe
[1314]63#-Q- ifort_CICLAD ###PBS -q h12   # Queue for 12 hours at ciclad only
[1184]64#-Q- ifort_CICLAD #PBS -o Script_Output_::Jobname::.000001
65#-Q- ifort_CICLAD #PBS -S /bin/ksh
66#-Q- ifort_CICLAD #PBS -v BATCH_NUM_PROC_TOT=::JobNumProcTot::
67#-Q- ifort_CICLAD #PBS -l nodes=1:ppn=::JobNumProcTot::
[1291]68#-Q- ifort_CICLAD #PBS -l mem=6gb
[1292]69#-Q- ifort_CICLAD #PBS -l vmem=30gb
[2]70#-Q- default #!/bin/ksh
71#-Q- default ##################
72#-Q- default ## DEFAULT HOST ##
73#-Q- default ##################
[815]74#-Q- default #For MPI use, uncomment next line :
[2]75#-Q- default #BATCH_NUM_PROC_TOT=::JobNumProcTot::
76
[373]77#**************************************************************
78# Author: Sebastien Denvil
79# Contact: Sebastien.Denvil__at__ipsl.jussieu.fr
80# $Revision::                                          $ Revision of last commit
81# $Author::                                            $ Author of last commit
82# $Date::                                              $ Date of last commit
[2]83# IPSL (2006)
84#  This software is governed by the CeCILL licence see libIGCM/libIGCM_CeCILL.LIC
[373]85#
86#**************************************************************
[2]87
88#set -eu
89#set -vx
90
91date
92echo
93echo "#######################################"
94echo "#       ANOTHER GREAT SIMULATION      #"
95echo "#######################################"
96echo
97
98#D--------------------------------------------------------------------==
99#D-
100#D-                      Job to launch IGCM models
101#D-
102#D--------------------------------------------------------------------==
103#D-
104
105MODIPSL=::modipsl::
106libIGCM=${MODIPSL}/libIGCM
107
108#D--------------------------------------------------------------------==
[815]109#D- -1. PLACE FOR USER MODIFICATION
110#D-     - Job Verbosity
111#D-     - PeriodNb
112#D-     - Experience type : DEB(ug), DEV(elopment), RUN
[2]113#D--------------------------------------------------------------------==
114
[1356]115#D- Task type DO NOT CHANGE (computing, post-processing or checking)
[815]116TaskType=computing
[1301]117
[2]118#D- Increased verbosity (1, 2, 3)
119Verbosity=3
[1301]120
[1282]121#D- postProcessingStopLevel (0,1,2,3)
[1301]122#D- 3 stop the main job if any post-processing went wrong (atlas, monitoring, metrics, create_ts, create_se, rebuild or pack_*)
123#D- 2 stop only if create_ts, create_se or pack_* failed  (dont stop if atlas, monitoring or metrics failed)
124#D- 1 stop only if pack_* failed (dont stop if atlas, monitoring, metrics, create_ts or create_se failed)
125#D- 0 never stop the main job for post-processing that went wrong
126postProcessingStopLevel=1
127
[475]128#D- Experience type : DEB(ug), DEV(elopment), RUN (default)
[1282]129#D- DEB : set -vx mode + output files are NOT read only
130#D- DEV : output files are NOT read only
131#D- RUN : output files ARE read only
[475]132JobType=RUN
[1301]133
[2]134#D- Number of execution in one job
[185]135PeriodNb=1
[2]136
137#D-
[815]138#D- --------------------------------------------------------------------------------------------------#
139#D-                          ! OPTIONNAL FEATURES /!\ USE WITH CARE !                                 #
140#D- --------------------------------------------------------------------------------------------------#
[2]141
[475]142
[1096]143#D- Low level debug : to perform lib test checks, stack construction and IO functions instrumentation
[2]144#D- Default=true
[815]145#D-
[1095]146DEBUG_debug=true
[2]147
[988]148#D- Messaging : all activities and call stacks will be sent to ipsl servers
149#D- If true will imply DEBUG_debug=true
150#D- Default=false
151#D-
[1095]152BigBrother=true
[988]153
[2]154#D- Set DEBUG_sys to false to disable output calls of function
[988]155#D- true when JobType=DEB # means DEB(ug)
[815]156#D-
[2]157#DEBUG_sys=false
158
159#D- Define running directory
160#D- Default=${TMPDIR} ie temporary batch directory
[815]161#D-
[154]162#RUN_DIR_PATH=/workdir/or/scratchdir/of/this/machine
[2]163
164#D- Define submit directory
[92]165#D- Default= where you launch qsub (variable from scheduler)
[815]166#D-
[92]167#SUBMIT_DIR=$( pwd )
[2]168
[475]169#D- Define input file root directory
170#D- Default=/IGCMG/common/account/of/this/machine
[1373]171#D- IPSL:   /prodigfs/ipslfs/igcmg/IGCM
172#D- TGCC:   /ccc/work/cont003/igcmg/igcmg/IGCM
173#D- IDRIS:  /workgpfs/rech/psl/rpsl035/IGCM
174#D- OBELIX: /home/orchideeshare/igcmg/IGCM
175#D- OTHER:  /home/${LOGIN}/IGCM
176
177#D- Change below to override the default
[475]178#R_IN=/u/rech/por/rpor111/DATA
179
[2]180#D- Turn in dry run mode ? (0,1,2,3)
181#D- Default=0
[815]182#D-
[2]183#DRYRUN=3
[815]184#D-# YOU HAVE TO COMPILE YOUR EXE FILES to USE DRYRUN MODE !
185#D-# -------------------------------------------------------------------------------------
186#D-# | DRYRUN=  |  Date computations, | sys_Get    |  Exe    | sys_Put_Out; sys_Put_Rest |
187#D-# |          |  Cp/Exe/param/files |            |         |                           |
188#D-# |          |  Chmod Qsub         |            |         |                           |
189#D-# -------------------------------------------------------------------------------------
190#D-# |    0     |       yes           |    yes     |  yes    |      yes                  |
191#D-# -------------------------------------------------------------------------------------
192#D-# |    1     |       yes           |    yes     |  yes    |      no                   |
193#D-# -------------------------------------------------------------------------------------
194#D-# |    2     |       yes           |    yes     |  no     |      no                   |
195#D-# -------------------------------------------------------------------------------------
196#D-# |    3     |       yes           |    no      |  no     |      no                   |
197#D-# -------------------------------------------------------------------------------------
[2]198
[475]199#D-
200# --------------------------------------------------------------------------------------------------#
[815]201#D- ! END OF OPTIONNAL FEATURES /!\ DO NOT MODIFY ANYTHING BELOW UNLESS YOU KNOW WHAT YOU ARE DOING #
[475]202# --------------------------------------------------------------------------------------------------#
[2]203
204#D-
205#D--------------------------------------------------------------------==
[1051]206#D- 0.0 SYSTEM ENVIRONMENT
207#D-     - Define variables for Number of processors
208#D-     - Define MPI variables
209#D-     - Define batch scheduler variables
210#D-     - Source IGCM Library
211#D-     - Get RESOLution in .resol file (temporary)
[2]212#D--------------------------------------------------------------------==
213
[815]214#---------------------------------------------------------------------==
[2]215
216. ${libIGCM}/libIGCM_debug/libIGCM_debug.ksh
217. ${libIGCM}/libIGCM_card/libIGCM_card.ksh
218. ${libIGCM}/libIGCM_date/libIGCM_date.ksh
219#-------
220. ${libIGCM}/libIGCM_sys/libIGCM_sys.ksh
221. ${libIGCM}/libIGCM_config/libIGCM_config.ksh
222. ${libIGCM}/libIGCM_comp/libIGCM_comp.ksh
223. ${libIGCM}/libIGCM_post/libIGCM_post.ksh
[832]224#-------
225( ${DEBUG_debug} ) && IGCM_debug_Check
226( ${DEBUG_debug} ) && IGCM_card_Check
227( ${DEBUG_debug} ) && IGCM_date_Check
[2]228
[815]229#--------------------------------------------------------------------==
[2]230
231#-- Resolution FLAG for oasis input
[511]232#RESOL="ORCA2xLMD9671"
[138]233[ -f ${SUBMIT_DIR}/../.resol ] && RESOL=$(head -1 ${SUBMIT_DIR}/../.resol)
[511]234#-- Chemistrie FLAG to ease chemistries configurations management
235#CHEM="AER"
[815]236[ -f ${SUBMIT_DIR}/../.chimie ] && eval $(grep CHEM ${SUBMIT_DIR}/../.chimie)
[2]237
238#D-
239#D--------------------------------------------------------------------==
[1051]240#D- 0.1 COMMON ENVIRONMENT
241#D-     - Read libIGCM compatibility version in config.card
242#D-     - Read UserChoices section
243#D-     - Read Ensemble section
244#D-     - Read Post section
245#D-     - Define all netcdf output directories
246#D--------------------------------------------------------------------==
247IGCM_config_CommonConfiguration ${SUBMIT_DIR}/config.card
248
[1053]249if [ ! -r ${SUBMIT_DIR}/run.card ] ; then
250  #================================================#
251  #         The file run.card doesn't exist        #
252  #================================================#
253  FirstInitialize=true
254  #copy initial run.card
255  IGCM_sys_Cp ${SUBMIT_DIR}/run.card.init ${SUBMIT_DIR}/run.card
256  IGCM_debug_Print 2 "run.card copied from run.card.init"
257else
258  FirstInitialize=false
259  IGCM_debug_Print 2 "run.card exists"
260fi
261
[1051]262# ------------------------------------------------------------------
263# Activate BigBrother so as to supervise this simulation
264# ------------------------------------------------------------------
[1189]265IGCM_debug_BigBro_Initialize
[1051]266
267#D-
268#D--------------------------------------------------------------------==
[815]269#D- 1. INITIALIZE CONFIGURATION
270#D-    - Simulation configuration
271#D-    - Simulation parameters
272#D-    - Execution parameter
273#D-    - Define input files directory
274#D-    - Read or initialize CumulPeriod
275#D-    - run.card
[1051]276#D--------------------------------------------------------------------==
[2]277IGCM_config_Initialize
278
279# --------------------------------------------------------------------==
[815]280# Define, create and cd RUN_DIR
[2]281# --------------------------------------------------------------------==
[804]282RUN_DIR=${RUN_DIR_PATH}/${config_UserChoices_JobName}.${$}
[2]283IGCM_sys_MkdirWork ${RUN_DIR}
284IGCM_sys_Cd ${RUN_DIR}
285
[436]286# ------------------------------------------------------------------
287# Test if all was right before proceeding further
288# ------------------------------------------------------------------
[432]289IGCM_debug_Verif_Exit
290
[2]291#D-
[815]292#D---------------------------------------------------------------------==
293#D- 2. INITIALIZE ALL COMPONENT OF THE CONFIGURATION
294#D-    - Define component executable
295#D-    - Define Write Frequency by component "1M" "1D" ...
296#D-    - Source ${comp}.driver
297#D-    - Define Storage Places by component
298#D-    - ${comp}_Initialize :
299#D-    - Patterns to sed
300#D-    - Variables from namelist
301#D---------------------------------------------------------------------==
[2]302IGCM_comp_Initialize
303
[815]304#D-
305#D---------------------------------------------------------------------==
306#D- 3. PERFORM GENERAL VERIFICATION
307#D-    - Verify compatibility of period length, write frequencies, ...
308#D-    - Verify compatibility of rebuild choices and post-process choices
309#D-    - Will stop here if something is wrong
310#D---------------------------------------------------------------------==
[380]311IGCM_config_Check
[2]312
[380]313# ------------------------------------------------------------------
[815]314# Test if all was right before entering the period loop
[380]315# ------------------------------------------------------------------
316IGCM_debug_Verif_Exit
317
[815]318#D-
319#D---------------------------------------------------------------------==
320#D- 4. ENTER THE DEEP EXECUTION LOOP
321#D-    ! FASTEN YOUR SEAT BELTS PLEASE. !
322#D-    !   WE WILL CROSS TURBULENCES.   !
323#D---------------------------------------------------------------------==
[2]324
325Period=1
326
[120]327PeriodContinue=false
328if [ ${Period} -le ${PeriodNb} ]; then
[815]329  PeriodContinue=true
[120]330fi
331while ( ${PeriodContinue} ) ; do
332
[785]333  echo
334  echo "Starting iteration ${Period} / ${PeriodNb}"
[2]335
[785]336  #D-
337  # ------------------------------------------------------------------
[815]338  #D-   4.1 COMPUTE AND DEFINE DATE INFORMATION.
339  #D-       - ${PeriodDateBegin}
340  #D-       - ${PeriodDateEnd}
341  #D-       - ${CumulPeriod}
342  #D-       - ${DatesPeriod}=${PeriodDateBegin}_${PeriodDateEnd}
343  #D-       - ${PeriodLength} => JOURS=31 , 28, 29, 30 ; MOIS=0 ; ANS=0
344  #D-       - update run.card value
[785]345  # ------------------------------------------------------------------
346  IGCM_config_PeriodStart
[2]347
[785]348  #D-
349  # ------------------------------------------------------------------
[815]350  #D-   4.2 BEGIN COMPUTATION ONLY IF NEEDED
[785]351  # ------------------------------------------------------------------
352  if [ ${SimulationLengthInDays} -gt ${ExperienceLengthInDays} ] ; then
[1351]353    IGCM_debug_Print 1 "break because '\${SimulationLengthInDays} -gt \${ExperienceLengthInDays}' : ${SimulationLengthInDays} -gt ${ExperienceLengthInDays}"
[785]354    break ;
355  fi
[2]356
[785]357  #D-
358  # ------------------------------------------------------------------
[815]359  #D-   4.3 CALL OPTIONNAL FUNCTION WITHIN DRIVER
360  #D-       - to set special variables used in lists (Param, Init or Bc).
[785]361  # ------------------------------------------------------------------
362  IGCM_comp_PeriodStart
[2]363
[785]364  #D-
365  # ------------------------------------------------------------------
[815]366  #D-   4.4 GET PARAMETERS TEXT FILES UPDATED BY JOB
367  #D-       - (.def, namelist ...)
368  #D-       - READ AND USE BY GCM AT EACH EXECUTION.
[785]369  # ------------------------------------------------------------------
370  IGCM_comp_GetInputParametersFiles
[262]371
[785]372  #D-
373  # ------------------------------------------------------------------
[815]374  #D-   4.5 GET INITIAL STATE
375  #D-       - (Etat0, carteveg,relief...)
376  #D-       - NECESSARY ONLY IF CumulPeriod= (=> NUMERO) == 1
377  #D-       - AND ???_Restart=NO
378  #D-       - READ AND USE BY GCM FOR ONLY ONE EXECUTION.
[785]379  # ------------------------------------------------------------------
380  IGCM_comp_GetInputInitialStateFiles
[2]381
[785]382  #D-
383  # ------------------------------------------------------------------
[815]384  #D-   4.6 GET BOUNDARIES CONDITIONS
385  #D-       - (SST, WIND[X,Y,Z], LAI ...)
386  #D-       - READ AND USE BY GCM AT EACH EXECUTION.
[785]387  # ------------------------------------------------------------------
388  IGCM_comp_GetInputBoundaryFiles
[2]389
[785]390  #D-
391  # ------------------------------------------------------------------
[815]392  #D-   4.7 GET SmoothFiles CONDITIONS
393  #D-       - (SST, WIND[X,Y,Z], LAI ...)
394  #D-       - READ AND USE BY GCM AT EACH EXECUTION
395  #D-       - Do not change at each ${Period}
[785]396  # ------------------------------------------------------------------
[815]397  IGCM_comp_GetInputSmoothFiles
[2]398
[785]399  #D-
400  # ------------------------------------------------------------------
[815]401  #D-   4.8 GET RESTART FILES
402  #D-       - (restartphy.nc, orca_restart.nc ...)
403  #D-       - READ AND USE BY GCM AT EACH EXECUTION.
[785]404  #D-
[815]405  #D-       - IF A COMPONENT DO NOT RESTART FROM PREVIOULSY COMPUTED RESTART
406  #D-       - ONLY IF CumulPeriod= (=> NUMERO) == 1
407  #D-       - MUST EXECUTE CREATE ETAT0_LIMIT (TYPICALLY LMDZ AND ./create_etat0_limit.e)
[785]408  #D-
[815]409  #D-       - IF CumulPeriod == 1
410  #D-       - AND A COMPONENT RESTART FROM PREVIOULSY COMPUTED RESTART
411  #D-       - MUST BRING THIS RESTART IN ${RUN_DIR_PATH}
[785]412  #D-
[815]413  #D-       - ELSE BRING RESTART FROM ${JobName} IN ${RUN_DIR_PATH}
[785]414  # ------------------------------------------------------------------
415  IGCM_comp_GetInputRestartFiles
[2]416
[785]417  # ------------------------------------------------------------------
[815]418  # Test if all was right before Update
[785]419  # ------------------------------------------------------------------
420  IGCM_debug_Verif_Exit
[2]421
[815]422  #D-
[785]423  # ------------------------------------------------------------------
[815]424  #D-   4.9 ACTIVATE RUNNING ENVIRONNEMENT VARIABLES
[785]425  # ------------------------------------------------------------------
426  IGCM_sys_activ_variables
[2]427
[785]428  #D-
429  # ------------------------------------------------------------------
[815]430  #D-   4.10 UPDATE ParametersFiles
431  #D-        - (.def, namelist ...)
432  #D-        - with current value of (ORCA_NIT00, ORCA_LRSTAR, RAZ_DATE, ...)
[785]433  # ------------------------------------------------------------------
434  IGCM_comp_Update
435
436  # ------------------------------------------------------------------
[815]437  # Test if all was right before execution
[785]438  # ------------------------------------------------------------------
439  IGCM_debug_Verif_Exit
440
441  #D-
[815]442  #D---------------------------------------------------------------------==
443  #D- 5. EXECUTION
444  #D---------------------------------------------------------------------==
[785]445
446  echo
447  echo "#######################################"
448  echo "#      DIR BEFORE RUN EXECUTION       #"
449  echo "#######################################"
450  echo
451  ls -lrt
452
453  echo "========================================================================"
454  if [ ${DRYRUN} -le 1 ] ; then
455    REAL_DATE_INIT=$( date )
456    echo                                                                                   > ${Exe_Output}
457    echo "#######################################"                                        >> ${Exe_Output}
458    echo "EXECUTION of : ${EXECUTION}"
459    echo "EXECUTION of : ${EXECUTION}"                                                    >> ${Exe_Output}
460    echo                                                                                  >> ${Exe_Output}
461    typeset RET
462    RUN_DATE_BEGIN=$( date '+%Y-%m-%dT%H:%M:%S' )
463    ${EXECUTION}  >> ${Exe_Output} 2>&1
464    RET=$?
465    RUN_DATE_END=$( date '+%Y-%m-%dT%H:%M:%S' )
466    if [ ${RET} -gt 0 ] ; then
467      echo "Return code of executable :" ${RET}
468      IGCM_debug_Exit "EXECUTABLE"
469      IGCM_sys_Mkdir ${SUBMIT_DIR}/Debug
470      IGCM_sys_Cp ${Exe_Output} ${SUBMIT_DIR}/Debug/${PREFIX}_${Exe_Output}_error
471      ExecutionFail=true
[2]472    fi
[785]473    echo                                            >> ${Exe_Output}
474    echo "#######################################"  >> ${Exe_Output}
475    echo "libIGCM RunDateBegin=${RUN_DATE_BEGIN}"   >> ${Exe_Output}
476    echo "libIGCM RunDateEnd=${RUN_DATE_END}"       >> ${Exe_Output}
477    echo                                            >> ${Exe_Output}
478  else
479    echo "EXECUTION of : ${EXECUTION} simulated for DRYRUN = " $DRYRUN
480    echo "EXECUTION of : ${EXECUTION} simulated for DRYRUN = " $DRYRUN > ${Exe_Output}
481    if ( $DEBUG_debug ) ; then
482      echo "FOR EXECUTION DRYRUN mode = " $DRYRUN >> stack
483    fi
484  fi
485  echo "========================================================================"
[2]486
[785]487  echo
488  echo "#######################################"
489  echo "#       DIR AFTER RUN EXECUTION       #"
490  echo "#######################################"
491  echo
492  ls -lrt
[2]493
[785]494  #D-
[815]495  #D---------------------------------------------------------------------==
496  #D- 6. POST EXECUTION OPERATIONS
497  #D---------------------------------------------------------------------==
498
499  #D-
[785]500  # ------------------------------------------------------------------
[815]501  #D-   6.1. DESACTIVATE RUNNING ENVIRONNEMENT VARIABLES
[785]502  # ------------------------------------------------------------------
503  IGCM_sys_desactiv_variables
[2]504
[785]505  #D-
506  # ------------------------------------------------------------------
[815]507  #D-   6.2. SAVE OUTPUTS
508  #D-        - On archive/storage machine
509  #D-        - netcdf outputs, restarts and text files of models
[785]510  # ------------------------------------------------------------------
511  IGCM_comp_Finalize
[2]512
[785]513  # ------------------------------------------------------------------
[815]514  # Test if all was right after Finalize
[785]515  # ------------------------------------------------------------------
516  IGCM_debug_Verif_Exit
[2]517
[785]518  #D-
519  # ------------------------------------------------------------------
[815]520  #D-   6.3. CONFIGURE POST-PROCESSING
521  #D-        - asynchronous post-treatment (Level 0) when necessary (rebuild/pack)
522  #D-        - classic post-treatment      (Level 1) when necessary (TimeSeries/Seasonal)
[785]523  # ------------------------------------------------------------------
524  IGCM_post_Configure
[2]525
[785]526  #D-
527  # ------------------------------------------------------------------
[815]528  #D-   6.4. SUBMIT POST-PROCESSING
529  #D-        - remote rebuild or/and post-treatment process if necessary
[785]530  # ------------------------------------------------------------------
531  IGCM_post_Submit
[380]532
[785]533  #D-
534  # ------------------------------------------------------------------
[815]535  #D-   6.5. FINALYZE CURRENT LOOP AND PREPARE NEXT ONE
536  #D-        - Manage executable size to save only different binary
537  #D-        - Write in run.card user, system and elapse time
538  #D-        - Check that everything went well ! No ? then we stop.
539  #D-        - Determine next computed period
[785]540  # ------------------------------------------------------------------
541  IGCM_config_PeriodEnd
[2]542
[785]543  echo "Ending iteration ${Period}"
544  (( Period = Period + 1 ))
[2]545
[785]546  # End loop if date end is reached
547  if [ ${SimulationLengthInDays} -ge ${ExperienceLengthInDays} ] ; then
548    break ;
549  fi
[2]550
[785]551  PeriodContinue=false
552  if [ ${Period} -le ${PeriodNb} ]; then
553    PeriodContinue=true
554  fi
555done
[2]556
557#D-
[815]558#D---------------------------------------------------------------------==
559#D- 7. SUBMIT NEXT JOB OR SEND MAIL IF SIMULATION IS OVER.
560#D---------------------------------------------------------------------==
[2]561IGCM_config_Finalize
562
563date
Note: See TracBrowser for help on using the repository browser.