source: trunk/libIGCM/AA_rebuild @ 29

Last change on this file since 29 was 26, checked in by sdipsl, 16 years ago

Adapt ressource and jobname

File size: 5.3 KB
Line 
1#-Q- platine #!/usr/bin/ksh
2#-Q- platine ###################
3#-Q- platine ## PLATINE   CEA ##
4#-Q- platine ###################
5#-Q- platine #BSUB -J REBUILD                # 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 #######################
11#-Q- sx8brodie ## SX8BRODIE   IDRIS ##
12#-Q- sx8brodie #######################
13#-Q- sx8brodie #QSUB -r REBUILD              # Nom du job
14#-Q- sx8brodie #QSUB -lT 4:00:00             # limite en temps total
15#-Q- sx8brodie #QSUB -lt 4:00:00             # limite en temps par process
16#-Q- sx8brodie #QSUB -lM 1Gb
17#-Q- sx8brodie #QSUB -eo                     # rassemble standard error et output
18#-Q- sx8brodie #QSUB -J m
19#-Q- sx8brodie #QSUB -l mpp_p=4
20#-Q- sx8brodie #QSUB -s /bin/ksh             # shell du job
21#-Q- sx8mercure #!/bin/ksh
22#-Q- sx8mercure ######################
23#-Q- sx8mercure ## SX8MERCURE   CEA ##
24#-Q- sx8mercure ######################
25#-Q- sx8mercure #PBS -N REBUILD              # Nom du job
26#-Q- sx8mercure #PBS -j o                    # regroupement des stdout et stderr
27#-Q- sx8mercure #PBS -S /usr/bin/ksh         # shell de soumission
28#-Q- sx8mercure #PBS -l memsz_job=1gb        # Limite memoire a 1 Go
29#-Q- sx8mercure #PBS -l cputim_job=4:00:00   # Limite temps a 1 heures
30#-Q- sx8mercure #PBS -q scalaire
31#-Q- default #!/bin/ksh
32#-Q- default ##################
33#-Q- default ## DEFAULT HOST ##
34#-Q- default ##################
35
36#set -vx
37
38date
39
40#-Q- sx8brodie export OMP_NUM_THREADS=1
41
42# $Date: $
43# $Author: $
44# $Revision: $
45# IPSL (2006)
46#  This software is governed by the CeCILL licence see libIGCM/libIGCM_CeCILL.LIC
47
48########################################################################
49
50#D- Flag to determine if this job in a standalone mode
51#D- Default : value from AA_job if any
52StandAlone=${StandAlone:=true}
53
54#D- Flag to determine atlas job's output directory
55#D- Default : value from libIGCM_post.ksh if any
56POST_DIR=${POST_DIR:=${PBS_O_WORKDIR}}
57
58#D- Increased verbosity (1, 2, 3)
59#D- Default : value from AA_job if any
60Verbosity=${Verbosity:=3}
61
62#D- Low level debug : to bypass lib test checks and stack construction
63#D- Default : value from AA_job if any
64DEBUG_debug=${DEBUG_debug:=false}
65
66#D- Low level debug : to bypass lib test checks and stack construction
67#D- Default : value from AA_job if any
68libIGCM=${libIGCM:=/home/rech/ces/rces452/libIGCM}
69
70#D- TEMPORARY Flag to determine atmospheric resolution
71#D- Default : value from atmospheric driver if any
72RESOL_ATM=${RESOL_ATM:=LMD144142}
73
74#D- TEMPORARY Flag to determine ocean resolution
75#D- Default : value from ocean driver if any
76RESOL_OCE=${RESOL_OCE:=ORCA2}
77
78#D- TEMPORARY Flag to determine ice resolution
79#D- Default : value from ice driver if any
80RESOL_ICE=${RESOL_ICE:=ORCA2}
81
82#D- Flag to determine surface resolution
83#D- Default : value from surface driver if any
84RESOL_SRF=${RESOL_SRF:=LMD144142}
85
86########################################################################
87
88. ${libIGCM}/libIGCM_debug/libIGCM_debug.ksh
89        ( ${DEBUG_debug} ) && IGCM_debug_Check
90. ${libIGCM}/libIGCM_card/libIGCM_card.ksh
91       ( ${DEBUG_debug} ) && IGCM_card_Check
92. ${libIGCM}/libIGCM_date/libIGCM_date.ksh
93       ( ${DEBUG_debug} ) && IGCM_date_Check
94#-------
95. ${libIGCM}/libIGCM_sys/libIGCM_sys.ksh
96. ${libIGCM}/libIGCM_post/libIGCM_post.ksh
97
98########################################################################
99
100#set -vx
101
102if [ ${StandAlone} = true ] ; then
103    CARD_DIR=${SUBMIT_DIR}
104else
105    CARD_DIR=${RUN_DIR_PATH}/$( basename ${SUBMIT_DIR} )
106    IGCM_sys_Get_Master ${SUBMIT_DIR} ${RUN_DIR_PATH}
107fi
108
109#
110# Perhaps not usefull ?
111#
112IGCM_card_DefineArrayFromSection ${CARD_DIR}/config.card UserChoices
113typeset option
114for option in ${config_UserChoices[*]} ; do
115    IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card UserChoices ${option}
116done
117#
118echo
119IGCM_debug_Print 1 "DefineArrayFromOption  : config_UserChoices"
120IGCM_debug_PrintVariables 3 config_UserChoices_JobName
121IGCM_debug_PrintVariables 3 config_UserChoices_LongName
122IGCM_debug_PrintVariables 3 config_UserChoices_TagName
123IGCM_debug_PrintVariables 3 config_UserChoices_CalendarType
124IGCM_debug_PrintVariables 3 config_UserChoices_DateBegin
125IGCM_debug_PrintVariables 3 config_UserChoices_DateEnd
126IGCM_debug_PrintVariables 3 config_UserChoices_PeriodLength
127echo
128
129IGCM_sys_Cd ${RUN_DIR}
130ListAllRebuildDir=$( ls -d ${RUN_DIR}/REBUILD_* | grep -B $(( ${NbRebuildDir} -1 )) ${PeriodDateBegin} )
131
132for directory in ${ListAllRebuildDir} ; do
133    #
134    IGCM_sys_Cd ${directory}
135    # --------------------------------------------------------------------
136    # Function define in rebuild.ksh has not been closed yet. Do it now
137    # --------------------------------------------------------------------
138    echo IGCM_debug_PopStack "IGCM_post_Submit" >> ${directory}/rebuild.ksh
139    echo }                                      >> ${directory}/rebuild.ksh
140
141    # --------------------------------------------------------------------
142    # Source function include in the REBUILD ksh and rebuild
143    # --------------------------------------------------------------------
144    . ${directory}/rebuild.ksh
145    IGCM_FlushRebuild
146    #
147    IGCM_sys_Cd ${RUN_DIR}
148    IGCM_sys_Rm -rf ${directory}
149done
Note: See TracBrowser for help on using the repository browser.