Changeset 1871


Ignore:
Timestamp:
09/07/12 15:49:44 (12 years ago)
Author:
gpincka
Message:

modifs showPackProgress.sh

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TOOLS/PACK_IPSL/showPackProgress.sh

    r1868 r1871  
    250250         nbOfListsNottreated=$(( $nbOfListsNottreated + 1 )) 
    251251         simuOK=$(( $simuOK && 0 )) # marque une simu pas OK 
     252     simutreated=$(( $simutreated && 0 )) # marque une simu non completement traitee 
    252253     fi 
    253254 
     
    272273outputFile= 
    273274detailed_mode=1 
     275publish_mode=1 
    274276while [ $# -gt 0 ] 
    275277do 
     
    300302                     detailed_mode=0 
    301303                     ;; 
     304   -p) echo "option -p selectionnee : publication" 
     305       publish_mode=0       
    302306   esac 
    303307   shift 
     
    340344# exit 0 # gpdebug : a virer 
    341345 
     346TotalNbSimu=0 
     347nbOfSimuPacked=0 
     348nbOfSimuFailed=0 
     349nbOfSimuNottreated=0 
    342350nbOfListsPacked=0 
    343351nbOfListsFailed=0 
     
    347355totalTime=0 
    348356 
     357TotalNbSimu=`cat ${IGCM_DEM}/config_card.liste |wc -l` 
     358 
     359if [ "x${outputFile}" == "x" ] && [ "x${publish_mode}" == "x0" ] 
     360then 
     361# Publication 
     362echo "Simulation;Status" > ${outputFile}_${USER} 
     363fi 
    349364 
    350365for CONFIG in $( awk '{print $1}' ${IGCM_DEM}/config_card.liste ) ; do  
     
    367382     
    368383    simuOK=1  
    369      
     384    simutreated=1 
     385  
    370386    if [ ! -e "${PATH_SIMU}/tar_full_simul.list" ] 
    371387    then 
     
    378394             then 
    379395                echo "      ${dir} n'existe pas pour cette simu" >> simuPrint.txt 
    380                 simuOK=$(( $simuOK && 0 )) # marque une simu pas OK 
     396#               simuOK=$(( $simuOK && 0 )) # marque une simu pas OK 
    381397                continue 
    382398             fi 
     
    406422        resSimu="not OK" 
    407423    fi 
    408      
     424 
     425    if [ "x${simutreated}" == "x0" ] 
     426    then 
     427        resSimu="not treated" 
     428    fi 
     429 
     430    if [ "x${resSimu}" == "xnot OK" ] 
     431    then 
     432       nbOfSimuFailed=$(( $nbOfSimuFailed + 1 ))  
     433    elif [ "x${resSimu}" == "xnot treated" ] 
     434    then 
     435       nbOfSimuNottreated=$(( $nbOfSimuNottreated + 1 )) 
     436    else 
     437        nbOfSimuPacked=$(( $nbOfSimuPacked + 1 )) 
     438    fi 
     439 
    409440    if [ "x${outputFile}" == "x" ] 
    410441    then 
     
    417448        fi 
    418449    else 
     450        if [ "x${publish_mode}" == "x1" ] 
     451        then 
    419452        echo "***************************************************" >> ${outputFile} 
    420453        echo "simulation : $simuName  ===> $resSimu"               >> ${outputFile} 
     
    424457            cat simuPrint.txt  $outRedirectStatement               >> ${outputFile} 
    425458        fi      
     459        else 
     460# Publication 
     461        echo "$simuName;$resSimu" >> ${outputFile}_${USER} 
     462        fi 
    426463    fi  
    427464    rm simuPrint.txt 
     
    447484    echo "#####  BILAN #####" 
    448485    echo "##################" 
     486    echo "nb of Simulations packed with success : ${nbOfSimuPacked} / ${TotalNbSimu}" 
     487    echo "nb of Simus failed : ${nbOfSimuFailed}" 
     488    echo "nb of Simus not treated : ${nbOfSimuNottreated}" 
    449489    echo "nb of Lists packed with success : ${nbOfListsPacked} / ${totalNbOfList}" 
    450490    echo "nb of fails : $nbOfListsFailed" 
     
    458498 
    459499else 
     500    if [ "x${publish_mode}" == "x1" ] 
     501        then 
    460502    echo 
    461503    echo "##################" >> ${outputFile} 
    462504    echo "#####  BILAN #####" >> ${outputFile} 
    463505    echo "##################" >> ${outputFile} 
     506    echo "nb of Simulations packed with success : ${nbOfSimuPacked} / ${TotalNbSimu}" >> ${outputFile} 
     507    echo "nb of Simus failed : ${nbOfSimuFailed}" >> ${outputFile} 
     508    echo "nb of Simus not treated : ${nbOfSimuNottreated}" >> ${outputFile} 
    464509    echo "nb of Lists packed with success : ${nbOfListsPacked} / ${totalNbOfList}" >> ${outputFile} 
    465510    echo "nb of fails : $nbOfListsFailed" >> ${outputFile} 
     
    471516    echo "Total time for elementary operations : $totalTime" >> ${outputFile} 
    472517    echo "Time since launch start : $timeSinceLaunchStart" >> ${outputFile} 
    473  
     518    else 
     519# Publication 
     520    echo "User;TotalNbSimu;NbOfSimuPacked;NbOfSimuFailed;NbOfSimuNottreated;TotalNbOfList;NbOfListsPacked;NbOfListsFailed;NbOfListsNottreated;TotalNbFiles;Nbfilestreated;Nbfilesafter;NbSimuTar" > ${outputFile} 
     521    echo "${USER};${TotalNbSimu};${nbOfSimuPacked};${nbOfSimuFailed};${nbOfSimuNottreated};${totalNbOfList};${nbOfListsPacked};$nbOfListsFailed;${nbOfListsNottreated};$TotalNbInodes;$NbInodeBefore;$NbInodeAfter;$TotalSimuTar" >> ${outputFile} 
     522    fi 
    474523fi 
Note: See TracChangeset for help on using the changeset viewer.