Ignore:
Timestamp:
05/11/12 10:08:39 (12 years ago)
Author:
acosce
Message:

If a simulation has a size less than 1Go we tar it

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TOOLS/PACK_IPSL/calcul_size_simul.sh

    r1709 r1714  
    1414mkdir -p ${IGCM_TMP} 
    1515 
     16EXE_DIR=$(dirname ${0}) 
     17SCRIPT_NAME=$(basename ${0} ) 
     18source ${EXE_DIR}/DEM_utilities.sh 
     19DEM_log -0 "Demarrage de ${SCRIPT_NAME}" 
     20 
    1621eval $(grep JobName ${config_card})  
    1722eval $(grep PATH_SIMUL_FULL ${config_card})  
     
    2631 
    2732#cree la liste de l'ensemble des fichiers de la simulation 
    28 grep ${PATH_SIMUL_FULL} ${LISTE_DMNFS} | grep 'R ' > ${IGCM_TMP}/$$.info_tmp.txt  
    29 awk '{print $(NF-2) " " $(NF-1)}' ${IGCM_TMP}/$$.info_tmp.txt > ${IGCM_DEM_SIMU}/All_files_simul.txt 
     33#echo ${PATH_SIMUL_FULL} ${LISTE_DMNFS} 
     34grep ${PATH_SIMUL_FULL} ${LISTE_DMNFS} | grep 'f ' > ${IGCM_TMP}/$$.info_tmp.txt  
     35awk '{print $(NF-1) " " $(NF)}' ${IGCM_TMP}/$$.info_tmp.txt > ${IGCM_DEM_SIMU}/All_files_simul.txt 
    3036 
    3137size=`awk 'BEGIN {y = 0} {x = $1 ; y = y + x } END{print y}'  ${IGCM_DEM_SIMU}/All_files_simul.txt` 
    32 echo $size 
     38DEM_log -3 "la taille de la simulation est  $size" 
    3339if [  ${size} -lt ${limitmin} ] 
    3440then 
    3541 
    36     echo "trop petit on archive cette simulation avec tar" 
    37     PATH_SIMUL_SHORT=$(echo ${PATH_SIMUL_FULL} | sed 's%/[^/]*/[^/]*/[^/]*/%%' ) 
    38     echo  ${PATH_SIMUL_FULL} > ${IGCM_DEM_SIMU}/tar_full_simul.txt 
    39  
     42    DEM_log -0  "Simulation < 1Go -  on l'archive avec tar" 
     43    ./write_liste_tar.sh ${config_card} 
    4044 
    4145fi 
     46DEM_log -0 "Fin de ${SCRIPT_NAME}" 
Note: See TracChangeset for help on using the changeset viewer.