Changeset 1862


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

simplification mesure du temps de calcul

Location:
TOOLS/PACK_IPSL
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • TOOLS/PACK_IPSL/launch_and_measureTime.sh

    r1853 r1862  
    306306#fi 
    307307################################################### 
    308 startTime=$( getDateMilliSeconds ) 
    309 echo "start time:$startTime" >> $timeHandlingFile 
     308# startTime=$( getDateMilliSeconds ) # suppr 
     309# echo "start time:$startTime" >> $timeHandlingFile # suppr 
     310> $timeEndFile # added 
    310311 
    311312ccc_mprun  ./glost_launch -R $timeLimitBeforeEnd ${inputCmd} 2>${output} 
     
    317318###    mpirun -n 4 ./cmd_launch.exe myIO/inputCmd10.list 2>myIO/output.log 
    318319 
    319 meantime=$( getTimeDiffSeconds $startTime ) 
     320# meantime=$( getTimeDiffSeconds $startTime ) # suppr 
    320321 
    321322endExecutionTime=$( getDateMilliSeconds ) 
    322 echo "end time:$endExecutionTime" >> $timeHandlingFile 
    323  
    324 echo "meantime ncrcat = $meantime" 
     323echo "end time:$endExecutionTime" >> $timeEndFile 
     324 
     325 
     326 
     327# echo "meantime ncrcat = $meantime" 
    325328 
    326329# exit 0 # a virer 
  • TOOLS/PACK_IPSL/launch_ipsl_enlarge.sh

    r1854 r1862  
    4040# export IGCM_TMP=${SCRATCHDIR}/IGCM_DEM/tmp # gpdebug : suppr 
    4141 
    42 # On renseigne les variables d'environnement  
     42# On renseigne les variables d'environnement 
     43export scriptCallingLoad=$SCRIPT_NAME # sert a renseigner "load_ipslPack_env.sh" sur le script l'appelant 
    4344. load_ipslPack_env.sh 
    4445export IGCM_TMP="${IGCM_DEM}/tmp"  # gpdebug : added 
     
    9192# gpdebug : end 
    9293 
     94export timeLaunchStartFile="${USER_OUTPUT_PROGRESS}/timeLaunchStartFile.txt" 
     95> $timeLaunchStartFile 
     96startTime=$( getDateMilliSeconds ) 
     97echo "launch time:$startTime" > $timeLaunchStartFile 
     98 
     99 
    93100for CONFIG in $( awk '{print $1}' ${IGCM_DEM}/config_card.liste ) ; do  
    94101 
     
    115122done 
    116123 
     124export timeEndFile="${USER_OUTPUT_PROGRESS}/timeEndFile.txt" 
     125> $timeEndFile 
     126 
    117127DEM_log -0 "Fin de ${SCRIPT_NAME}" 
  • TOOLS/PACK_IPSL/parallelPack.sh

    r1856 r1862  
    209209 
    210210 
    211 export timeHandlingFile="${USER_OUTPUT_PROGRESS}/timeHandlingFile.txt" 
    212 > $timeHandlingFile 
     211export timeLaunchStartFile="${USER_OUTPUT_PROGRESS}/timeLaunchStartFile.txt" 
     212> $timeLaunchStartFile 
    213213startTime=$( getDateMilliSeconds ) 
    214 echo "launch time:$startTime" >> $timeHandlingFile 
     214echo "launch time:$startTime" > $timeLaunchStartFile 
     215 
     216export timeEndFile="${USER_OUTPUT_PROGRESS}/timeEndFile.txt" 
     217> $timeEndFile 
    215218 
    216219SCRIPT_NAME=$(basename ${0} ) 
  • 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.