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=24: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 | |
---|
38 | date |
---|
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 |
---|
52 | StandAlone=${StandAlone:=true} |
---|
53 | |
---|
54 | #D- Flag to determine atlas job's output directory |
---|
55 | #D- Default : value from libIGCM_post.ksh if any |
---|
56 | POST_DIR=${POST_DIR:=${PBS_O_WORKDIR}} |
---|
57 | |
---|
58 | #D- Increased verbosity (1, 2, 3) |
---|
59 | #D- Default : value from AA_job if any |
---|
60 | Verbosity=${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 |
---|
64 | DEBUG_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 |
---|
68 | libIGCM=${libIGCM:=/home/rech/ces/rces452/libIGCM} |
---|
69 | |
---|
70 | ######################################################################## |
---|
71 | |
---|
72 | . ${libIGCM}/libIGCM_debug/libIGCM_debug.ksh |
---|
73 | ( ${DEBUG_debug} ) && IGCM_debug_Check |
---|
74 | . ${libIGCM}/libIGCM_card/libIGCM_card.ksh |
---|
75 | ( ${DEBUG_debug} ) && IGCM_card_Check |
---|
76 | . ${libIGCM}/libIGCM_date/libIGCM_date.ksh |
---|
77 | ( ${DEBUG_debug} ) && IGCM_date_Check |
---|
78 | #------- |
---|
79 | . ${libIGCM}/libIGCM_sys/libIGCM_sys.ksh |
---|
80 | . ${libIGCM}/libIGCM_post/libIGCM_post.ksh |
---|
81 | |
---|
82 | ######################################################################## |
---|
83 | |
---|
84 | #set -vx |
---|
85 | |
---|
86 | if [ ${StandAlone} = true ] ; then |
---|
87 | CARD_DIR=${SUBMIT_DIR} |
---|
88 | else |
---|
89 | CARD_DIR=${RUN_DIR_PATH}/$( basename ${SUBMIT_DIR} ) |
---|
90 | IGCM_sys_Get_Master ${SUBMIT_DIR} ${RUN_DIR_PATH} |
---|
91 | fi |
---|
92 | |
---|
93 | # |
---|
94 | # Perhaps not usefull ? |
---|
95 | # |
---|
96 | IGCM_card_DefineArrayFromSection ${CARD_DIR}/config.card UserChoices |
---|
97 | typeset option |
---|
98 | for option in ${config_UserChoices[*]} ; do |
---|
99 | IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card UserChoices ${option} |
---|
100 | done |
---|
101 | # |
---|
102 | echo |
---|
103 | IGCM_debug_Print 1 "DefineArrayFromOption : config_UserChoices" |
---|
104 | IGCM_debug_PrintVariables 3 config_UserChoices_JobName |
---|
105 | IGCM_debug_PrintVariables 3 config_UserChoices_LongName |
---|
106 | IGCM_debug_PrintVariables 3 config_UserChoices_TagName |
---|
107 | IGCM_debug_PrintVariables 3 config_UserChoices_CalendarType |
---|
108 | IGCM_debug_PrintVariables 3 config_UserChoices_DateBegin |
---|
109 | IGCM_debug_PrintVariables 3 config_UserChoices_DateEnd |
---|
110 | IGCM_debug_PrintVariables 3 config_UserChoices_PeriodLength |
---|
111 | echo |
---|
112 | |
---|
113 | if [ ${RebuildFromArchive} = true ] ; then |
---|
114 | RUN_DIR=${RUN_DIR_PATH} |
---|
115 | else |
---|
116 | RUN_DIR=${REBUILD_DIR} |
---|
117 | fi |
---|
118 | IGCM_sys_Cd ${RUN_DIR} |
---|
119 | ListAllRebuildDir=$( ls -d ${REBUILD_DIR}/REBUILD_* | grep -B $(( ${NbRebuildDir} -1 )) ${PeriodDateBegin} ) |
---|
120 | |
---|
121 | for directory in ${ListAllRebuildDir} ; do |
---|
122 | # |
---|
123 | if [ ${RebuildFromArchive} = true ] ; then |
---|
124 | IGCM_sys_Get_Dir ${directory} ${RUN_DIR} |
---|
125 | fi |
---|
126 | IGCM_sys_Cd ${RUN_DIR}/$( basename ${directory} ) |
---|
127 | # -------------------------------------------------------------------- |
---|
128 | # Function define in rebuild.ksh has not been closed yet. Do it now |
---|
129 | # -------------------------------------------------------------------- |
---|
130 | echo IGCM_debug_PopStack "IGCM_post_Submit" >> rebuild.ksh |
---|
131 | echo } >> rebuild.ksh |
---|
132 | |
---|
133 | # -------------------------------------------------------------------- |
---|
134 | # Source function include in the REBUILD ksh and rebuild |
---|
135 | # -------------------------------------------------------------------- |
---|
136 | . ${RUN_DIR}/$( basename ${directory} )/rebuild.ksh |
---|
137 | IGCM_FlushRebuild |
---|
138 | # |
---|
139 | IGCM_sys_Cd ${RUN_DIR} |
---|
140 | IGCM_sys_Rm -rf ${directory} |
---|
141 | done |
---|