|
353 | 353 | echo "SETTING_ROOT_OUTPUT = $SETTING_ROOT_OUTPUT" |
354 | 354 |
|
355 | 355 | # Enabling GPUs |
356 | | -if [[ -n "$ALIEN_JDL_USEGPUS" && $ALIEN_JDL_USEGPUS != 0 ]]; then |
| 356 | +if [[ -n "$ALIEN_JDL_USEGPUS" && $ALIEN_JDL_USEGPUS != 0 ]] ; then |
357 | 357 | echo "Enabling GPUS" |
358 | 358 | export GPUTYPE="HIP" |
359 | 359 | export GPUMEMSIZE=$((25 << 30)) |
@@ -456,6 +456,13 @@ if [[ $ALIEN_JDL_SPLITWF != "1" ]]; then |
456 | 456 | fi |
457 | 457 | mv latest.log latest_reco_1.log |
458 | 458 | $STATSCRIPT latest_reco_1.log |
| 459 | + exitcode=$? |
| 460 | + echo "exit code is $exitcode" |
| 461 | + if [[ $exitcode -ne 0 ]]; then |
| 462 | + echo "exit code from processing is " $exitcode > validation_error.message |
| 463 | + echo "exit code from processing is " $exitcode |
| 464 | + exit $exitcode |
| 465 | + fi |
459 | 466 | fi |
460 | 467 | else |
461 | 468 | # running the wf in split mode |
@@ -486,7 +493,16 @@ else |
486 | 493 | exit $exitcode |
487 | 494 | fi |
488 | 495 | mv latest.log latest_reco_1.log |
| 496 | + if [[ -f performanceMetrics.json ]]; then |
| 497 | + mv performanceMetrics.json performanceMetrics_1.json |
| 498 | + fi |
489 | 499 | $STATSCRIPT latest_reco_1.log reco_1 |
| 500 | + exitcode=$? |
| 501 | + if [[ $exitcode -ne 0 ]]; then |
| 502 | + echo "exit code from processing is " $exitcode > validation_error.message |
| 503 | + echo "exit code from processing is " $exitcode |
| 504 | + exit $exitcode |
| 505 | + fi |
490 | 506 | fi |
491 | 507 | fi |
492 | 508 |
|
@@ -515,7 +531,16 @@ else |
515 | 531 | exit $exitcode |
516 | 532 | fi |
517 | 533 | mv latest.log latest_reco_2.log |
| 534 | + if [[ -f performanceMetrics.json ]]; then |
| 535 | + mv performanceMetrics.json performanceMetrics_2.json |
| 536 | + fi |
518 | 537 | $STATSCRIPT latest_reco_2.log reco_2 |
| 538 | + exitcode=$? |
| 539 | + if [[ $exitcode -ne 0 ]]; then |
| 540 | + echo "exit code from processing is " $exitcode > validation_error.message |
| 541 | + echo "exit code from processing is " $exitcode |
| 542 | + exit $exitcode |
| 543 | + fi |
519 | 544 | # let's compare to previous step |
520 | 545 | if [[ -f latest_reco_1.log ]]; then |
521 | 546 | nCTFsFilesInspected_step1=`ls [0-9]*_[0-9]*_[0-9]*_[0-9]*_[0-9]*_reco_1.stat | sed 's/\(^[0-9]*\)_.*/\1/'` |
@@ -569,23 +594,29 @@ else |
569 | 594 | exit $exitcode |
570 | 595 | fi |
571 | 596 | mv latest.log latest_reco_3.log |
| 597 | + if [[ -f performanceMetrics.json ]]; then |
| 598 | + mv performanceMetrics.json performanceMetrics_3.json |
| 599 | + fi |
572 | 600 | fi |
573 | 601 | fi |
574 | 602 | fi |
575 | 603 |
|
576 | 604 | # now extract all performance metrics |
577 | 605 | IFS=$'\n' |
578 | | -if [[ -f "performanceMetrics.json" ]]; then |
579 | | - timeStart=`date +%s` |
580 | | - for workflow in `grep ': {' performanceMetrics.json`; do |
581 | | - strippedWorkflow=`echo $workflow | cut -d\" -f2` |
582 | | - cat performanceMetrics.json | jq '.'\"${strippedWorkflow}\"'' > ${strippedWorkflow}_metrics.json |
| 606 | +timeStart=`date +%s` |
| 607 | +for perfMetricsFiles in performanceMetrics.json performanceMetrics_1.json performanceMetrics_2.json performanceMetrics_3.json ; do |
| 608 | + suffix=`echo $perfMetricsFiles | sed 's/performanceMetrics\(.*\).json/\1/'` |
| 609 | + if [[ -f "performanceMetrics.json" ]]; then |
| 610 | + for workflow in `grep ': {' $perfMetricsFiles`; do |
| 611 | + strippedWorkflow=`echo $workflow | cut -d\" -f2` |
| 612 | + cat $perfMetricsFiles | jq '.'\"${strippedWorkflow}\"'' > ${strippedWorkflow}_metrics${suffix}.json |
583 | 613 | done |
584 | | - timeEnd=`date +%s` |
585 | | - timeUsed=$(( $timeUsed+$timeEnd-$timeStart )) |
586 | | - delta=$(( $timeEnd-$timeStart )) |
587 | | - echo "Time spent in splitting the metrics files = $delta s" |
588 | | -fi |
| 614 | + fi |
| 615 | +done |
| 616 | +timeEnd=`date +%s` |
| 617 | +timeUsed=$(( $timeUsed+$timeEnd-$timeStart )) |
| 618 | +delta=$(( $timeEnd-$timeStart )) |
| 619 | +echo "Time spent in splitting the metrics files = $delta s" |
589 | 620 |
|
590 | 621 | if [[ $ALIEN_JDL_AODOFF != 1 ]]; then |
591 | 622 | # flag to possibly enable Analysis QC |
|
0 commit comments