Ignore:
Timestamp:
09/03/12 19:18:22 (12 years ago)
Author:
gpincka
Message:

simplification mesure du temps de calcul

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TOOLS/PACK_IPSL/showPackProgress.sh

    r1853 r1862  
    1616 
    1717export timeHandlingFile="${USER_OUTPUT_PROGRESS}/timeHandlingFile.txt" 
     18export timeLaunchStartFile="${USER_OUTPUT_PROGRESS}/timeLaunchStartFile.txt" 
     19export timeEndFile="${USER_OUTPUT_PROGRESS}/timeEndFile.txt" 
    1820 
    1921 
     
    183185} 
    184186 
     187function getTimeSinceLaunchStart 
     188{ 
     189    timeNow_=$1 
     190    stillWaiting_=1 
     191     
     192    launchTimeString=`cat $timeLaunchStartFile | grep -e 'launch time:[[:digit:].]*$' ` 
     193    if [ "x${launchTimeString}" == "x" ] 
     194    then 
     195        echo "no launch time" 
     196        return 
     197    fi 
     198    launchTime_=`echo $launchTimeString | awk -F":" '{print $2}' ` 
     199     
     200     
     201    endTimeString=`cat $timeEndFile | grep -e 'end time:[[:digit:].]*$' ` 
     202    if [ "x${endTimeString}" == "x" ] 
     203    then 
     204        endTime_=${timeNow_} 
     205    else 
     206        endTime_=`echo $endTimeString | awk -F":" '{print $2}' ` 
     207        stillWaiting_=0 
     208    fi 
     209     
     210    timeSinceLaunch_=$( awk 'BEGIN { print '${endTime_}'-'${launchTime_}' }' ) 
     211    timeSinceLaunch_=$( awk 'BEGIN { print '${timeSinceLaunch_}'/'1000' }' ) 
     212    if [ "x$stillWaiting_" == "x1" ] 
     213    then 
     214       timeSinceLaunch_="${timeSinceLaunch_}, still executing..." 
     215    fi 
     216     
     217    echo $timeSinceLaunch_ 
     218 
     219} 
    185220 
    186221 
     
    274309 
    275310# Recuperation des temps d'attente et ecoule depuis de demarrage des traitements en batch 
    276 if [ -e $timeHandlingFile ] 
     311if [ -e $timeLaunchStartFile ] 
    277312then 
    278313    timeNow=$( getDateMilliSeconds ) 
    279     waitingTime=$( getWaitingTime $timeNow ) 
    280     timeSinceExecutionStart=$( getTimeSinceExecutionStart $timeNow ) 
     314    # waitingTime=$( getWaitingTime $timeNow ) # supprime pour le moment : pb si +sieurs instances ==> on simplifie 
     315    # timeSinceExecutionStart=$( getTimeSinceExecutionStart $timeNow ) # supprime pour le moment : pb si +sieurs instances ==> on simplifie 
     316    timeSinceLaunchStart=$( getTimeSinceLaunchStart $timeNow ) # added 
    281317else 
    282     waitingTime="no handling time file available." 
    283     timeFromExecutionStart="no handling time file available." 
     318    # waitingTime="no handling time file available." # supprime pour le moment : pb si +sieurs instances ==> on simplifie 
     319    # timeFromExecutionStart="no handling time file available." # supprime pour le moment : pb si +sieurs instances ==> on simplifie 
     320    timeSinceLaunchStart="no launch time file available." 
    284321fi 
    285322 
     
    399436echo "nb inode before : $NbInodeBefore" 
    400437echo "nb inode after : $NbInodeAfter" 
    401 echo "Total time for elementary operations : $totalTime  (sum of times on several proc)"  
    402 echo "waiting time : $waitingTime" 
    403 echo "Time since execution start : $timeSinceExecutionStart"  
    404  
    405  
    406  
    407  
     438echo "Total time for elementary operations : $totalTime"  
     439# echo "waiting time : $waitingTime" # supprime pour le moment : pb si +sieurs instances ==> on simplifie 
     440# echo "Time since execution start : $timeSinceExecutionStart" # supprime pour le moment : pb si +sieurs instances ==> on simplifie 
     441echo "Time since launch start : $timeSinceLaunchStart" 
     442 
     443 
     444 
Note: See TracChangeset for help on using the changeset viewer.