Ignore:
Timestamp:
03/21/12 11:02:21 (12 years ago)
Author:
sdipsl
Message:
  • can extract needed restart from a tar (up to 20 minutes on titane)
    • still to do : introduce a lag when cleaning the restart buffer so that we don't look into the tar too often
    • still to do : work on the clean_month procedure
  • rebuild process submit pack_output process if needed
    • still to do : a pack_output able to submit create_ts/create_se if needed
  • bugfixes/cosmetics/cleaning
  • SX9 and titane OK.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/AA_pack_restart

    r589 r590  
    33#-Q- cesium ## CESIUM   CEA ## 
    44#-Q- cesium ###################### 
    5 #-Q- cesium #MSUB -r PACKRESTART    # Nom du job                 
     5#-Q- cesium #MSUB -r PACKRESTART    # Nom du job 
    66#-Q- cesium #MSUB -N 1              # Reservation du noeud 
    77#-Q- cesium #MSUB -n 1              # Reservation du processus 
     
    2727#-Q- sx8brodie # Nom du travail LoadLeveler 
    2828#-Q- sx8brodie # @ job_name   = PACKRESTART 
    29 #-Q- sx8brodie # Fichier de sortie standard du travail        
     29#-Q- sx8brodie # Fichier de sortie standard du travail 
    3030#-Q- sx8brodie # @ output     = $(job_name).$(jobid) 
    3131#-Q- sx8brodie # Fichier de sortie d'erreur du travail 
     
    8181#-Q- sx9mercure ## CESIUM   CEA ## 
    8282#-Q- sx9mercure ###################### 
    83 #-Q- sx9mercure #MSUB -r PACKRESTART    # Nom du job                 
     83#-Q- sx9mercure #MSUB -r PACKRESTART    # Nom du job 
    8484#-Q- sx9mercure #MSUB -N 1              # Reservation du noeud 
    8585#-Q- sx9mercure #MSUB -n 1              # Reservation du processus 
     
    9191#-Q- titane ## TITANE   CEA     ## 
    9292#-Q- titane ###################### 
    93 #-Q- titane #MSUB -r PACKRESTART    # Nom du job                 
     93#-Q- titane #MSUB -r PACKRESTART    # Nom du job 
    9494#-Q- titane #MSUB -eo 
    9595#-Q- titane #MSUB -n 1              # Reservation du processus 
     
    178178#RESTART/ATM_****.nc 
    179179#RESTART/OCE_****.nc 
    180 #Attention de bien conserver les dates d'origines  
     180#Attention de bien conserver les dates d'origines 
    181181# 
    182182#Dans le cadre de la production nouvelle chaine 
    183183#ils auront directement le bon nom 
    184184# 
    185 #On veut egalement que l'archive soit par periode de temps  
    186 # cette periode est definie par la taille du pack donc connue  
    187 # en entree du script (1M, 1Y, 5Y, 10Y etc...)  
    188 # 
    189 # $1= PATH/config_card d'une simulation avec  
    190 # TagName/JobName/ExperimentName/SpaceName/DateBegin/DateEnd/PATH_SIMUL 
     185#On veut egalement que l'archive soit par periode de temps 
     186# cette periode est definie par la taille du pack donc connue 
     187# en entree du script (1M, 1Y, 5Y, 10Y etc...) 
     188# 
     189# $1= PATH/config_card d'une simulation avec 
     190# TagName/JobName/ExperimentName/SpaceName/DateBegin/DateEnd 
    191191# $2=PeriodPack en M/m ou Y/y 
    192192 
     
    223223fi 
    224224 
    225 # 
     225#==================================================== 
    226226# First of all 
    227227# 
    228 #### 0- lecture de config.card  
    229 #### on veut les renseignements suivants :  
    230 #### JobName, PATH_SIMUL, DateBegin et DateEnd 
     228# Read config.card 
    231229 
    232230IGCM_card_DefineArrayFromSection     ${CARD_DIR}/config.card UserChoices 
     
    250248 
    251249#==================================================== 
    252 #R_SAVE : Job output storage directory 
    253 #R_BUFR : Job output buffered directory 
     250# Prepare environment 
     251#R_SAVE        : Job output storage directory 
     252#R_BUFR        : Job output buffered directory 
     253#STORE_RESTART : Where we store tar files 
    254254 
    255255if ( [ ! X${config_UserChoices_SpaceName} = X ] && [ ! X${config_UserChoices_ExperimentName} = X ] ) ; then 
     
    264264[ $? != 0 ] && IGCM_debug_Exit "IGCM_sys_TestDirArchive" 
    265265 
    266 #### Preparation de l'environnement 
    267 # repertoire dans lequel seront crees les archives 
    268 #STORE_RESTART=/scratch/cont003/p86denv/Pack_Test/RESTART 
     266#STORE_RESTART=/ccc/store/cont003/dsm/p86denv/.../RESTART 
    269267STORE_RESTART=${R_SAVE}/RESTART 
    270268IGCM_sys_MkdirArchive ${STORE_RESTART} 
    271269 
     270#cd ${STORE_RESTART} 
     271#rm -f * 
     272 
    272273# Switch to script variables meaning (try to be compatible with ipsl_pack TGCC moving procedure) 
    273274JobName=${config_UserChoices_JobName} 
    274 PATH_SIMUL=${R_BUFR} 
    275 echo $JobName $PATH_SIMUL $DateBegin $DateEnd 
    276  
    277 #### 1- renommer les fichiers ###### 
    278 #cd ${STORE_RESTART} 
    279 #rm -rf * 
    280  
    281 # On les copie sur le scratchdir en changeant le nom et conservant la date 
     275echo $JobName $R_BUFR $DateBegin $DateEnd 
     276 
    282277# Clear txt file lists 
    283278rm -f ${RUN_DIR}/liste_restart_files.txt 
     
    286281 
    287282# Create sorted restart list to work with 
    288 find ${PATH_SIMUL}/*/Restart -name "*nc" | sort >> ${RUN_DIR}/liste_restart_files.txt 
     283find ${R_BUFR}/*/Restart -name "*nc" | sort >> ${RUN_DIR}/liste_restart_files.txt 
    289284 
    290285# Rename restart files we will work with using symlinks 
     
    318313    extract_date_file=$( echo ${file}  | sed -e "s/.*${JobName}_//" ) 
    319314    date_file=$( echo ${extract_date_file} | sed 's/\([0-9]\{8\}\)_.*$/\1/g' ) 
    320 #   echo pack n°${number_pack}  ${date_file} ${date_begin_pack} ${date_end_pack}  
    321     if [ ${date_file} -le ${date_end_pack} ] && [ ${date_file} -ge ${date_begin_pack} ] ; then  
    322         echo $( basename ${file} ) >> ${RUN_DIR}/liste_pack_${number_pack}.txt 
    323         echo $( readlink ${file} ) >> ${RUN_DIR}/liste_remove_pack_${number_pack}.txt 
    324  
    325 #    Will not work. Need to find a better ordering. 
    326 #    elif [ ${date_file} -ge ${date_end_pack} ] ; then 
    327 #      break 
     315#   echo pack n°${number_pack}  ${date_file} ${date_begin_pack} ${date_end_pack} 
     316    if [ ${date_file} -le ${date_end_pack} ] && [ ${date_file} -ge ${date_begin_pack} ] ; then 
     317      echo $( basename ${file} ) >> ${RUN_DIR}/liste_pack_${number_pack}.txt 
     318      echo $( readlink ${file} ) >> ${RUN_DIR}/liste_remove_pack_${number_pack}.txt 
     319#   Will not work. Need to find a better ordering. 
     320#   elif [ ${date_file} -ge ${date_end_pack} ] ; then 
     321#     break 
    328322    fi 
    329323  done 
     
    350344 
    351345done 
     346 
     347# Clean RUN_DIR_PATH (necessary for cesium and titane only) 
     348IGCM_sys_RmRunDir -Rf ${RUN_DIR_PATH} 
     349 
     350date 
Note: See TracChangeset for help on using the changeset viewer.