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