Changeset 554 for trunk/libIGCM/AA_pack_debug
- Timestamp:
- 02/20/12 17:39:05 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/AA_pack_debug
r547 r554 33 33 #-Q- sx8brodie # pour recevoir un mail en cas de depassement du temps Elapsed (ou autre pb.) 34 34 #-Q- sx8brodie # @ notification = error 35 #-Q- sx8brodie # @ environment = $DEBUG_debug ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $SUBMIT_DIR ; $DateBegin ; $ PeriodDateBegin ; $PeriodDateEnd; $StandAlone ; $MASTER35 #-Q- sx8brodie # @ environment = $DEBUG_debug ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $SUBMIT_DIR ; $DateBegin ; $DateEnd ; $PeriodPack ; $StandAlone ; $MASTER 36 36 #-Q- sx8brodie # @ queue 37 37 #-Q- aix6 #!/bin/ksh … … 49 49 #-Q- aix6 # pour recevoir un mail en cas de depassement du temps Elapsed (ou autre pb.) 50 50 #-Q- aix6 # @ notification = error 51 #-Q- aix6 # @ environment = $DEBUG_debug ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $SUBMIT_DIR ; $DateBegin ; $ PeriodDateBegin ; $PeriodDateEnd; $StandAlone ; $MASTER51 #-Q- aix6 # @ environment = $DEBUG_debug ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $SUBMIT_DIR ; $DateBegin ; $DateEnd ; $PeriodPack ; $StandAlone ; $MASTER 52 52 #-Q- aix6 # @ queue 53 53 #-Q- ulam #!/bin/ksh … … 65 65 #-Q- ulam # pour recevoir un mail en cas de depassement du temps Elapsed (ou autre pb.) 66 66 #-Q- ulam # @ notification = error 67 #-Q- ulam # @ environment = $DEBUG_debug ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $SUBMIT_DIR ; $DateBegin ; $ PeriodDateBegin ; $PeriodDateEnd; $StandAlone ; $MASTER67 #-Q- ulam # @ environment = $DEBUG_debug ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $SUBMIT_DIR ; $DateBegin ; $DateEnd ; $PeriodPack ; $StandAlone ; $MASTER 68 68 #-Q- ulam # @ queue 69 69 #-Q- sx8mercure #!/bin/ksh … … 132 132 StandAlone=${StandAlone:=true} 133 133 134 #D- Flag to determine begin date for restart pack 135 #D- Default : value from AA_job if any 136 DateBegin=20000101 137 138 #D- Flag to determine end date for restart pack 139 #D- Default : value from AA_job if any 140 DateEnd=20691231 141 142 #D- Flag to determine pack period 143 #D- Default : value from AA_job if any 144 period_pack=${period_pack:=10Y} 145 146 SUBMIT_DIR=${PWD} 147 148 RUN_DIR_PATH=/scratch/cont003/p86denv/Pack_Test 134 #D- Path to libIGCM 135 #D- Default : value from AA_job if any 136 # WARNING For StandAlone use : To run this script on some machine (ulam and cesium) 137 # WARNING you must check MirrorlibIGCM variable in sys library. 138 # WARNING If this variable is true, you must use libIGCM_POST path instead 139 # WARNING of your running libIGCM directory. 140 libIGCM=${libIGCM:=::modipsl::/libIGCM} 149 141 150 142 #-D- $hostname of the MASTER job when SUBMIT_DIR is not visible on postprocessing computer. 151 143 MASTER=${MASTER:=mercure|titane|brodie|vargas} 152 144 145 #D- Flag to determine begin date for restart pack 146 #D- Default : value from AA_job if any 147 DateBegin=${DateBegin:=20000101) 148 149 #D- Flag to determine end date for restart pack 150 #D- Default : value from AA_job if any 151 DateEnd=${DateEnd:=20691231} 152 153 #D- Flag to determine pack period 154 #D- Default : value from AA_job if any 155 PeriodPack=${PeriodPack:=10Y} 156 157 #D- Uncomment to run interactively 158 #D- For testing purpose, will be remove 159 #SUBMIT_DIR=${PWD} 160 #RUN_DIR_PATH=${SCRATCHDIR}/Pack_Test 161 162 #D- Increased verbosity (1, 2, 3) 163 #D- Default : value from AA_job if any 164 Verbosity=${Verbosity:=3} 165 153 166 #D- Low level debug : to bypass lib test checks and stack construction 154 167 #D- Default : value from AA_job if any 155 libIGCM=${libIGCM:=/work/cont003/p86denv/PARA_XEON_CM5_IPSLCM5A.16122011_39L/modipsl/libIGCM}156 157 # WARNING for StandAlone use : To run this script on some machine,158 # you must check MirrorlibIGCM variable in sys library.159 # If this variable is true, you must use libIGCM_POST path instead160 # of your running libIGCM directory.161 162 #D- Increased verbosity (1, 2, 3)163 #D- Default : value from AA_job if any164 Verbosity=${Verbosity:=3}165 166 #D- Low level debug : to bypass lib test checks and stack construction167 #D- Default : value from AA_job if any168 168 DEBUG_debug=${DEBUG_debug:=false} 169 170 #D- Keep following comments for now. Will be remove. 169 171 170 172 #on veut archiver les fichiers restart … … 187 189 # $1= PATH/config_card d'une simulation avec 188 190 # TagName/JobName/ExperimentName/SpaceName/DateBegin/DateEnd/PATH_SIMUL 189 # $2= period_pack en M/m ou Y/y191 # $2=PeriodPack en M/m ou Y/y 190 192 191 193 ######################################################################## … … 264 266 #### Preparation de l'environnement 265 267 # repertoire dans lequel seront crees les archives 266 #STORE_DEBUG=${R_SAVE}/DEBUG 267 #IGCM_sys_MkdirArchive ${STORE_DEBUG} 268 269 STORE_DEBUG=/scratch/cont003/p86denv/Pack_Test/DEBUG 270 mkdir -p ${STORE_DEBUG} 271 272 #### 0- lecture de config.card 273 #### on veut les renseignements suivants : 274 #### JobName, PATH_SIMUL, DateBegin et DateEnd 275 268 STORE_DEBUG=${R_SAVE}/DEBUG 269 IGCM_sys_MkdirArchive ${STORE_DEBUG} 270 271 #STORE_DEBUG=/scratch/cont003/p86denv/Pack_Test/DEBUG 272 #mkdir -p ${STORE_DEBUG} 273 274 # Switch to script variables meaning (try to be compatible with ipsl_pack TGCC moving procedure) 276 275 JobName=${config_UserChoices_JobName} 277 #DateBegin=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateBegin} )278 #DateEnd=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateEnd} )279 276 PATH_SIMUL=${R_BUFR} 280 277 echo $JobName $PATH_SIMUL $DateBegin $DateEnd … … 295 292 ###cat ${RUN_DIR}/liste_debug_files.txt | xargs dmget 296 293 297 # Rename debug files we will work with 294 # Rename debug files we will work with using symlinks 298 295 #gawk -F/ '{dest_name=$(NF-2)("_") $(NF); system("cp --preserve " $0 " "dest_name)}' ${RUN_DIR}/liste_debug_files.txt 299 296 gawk -F/ '{dest_name=$(NF-2)("_") $(NF); system("ln -s " $0 " "dest_name)}' ${RUN_DIR}/liste_debug_files.txt … … 303 300 304 301 ### 2- creer les listes de fichiers par periode #### 305 ###Â 2.1- dechiffrer period_pack et le separer en year et month ###306 case ${ period_pack} in302 ###Â 2.1- dechiffrer PeriodPack et le separer en year et month ### 303 case ${PeriodPack} in 307 304 *Y|*y) 308 periodpackinyear=$( echo ${ period_pack} | sed -e 's/[yY]//' )305 periodpackinyear=$( echo ${PeriodPack} | sed -e 's/[yY]//' ) 309 306 periodpackinmonth=0 310 307 ;; … … 312 309 *M|*m) 313 310 periodpackinyear=0 314 periodpackinmonth=$( echo ${ period_pack} | sed -e 's/[mM]//' )311 periodpackinmonth=$( echo ${PeriodPack} | sed -e 's/[mM]//' ) 315 312 ;; 316 313 317 314 *) 318 echo " period_pack doit etre en mois ou annees"315 echo "PeriodPack doit etre en mois ou annees" 319 316 IGCM_debug_Exit "period pack unit" 320 317 ;; … … 366 363 if [ ${date_file} -lt ${date_end_pack} ] && [ ${date_file} -ge ${date_begin_pack} ] ; then 367 364 echo $( basename ${file} ) >> ${RUN_DIR}/liste_pack_${number_pack}.txt 365 # Will not work. Need to find a better ordering. 368 366 # elif [ ${date_file} -ge ${date_end_pack} ] ; then 369 367 # break … … 375 373 date_begin_pack=${year_begin_pack}$( printf "%02i\n" ${month_begin_pack} )01 376 374 377 tar -cvf ${STORE_DEBUG}/debug_pack_${number_pack}.tar --dereference --files-from ${RUN_DIR}/liste_pack_${number_pack}.txt 375 # Here we create tar files directly in $STORE. Avoid to create then to copy. 376 tar -cvf ${STORE_DEBUG}/${JobName}_${year_begin_pack}_${year_end_pack}_debug.tar --dereference --files-from ${RUN_DIR}/liste_pack_${number_pack}.txt 378 377 cat ${RUN_DIR}/liste_pack_${number_pack}.txt | xargs rm 379 378 mv ${RUN_DIR}/liste_pack_${number_pack}.txt ${STORE_DEBUG}
Note: See TracChangeset
for help on using the changeset viewer.