source: trunk/libIGCM/AA_rebuild_fromWorkdir @ 220

Last change on this file since 220 was 220, checked in by sdipsl, 14 years ago

Use ulam's largest class for potentially heavy jobs

File size: 7.6 KB
Line 
1#-Q- platine #!/usr/bin/ksh
2#-Q- platine ###################
3#-Q- platine ## PLATINE   CEA ##
4#-Q- platine ###################
5#-Q- platine #BSUB -J REBUILDWRK             # Nom du job
6#-Q- platine #BSUB -N                        # message a la fin du job
7#-Q- platine #BSUB -n 1                      # reservation des processeurs pour le job
8#-Q- platine #BSUB -W 4:00                   # Limite temps
9#-Q- platine #BSUB -q post                   # Passage en queue post
10#-Q- sx8brodie #!/bin/ksh
11#-Q- sx8brodie #######################
12#-Q- sx8brodie ## SX8BRODIE   IDRIS ##
13#-Q- sx8brodie #######################
14#-Q- sx8brodie # Temps Elapsed max. d'une requete hh:mm:ss
15#-Q- sx8brodie # @ wall_clock_limit = 20:00:00
16#-Q- sx8brodie # Nom du travail LoadLeveler
17#-Q- sx8brodie # @ job_name   = REBUILDWRK
18#-Q- sx8brodie # Fichier de sortie standard du travail       
19#-Q- sx8brodie # @ output     = $(job_name).$(jobid)
20#-Q- sx8brodie # Fichier de sortie d'erreur du travail
21#-Q- sx8brodie # @ error      =  $(job_name).$(jobid)
22#-Q- sx8brodie # pour recevoir un mail en cas de depassement du temps Elapsed (ou autre pb.)
23#-Q- sx8brodie # @ notification = error
24#-Q- sx8brodie # @ environment  = $DEBUG_debug ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $SUBMIT_DIR ; $REBUILD_DIR ; $RebuildFromArchive ; $POST_DIR ; $DateBegin ; $PeriodDateBegin ; $PeriodDateEnd ; $NbRebuildDir ; $StandAlone ; $RESOL_ATM ; $RESOL_OCE ; $RESOL_ICE ; $RESOL_MBG ; $RESOL_SRF ; $RESOL_SBG ; $MASTER ; $config_UserChoices_JobName ; $R_SAVE
25#-Q- sx8brodie # @ queue
26#-Q- aix6 #!/bin/ksh
27#-Q- aix6 #######################
28#-Q- aix6 ##   VARGAS   IDRIS  ##
29#-Q- aix6 #######################
30#-Q- aix6 # @ class = archive
31#-Q- aix6 # Temps Elapsed max. d'une requete hh:mm:ss
32#-Q- aix6 # @ wall_clock_limit = 20:00:00
33#-Q- aix6 # Nom du travail LoadLeveler
34#-Q- aix6 # @ job_name   = REBUILDWRK
35#-Q- aix6 # Fichier de sortie standard du travail
36#-Q- aix6 # @ output     = $(job_name).$(jobid)
37#-Q- aix6 # Fichier de sortie d'erreur du travail
38#-Q- aix6 # @ error      =  $(job_name).$(jobid)
39#-Q- aix6 # pour recevoir un mail en cas de depassement du temps Elapsed (ou autre pb.)
40#-Q- aix6 # @ notification = error
41#-Q- aix6 # @ environment  = $DEBUG_debug ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $SUBMIT_DIR ; $REBUILD_DIR ; $RebuildFromArchive ; $POST_DIR ; $DateBegin ; $PeriodDateBegin ; $PeriodDateEnd ; $NbRebuildDir ; $StandAlone ; $RESOL_ATM ; $RESOL_OCE ; $RESOL_ICE ; $RESOL_MBG ; $RESOL_SRF ; $RESOL_SBG ; $MASTER ; $config_UserChoices_JobName ; $R_SAVE
42#-Q- aix6 # @ queue
43#-Q- sx8mercure #!/bin/ksh
44#-Q- sx8mercure ######################
45#-Q- sx8mercure ## SX8MERCURE   CEA ##
46#-Q- sx8mercure ######################
47#-Q- sx8mercure #PBS -N REBUILDWRK           # Nom du job
48#-Q- sx8mercure #PBS -j o                    # regroupement des stdout et stderr
49#-Q- sx8mercure #PBS -S /usr/bin/ksh         # shell de soumission
50#-Q- sx8mercure #PBS -l memsz_job=1gb        # Limite memoire a 1 Go
51#-Q- sx8mercure #PBS -l cputim_job=24:00:00  # Limite temps a 1 heures
52#-Q- sx8mercure #PBS -q scalaire
53#-Q- sx9mercure #!/bin/ksh
54#-Q- sx9mercure ######################
55#-Q- sx9mercure ## SX9MERCURE   CEA ##
56#-Q- sx9mercure ######################
57#-Q- sx9mercure #MSUB -r REBUILDWRK     # Nom du job               
58#-Q- sx9mercure #MSUB -N 1              # Reservation du noeud
59#-Q- sx9mercure #MSUB -n 1              # Reservation du processus
60#-Q- sx9mercure #MSUB -T 86400          # Limite de temps elapsed du job
61#-Q- sx9mercure #MSUB -E "-j o"
62#-Q- sx9mercure #MSUB -E "-S /bin/ksh"
63#-Q- sx9mercure ##MSUB -e nco.out        # Sortie standard
64#-Q- sx9mercure ##MSUB -o nco.out        # Sortie standard
65#-Q- default #!/bin/ksh
66#-Q- default ##################
67#-Q- default ## DEFAULT HOST ##
68#-Q- default ##################
69
70# $Date: $
71# $Author: $
72# $Revision: $
73# IPSL (2006)
74#  This software is governed by the CeCILL licence see libIGCM/libIGCM_CeCILL.LIC
75
76#set -eu
77#set -vx
78
79date
80
81#-Q- sx8brodie export OMP_NUM_THREADS=1
82#-Q- aix6 export OMP_NUM_THREADS=1
83
84########################################################################
85
86#D- Flag to determine if this job in a standalone mode
87#D- Default : value from AA_job if any
88StandAlone=${StandAlone:=true}
89
90#D- Low level debug : to bypass lib test checks and stack construction
91#D- Default : value from AA_job if any
92libIGCM=${libIGCM:=/path/to/your/libIGCM}
93
94#D- Directory where files we need to rebuild are store
95#D- Default : value from AA_job if any
96REBUILD_DIR=${REBUILD_DIR:=/path/to/your/TMP/REBUILD/FILES}
97
98#D- How many directory to rebuild we have to consider
99#D- Default : value from AA_job if any
100NbRebuildDir=${NbRebuildDir:=12}
101
102#D- Suffix date we will use to determine which directory to rebuild
103#D- We will rebuild NbRebuildDir before and including PeriodDateBegin
104#D- Default : value from AA_job if any
105PeriodDateBegin=${PeriodDateBegin:=18901201}
106
107#D- Name of the job to work in a standalone mode (needed for mask patch)
108#D- Default : value from config.card if any
109config_UserChoices_JobName=${config_UserChoices_JobName:=name_of_the_job}
110
111#D- Directory where output data are stored (needed in standalone mode for mask patch)
112#D- Default : value from AA_job if any
113R_SAVE=${R_SAVE:=/path/to/your/ARCHIVE/FILES}
114
115#D- Flag to determine atlas job's output directory
116#D- Default : value from libIGCM_post.ksh if any
117POST_DIR=${POST_DIR:=${PBS_O_WORKDIR}}
118
119#D- Increased verbosity (1, 2, 3)
120#D- Default : value from AA_job if any
121Verbosity=${Verbosity:=3}
122
123#D- Low level debug : to bypass lib test checks and stack construction
124#D- Default : value from AA_job if any
125DEBUG_debug=${DEBUG_debug:=false}
126
127#D- TEMPORARY Flag to determine atmospheric resolution
128#D- Default : value from atmospheric driver if any
129RESOL_ATM=${RESOL_ATM:=ALL}
130
131#D- TEMPORARY Flag to determine ocean resolution
132#D- Default : value from ocean driver if any
133RESOL_OCE=${RESOL_OCE:=ORCA2}
134
135#D- TEMPORARY Flag to determine ice resolution
136#D- Default : value from ice driver if any
137RESOL_ICE=${RESOL_ICE:=ORCA2}
138
139#D- TEMPORARY Flag to determine biogeochemistry resolution
140#D- Default : value from ice driver if any
141RESOL_MBG=${RESOL_MBG:=ORCA2}
142
143#D- Flag to determine surface resolution
144#D- Default : value from surface driver if any
145RESOL_SRF=ALL
146
147#D- Flag to determine surface resolution
148#D- Default : value from surface driver if any
149RESOL_SBG=ALL
150
151########################################################################
152
153. ${libIGCM}/libIGCM_debug/libIGCM_debug.ksh
154      ( ${DEBUG_debug} ) && IGCM_debug_Check
155. ${libIGCM}/libIGCM_card/libIGCM_card.ksh
156     ( ${DEBUG_debug} ) && IGCM_card_Check
157. ${libIGCM}/libIGCM_date/libIGCM_date.ksh
158     ( ${DEBUG_debug} ) && IGCM_date_Check
159#-------
160. ${libIGCM}/libIGCM_sys/libIGCM_sys.ksh
161. ${libIGCM}/libIGCM_post/libIGCM_post.ksh
162
163########################################################################
164
165#set -vx
166
167#RUN_DIR=${REBUILD_DIR}
168RUN_DIR=${RUN_DIR_PATH}
169IGCM_sys_MkdirWork ${RUN_DIR}
170IGCM_sys_Cd ${RUN_DIR}
171#
172ListAllRebuildDir=$( IGCM_sys_RshMaster ls -d ${REBUILD_DIR}/REBUILD_* | grep -B $(( ${NbRebuildDir} -1 )) ${PeriodDateBegin} )
173#
174for directory in ${ListAllRebuildDir} ; do
175    #
176    IGCM_sys_Get_Master ${directory} ${RUN_DIR}
177    #
178    IGCM_sys_Cd ${RUN_DIR}/$( basename ${directory} )
179
180    # --------------------------------------------------------------------
181    # Source function include in the REBUILD ksh and rebuild
182    # --------------------------------------------------------------------
183    . ${RUN_DIR}/$( basename ${directory} )/rebuild.ksh
184    IGCM_FlushRebuild
185    #
186    IGCM_sys_Cd ${RUN_DIR}
187    # Clean Up
188    IGCM_sys_Rm -rf ${directory}
189done
190
191# Clean RUN_DIR_PATH (necessary for cesium only)
192IGCM_sys_RmRunDir -Rf ${RUN_DIR_PATH}
Note: See TracBrowser for help on using the repository browser.