Changeset 834 for trunk/libIGCM
- Timestamp:
- 03/22/13 11:49:51 (11 years ago)
- Location:
- trunk/libIGCM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/AA_RunChecker
r832 r834 163 163 164 164 165 165 166 166 #Â Print header 167 167 # ============ … … 315 315 echo " the config.card instead of the job name." 316 316 exit ;; 317 # -b|-nocolor)318 # fg_color=false319 # shift 1 ;;320 317 -j|-job-number) 321 318 NbHisto="$2" … … 358 355 libIGCM=${libIGCM:=::modipsl::/libIGCM} 359 356 357 DEBUG_debug=false 358 360 359 . ${libIGCM}/libIGCM_debug/libIGCM_debug.ksh 361 360 . ${libIGCM}/libIGCM_card/libIGCM_card.ksh … … 462 461 echo "Work: >${CWORK_DIR}<" 463 462 463 # Are packs activated or not ? 464 # ============================ 465 if ( [ ! X${config_Post_PackFrequency} = X${NULL_STR} ] && \ 466 [ ! X${config_Post_PackFrequency} = XNONE ] ) ; then 467 Pack=true 468 else 469 Pack=false 470 fi 471 472 464 473 if [ $PeriodState != "Waiting" ] ; then 465 474 … … 498 507 typeset name1="${JobType}_String" 499 508 typeset name2="${JobType}_Field" 509 typeset name3="${JobType}_Activ" 500 510 if [ X${JobType} == X${RebuildJob} ] ; then 501 eval ${name1}=IGCM_sys_PutBuffer_Out 511 if ( ${Pack} ) ; then 512 eval ${name1}=IGCM_sys_PutBuffer_Out 513 else 514 eval ${name1}=IGCM_sys_Put_Out 515 fi 502 516 eval ${name2}=4 517 eval ${name3}=true 503 518 else 504 519 eval ${name1}=IGCM_sys_Put_Out 505 520 eval ${name2}=3 521 if ( ${Pack} ) ; then 522 eval ${name3}=true 523 else 524 eval ${name3}=false 525 fi 506 526 fi 507 527 done … … 513 533 eval String=\${${JobType}_String} 514 534 eval Field=\${${JobType}_Field} 515 516 set -A FileList $( ls ${POST_DIR}/${JobType}.*.out | tail -n ${NbHisto} ) 517 518 if [ ${#FileList[*]} -gt ${NbLines} ] ; then 519 NbLines=${#FileList[*]} 535 eval Activ=\${${JobType}_Activ} 536 537 if ( ${Activ} ) ; then 538 539 set -A FileList $( ls ${POST_DIR}/${JobType}.*.out | tail -n ${NbHisto} ) 540 541 if [ ${#FileList[*]} -gt ${NbLines} ] ; then 542 NbLines=${#FileList[*]} 543 fi 544 545 (( ind = 0 )) 546 for FileName in ${FileList[*]} ; do 547 LastDate=$( basename ${FileName} | gawk -F"." '{ print $(NF-1) }' ) 548 549 set -- $( gawk -v String=${String} \ 550 'BEGIN { nb_ok = 0 ; nb_ko = 0 } \ 551 ($1 ~ String) { \ 552 if ($3 !~ /error./) { \ 553 nb_ok = nb_ok + 1 \ 554 } else { \ 555 nb_ko = nb_ko + 1 \ 556 } \ 557 } \ 558 END { print nb_ok " " nb_ko }' \ 559 ${POST_DIR}/${JobType}.${LastDate}.out ) 560 Match=$1 561 Error=$2 562 563 (( Nb = ${Match} - ${Error} )) 564 565 if ( [ ${Error} -eq 0 ] && [ ${Nb} -gt 0 ] ) ; then 566 Status=OK 567 else 568 Status=KO 569 fi 570 571 eval ${JobType}_Date[$ind]=${LastDate} 572 eval ${JobType}_Status[$ind]=${Status} 573 eval ${JobType}_Nb[$ind]=${Nb} 574 575 (( ind = ind + 1 )) 576 done 577 578 else 579 580 eval ${JobType}_Date[0]="" 581 eval ${JobType}_Status[0]="" 582 eval ${JobType}_Nb[0]="" 583 520 584 fi 521 585 522 (( ind = 0 ))523 for FileName in ${FileList[*]} ; do524 LastDate=$( basename ${FileName} | gawk -F"." '{ print $(NF-1) }' )525 526 Error=$( gawk -v String=${String} \527 'BEGIN { x=0 } ($1~String) && ($3~"error.") { x=x+1 } END { print x }' \528 ${POST_DIR}/${JobType}.${LastDate}.out )529 530 Match=$( gawk -v String=${String} \531 'BEGIN { x=0 } ($1~String) && ($3!~"error.") { x=x+1 } END { print x }' \532 ${POST_DIR}/${JobType}.${LastDate}.out )533 (( Nb = ${Match} - ${Error} ))534 535 if ( [ ${Error} -eq 0 ] && [ ${Nb} -gt 0 ] ) ; then536 Status=OK537 else538 Status=KO539 fi540 541 eval ${JobType}_Date[$ind]=${LastDate}542 eval ${JobType}_Status[$ind]=${Status}543 eval ${JobType}_Nb[$ind]=${Nb}544 545 (( ind = ind + 1 ))546 done547 586 done 548 587 … … 583 622 584 623 fi 585 624 586 625 587 626 # Print results -
trunk/libIGCM/libIGCM_sys/libIGCM_sys_curie.ksh
r828 r834 2289 2289 2290 2290 # With -f option, the full job name is given in the last column 2291 NbRun=$( ccc_mstat -f | gawk -v JobName=$1 'BEGIN { x=0 } ( $NF~String) { x=x+1 } END { print x }' )2291 NbRun=$( ccc_mstat -f | gawk -v JobName=$1 'BEGIN { x=0 } ( $NF ~ JobName ) { x=x+1 } END { print x }' ) 2292 2292 2293 2293 eval ${2}=${NbRun}
Note: See TracChangeset
for help on using the changeset viewer.