Changeset 1849 for TOOLS/PACK_IPSL/showPackProgress.sh
- Timestamp:
- 08/09/12 10:55:47 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TOOLS/PACK_IPSL/showPackProgress.sh
r1848 r1849 4 4 export EXE_DIR=${JOB_DIR} 5 5 6 export INPUT_DMF_DATA=${SCRATCHDIR}/PSEUDO_DMNFS_light 7 export OUTPUT_STORE=${SCRATCHDIR}/PSEUDO_DMNFS_STORE 8 export OUTPUT_WORK=${SCRATCHDIR}/PSEUDO_DMNFS_WORK 6 # gpdebug : pour titane 7 # --------------------- 8 # export INPUT_DMF_DATA=${SCRATCHDIR}/datasLabo/dataDMNFS_simple1 9 # export OUTPUT_STORE=${SCRATCHDIR}/PSEUDO_DMNFS_STORE 10 # export OUTPUT_WORK=${SCRATCHDIR}/PSEUDO_DMNFS_WORK 11 12 13 # gpdebug : pour curie 14 # -------------------- 15 export INPUT_DMF_DATA=${SCRATCHDIR}/dataDMNFS_FromTitane 16 export OUTPUT_STORE=${SCRATCHDIR}/dataDMNFS_FromTitane_STORE 17 export OUTPUT_WORK=${SCRATCHDIR}/dataDMNFS_FromTitane_WORK 9 18 10 19 SCRIPT_NAME=$(basename ${0} ) … … 16 25 17 26 source ${EXE_DIR}/DEM_utilities.sh 27 28 export timeHandlingFile="timeHandlingFile.txt" 18 29 19 30 … … 115 126 116 127 128 function getWaitingTime 129 { 130 timeNow_=$1 131 stillWaiting_=1 132 133 launchTimeString=`cat $timeHandlingFile | grep -e 'launch time:[[:digit:].]*$' ` 134 if [ "x${launchTimeString}" == "x" ] 135 then 136 echo "no launch time" 137 return 138 fi 139 launchTime_=`echo $launchTimeString | awk -F":" '{print $2}' ` 140 141 142 startExecTimeString=`cat $timeHandlingFile | grep -e 'start time:[[:digit:].]*$' ` 143 if [ "x${startExecTimeString}" == "x" ] 144 then 145 execTime_=${timeNow_} 146 else 147 execTime_=`echo $startExecTimeString | awk -F":" '{print $2}' ` 148 stillWaiting_=0 149 fi 150 151 waitingTime_=$( awk 'BEGIN { print '${execTime_}'-'${launchTime_}' }' ) 152 waitingTime_=$( awk 'BEGIN { print '${waitingTime_}'/'1000' }' ) 153 if [ "x$stillWaiting_" == "x1" ] 154 then 155 waitingTime_="${waitingTime_}, still waiting..." 156 fi 157 158 echo $waitingTime_ 159 } 160 161 162 function getTimeSinceExecutionStart 163 { 164 165 timeNow_=$1 166 stillWaiting_=1 167 168 execTimeString=`cat $timeHandlingFile | grep -e 'start time:[[:digit:].]*$' ` 169 if [ "x${execTimeString}" == "x" ] 170 then 171 echo "no start time" 172 return 173 fi 174 execTime_=`echo $execTimeString | awk -F":" '{print $2}' ` 175 176 177 endTimeString=`cat $timeHandlingFile | grep -e 'end time:[[:digit:].]*$' ` 178 if [ "x${endTimeString}" == "x" ] 179 then 180 endTime_=${timeNow_} 181 else 182 endTime_=`echo $endTimeString | awk -F":" '{print $2}' ` 183 stillWaiting_=0 184 fi 185 186 timeSinceExec_=$( awk 'BEGIN { print '${endTime_}'-'${execTime_}' }' ) 187 timeSinceExec_=$( awk 'BEGIN { print '${timeSinceExec_}'/'1000' }' ) 188 if [ "x$stillWaiting_" == "x1" ] 189 then 190 timeSinceExec_="${timeSinceExec_}, still executing..." 191 fi 192 193 echo $timeSinceExec_ 194 } 195 117 196 ################################# 118 197 ####### Main script ############# 119 198 ################################# 120 199 > showPackProgress.log # vider le fichier de log 200 201 # Recuperation des temps d'attente et ecoule depuis de demarrage des traitements en batch 202 if [ -e $timeHandlingFile ] 203 then 204 timeNow=$( getDateMilliSeconds ) 205 waitingTime=$( getWaitingTime $timeNow ) 206 timeSinceExecutionStart=$( getTimeSinceExecutionStart $timeNow ) 207 else 208 waitingTime="no handling time file available." 209 timeFromExecutionStart="no handling time file available." 210 fi 211 121 212 122 213 totalNbOfList=0 … … 135 226 TotalNbInodes=0 136 227 TotalSimuTar=0 228 totalTime=0 137 229 138 230 for CONFIG in $( awk '{print $1}' ${IGCM_DEM}/config_card.liste ) ; do … … 193 285 194 286 echo " $listName : $status | time : $timeTaken" 287 288 timeInSecondsOK=`echo $timeTaken | grep -e '^[[:digit:].]*$' | wc -l ` 289 if [ "x${timeInSecondsOK}" != "x0" ] 290 then 291 totalTime=$(awk 'BEGIN { print '$totalTime'+'$timeTaken' }') 292 fi 195 293 done 196 294 done … … 219 317 echo "nb inode before : $NbInodeBefore" 220 318 echo "nb inode after : $NbInodeAfter" 221 222 223 224 319 echo "Total time for elementary operations : $totalTime (sum of times on several proc)" 320 echo "waiting time : $waitingTime" 321 echo "Time since execution start : $timeSinceExecutionStart" 322 323 324 325
Note: See TracChangeset
for help on using the changeset viewer.