Changeset 1849
- Timestamp:
- 08/09/12 10:55:47 (12 years ago)
- Location:
- TOOLS/PACK_IPSL
- Files:
-
- 7 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
TOOLS/PACK_IPSL/DEM_utilities.sh
r1838 r1849 305 305 # On verifie que xyz est un nombre a 3 chiffres 306 306 verNCOnumberOK=`echo $verNCOnumber | grep -e '^[0-9]\{3\}$' | wc -l ` 307 # if ! [[ "$verNCOnumber" =~ ^[0-9]\{3\}$ ]] 307 # if ! [[ "$verNCOnumber" =~ ^[0-9]\{3\}$ ]] # gpdebug : ne marche pas sous curie si ksh. 308 308 if [ "x${verNCOnumberOK}" == "x0" ] 309 309 then … … 509 509 } 510 510 511 512 function getDateMilliSeconds 513 { 514 test=`date +%s%N` 515 testnum=${#test} 516 millisec=${test:0:$testnum-6} 517 echo "$millisec" 518 } 519 520 function getTimeDiffSeconds 521 { 522 startTimeMilliSec=$1 523 endTimeMilliSec=$( getDateMilliSeconds ) 524 525 diffMilliSec=$(( $endTimeMilliSec - $startTimeMilliSec )) 526 527 diffSeconds=$(awk 'BEGIN { print '$diffMilliSec'/'1000' }') 528 echo "$diffSeconds" 529 530 } 531 511 532 # gpdebug : fin ##################################################################################### 512 533 -
TOOLS/PACK_IPSL/create_config_card.sh
r1845 r1849 53 53 #PATH_SIMUL_SHORT=${PATH_SIMUL_FULL##${ROOT_DIR}} # Enleve le debut du path 54 54 # PATH_SIMUL_SHORT=$(echo ${PATH_SIMUL_FULL} | sed 's%/[^/]*/[^/]*/[^/]*/%%' ) 55 PATH_SIMUL_SHORT=$(echo ${PATH_SIMUL_FULL} | sed 's%/ccc/dmfbuf/import_data.2/ccrt/dmnfs12/cont003/bacasable/%%' ) 56 55 # PATH_SIMUL_SHORT=$(echo ${PATH_SIMUL_FULL} | sed 's%/ccc/dmfbuf/import_data.2/ccrt/dmnfs12/cont003/bacasable/%%' ) 56 echo "gpdebug : PATH_SIMUL_FULL :" # gpdebug : a virer 57 echo "$PATH_SIMUL_FULL :" # gpdebug : a virer 58 PATH_SIMUL_SHORT=$(echo ${PATH_SIMUL_FULL} | sed "s%${SCRATCHDIR}/%%" ) # gpdebug : added 59 echo "gpdebug : PATH_SIMUL_SHORT :" # gpdebug : a virer 60 echo "$PATH_SIMUL_SHORT :" # gpdebug : a virer 57 61 DEM_log -3 PATH_SIMUL_SHORT : ${PATH_SIMUL_SHORT} 58 62 -
TOOLS/PACK_IPSL/enlarge_my_files.sh
r1843 r1849 103 103 # gpdebug : ****************************** fin ******************** 104 104 105 106 #********** gpdebug : mesure d'intervalles de temps *************** 107 function getDateMilliSeconds 108 { 109 test=`date +%s%N` 110 testnum=${#test} 111 millisec=${test:0:$testnum-6} 112 echo "$millisec" 113 } 114 115 function getTimeDiffSeconds 116 { 117 startTimeMilliSec=$1 118 endTimeMilliSec=$( getDateMilliSeconds ) 119 120 diffMilliSec=$(( $endTimeMilliSec - $startTimeMilliSec )) 121 122 diffSeconds=$(awk 'BEGIN { print '$diffMilliSec'/'1000' }') 123 echo "$diffSeconds" 124 125 } 126 # gpdebug : ****************************** fin ******************** 105 source ${EXE_DIR}/DEM_utilities.sh # gpdebug : pour trouver les fonctions de mesure de temps 106 127 107 #------------------------------------------------------ 128 108 for set in $( ls $PATH_SIMU/output_ncrcat/*list ) ; do -
TOOLS/PACK_IPSL/launch_ipsl_pack.sh
r1822 r1849 41 41 42 42 # fichier de progression d'execution 43 extSuiviListes=`echo ${LISTE_SIMUL} | sed 's;\.[[:alnum:]]*$;;' ` 43 ficParam=$( basename ${LISTE_SIMUL} ) # gpdebug : modif ici et ligne d'apres 44 extSuiviListes=`echo ${ficParam} | sed 's;\.[[:alnum:]]*$;;' ` 44 45 # echo "extSuiviListes=$extSuiviListes" # gpdebug : a virer 45 46 export MonitoringDir="${PWD}/SuiviListes_${extSuiviListes}" -
TOOLS/PACK_IPSL/showListsProgress.sh
r1822 r1849 56 56 # fichier de progression d'execution 57 57 # Le seul arg du script doit etre un fichier param 58 paramFile=$(basename ${1}) 58 59 paramFile=${1} 60 paramFileBasename=$(basename ${1}) 61 59 62 if [ ! -e $paramFile ] || [ "x${paramFile}" == "x" ] 60 63 then 61 echo "Le repertoireen argument n existe pas"64 echo "Le fichier en argument n existe pas" 62 65 exit 0 63 66 fi 64 extSuiviListes=`echo ${paramFile } | sed 's;\.[[:alnum:]]*$;;' `67 extSuiviListes=`echo ${paramFileBasename} | sed 's;\.[[:alnum:]]*$;;' ` 65 68 export MonitoringDir="${PWD}/SuiviListes_${extSuiviListes}" 66 69 # echo "MonitoringDir=$MonitoringDir" -
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.