source: trunk/libIGCM/AA_job @ 1411

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