Ignore:
Timestamp:
02/20/12 17:39:05 (12 years ago)
Author:
sdipsl
Message:
  • Mechanism in place to submit pack jobs.
  • Add a PackFrequency? ; default to RebuildFrequency? if not present in config.card
  • Add coherence checks between PackFrequency? and relevant dependant frequencies
  • pack_restart and pack_debug ready in batch mode. Testing in progress. Submission is still a comment in libIGCM_post
  • Move and generalize create_ts_next_date from AA_create_ts to libIGCM_date. Rename to IGCM_date_DaysInNextPeriod
  • Move and generalyze create_ts_begin_date from AA_create_ts to libIGCM_date. Rename to IGCM_date_DaysInPreviousPeriod
  • Cosmetics
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/AA_pack_debug

    r547 r554  
    3333#-Q- sx8brodie # pour recevoir un mail en cas de depassement du temps Elapsed (ou autre pb.) 
    3434#-Q- sx8brodie # @ notification = error 
    35 #-Q- sx8brodie # @ environment  = $DEBUG_debug ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $SUBMIT_DIR ; $DateBegin ; $PeriodDateBegin ; $PeriodDateEnd ; $StandAlone ; $MASTER 
     35#-Q- sx8brodie # @ environment  = $DEBUG_debug ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $SUBMIT_DIR ; $DateBegin ; $DateEnd ; $PeriodPack ; $StandAlone ; $MASTER 
    3636#-Q- sx8brodie # @ queue 
    3737#-Q- aix6 #!/bin/ksh 
     
    4949#-Q- aix6 # pour recevoir un mail en cas de depassement du temps Elapsed (ou autre pb.) 
    5050#-Q- aix6 # @ notification = error 
    51 #-Q- aix6 # @ environment  = $DEBUG_debug ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $SUBMIT_DIR ; $DateBegin ; $PeriodDateBegin ; $PeriodDateEnd ; $StandAlone ; $MASTER 
     51#-Q- aix6 # @ environment  = $DEBUG_debug ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $SUBMIT_DIR ; $DateBegin ; $DateEnd ; $PeriodPack ; $StandAlone ; $MASTER 
    5252#-Q- aix6 # @ queue 
    5353#-Q- ulam #!/bin/ksh 
     
    6565#-Q- ulam # pour recevoir un mail en cas de depassement du temps Elapsed (ou autre pb.) 
    6666#-Q- ulam # @ notification = error 
    67 #-Q- ulam # @ environment  = $DEBUG_debug ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $SUBMIT_DIR ; $DateBegin ; $PeriodDateBegin ; $PeriodDateEnd ; $StandAlone ; $MASTER 
     67#-Q- ulam # @ environment  = $DEBUG_debug ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $SUBMIT_DIR ; $DateBegin ; $DateEnd ; $PeriodPack ; $StandAlone ; $MASTER 
    6868#-Q- ulam # @ queue 
    6969#-Q- sx8mercure #!/bin/ksh 
     
    132132StandAlone=${StandAlone:=true} 
    133133 
    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. 
     140libIGCM=${libIGCM:=::modipsl::/libIGCM} 
    149141 
    150142#-D- $hostname of the MASTER job when SUBMIT_DIR is not visible on postprocessing computer. 
    151143MASTER=${MASTER:=mercure|titane|brodie|vargas} 
    152144 
     145#D- Flag to determine begin date for restart pack 
     146#D- Default : value from AA_job if any 
     147DateBegin=${DateBegin:=20000101) 
     148 
     149#D- Flag to determine end date for restart pack 
     150#D- Default : value from AA_job if any 
     151DateEnd=${DateEnd:=20691231} 
     152 
     153#D- Flag to determine pack period 
     154#D- Default : value from AA_job if any 
     155PeriodPack=${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 
     164Verbosity=${Verbosity:=3} 
     165 
    153166#D- Low level debug : to bypass lib test checks and stack construction 
    154167#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 instead 
    160 # of your running libIGCM directory. 
    161  
    162 #D- Increased verbosity (1, 2, 3) 
    163 #D- Default : value from AA_job if any 
    164 Verbosity=${Verbosity:=3} 
    165  
    166 #D- Low level debug : to bypass lib test checks and stack construction 
    167 #D- Default : value from AA_job if any 
    168168DEBUG_debug=${DEBUG_debug:=false} 
     169 
     170#D- Keep following comments for now. Will be remove. 
    169171 
    170172#on veut archiver les fichiers restart 
     
    187189# $1= PATH/config_card d'une simulation avec  
    188190# TagName/JobName/ExperimentName/SpaceName/DateBegin/DateEnd/PATH_SIMUL 
    189 # $2=period_pack en M/m ou Y/y 
     191# $2=PeriodPack en M/m ou Y/y 
    190192 
    191193######################################################################## 
     
    264266#### Preparation de l'environnement 
    265267# 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  
     268STORE_DEBUG=${R_SAVE}/DEBUG 
     269IGCM_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) 
    276275JobName=${config_UserChoices_JobName} 
    277 #DateBegin=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateBegin} ) 
    278 #DateEnd=$(   IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateEnd}   ) 
    279276PATH_SIMUL=${R_BUFR} 
    280277echo $JobName $PATH_SIMUL $DateBegin $DateEnd 
     
    295292###cat  ${RUN_DIR}/liste_debug_files.txt | xargs dmget  
    296293 
    297 # Rename debug files we will work with 
     294# Rename debug files we will work with using symlinks 
    298295#gawk -F/ '{dest_name=$(NF-2)("_") $(NF); system("cp --preserve " $0 " "dest_name)}' ${RUN_DIR}/liste_debug_files.txt 
    299296gawk -F/ '{dest_name=$(NF-2)("_") $(NF); system("ln -s " $0 " "dest_name)}' ${RUN_DIR}/liste_debug_files.txt 
     
    303300 
    304301### 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} in 
     302### 2.1- dechiffrer PeriodPack et le separer en year et month ### 
     303case ${PeriodPack} in 
    307304*Y|*y)  
    308   periodpackinyear=$( echo ${period_pack} | sed -e 's/[yY]//' )  
     305  periodpackinyear=$( echo ${PeriodPack} | sed -e 's/[yY]//' )  
    309306  periodpackinmonth=0 
    310307  ;; 
     
    312309*M|*m)  
    313310  periodpackinyear=0 
    314   periodpackinmonth=$( echo ${period_pack} | sed -e 's/[mM]//' )  
     311  periodpackinmonth=$( echo ${PeriodPack} | sed -e 's/[mM]//' )  
    315312  ;; 
    316313 
    317314*) 
    318   echo "period_pack doit etre en mois ou annees" 
     315  echo "PeriodPack doit etre en mois ou annees" 
    319316  IGCM_debug_Exit "period pack unit" 
    320317  ;; 
     
    366363    if [ ${date_file} -lt ${date_end_pack} ] && [ ${date_file} -ge ${date_begin_pack} ] ; then  
    367364        echo $( basename ${file} ) >> ${RUN_DIR}/liste_pack_${number_pack}.txt 
     365#    Will not work. Need to find a better ordering. 
    368366#    elif [ ${date_file} -ge ${date_end_pack} ] ; then 
    369367#      break 
     
    375373  date_begin_pack=${year_begin_pack}$( printf "%02i\n" ${month_begin_pack} )01 
    376374 
    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 
    378377  cat  ${RUN_DIR}/liste_pack_${number_pack}.txt | xargs rm  
    379378  mv ${RUN_DIR}/liste_pack_${number_pack}.txt ${STORE_DEBUG} 
Note: See TracChangeset for help on using the changeset viewer.