From bf3fc8a2c280e96e1111d8c41c99caf9dd9312e9 Mon Sep 17 00:00:00 2001
From: Andrea Valassi <andrea.valassi@cern.ch>
Date: Mon, 22 Jul 2019 16:53:00 +0200
Subject: [PATCH 1/2] Fix status from parseResults.sh (BMK-129)

---
 atlas/sim/atlas-sim/parseResults.sh | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/atlas/sim/atlas-sim/parseResults.sh b/atlas/sim/atlas-sim/parseResults.sh
index ac6d12c8..2279132b 100644
--- a/atlas/sim/atlas-sim/parseResults.sh
+++ b/atlas/sim/atlas-sim/parseResults.sh
@@ -5,11 +5,8 @@ function generateSummary(){
 }
 
 function parseResults(){
-  STATUS=0
-
   echo "Parsing results from " $BASE_WDIR/proc_*/log.EVNTtoHITS
-
-  #Parsing  Event Throughput: xxxx ev/s
+  # Parsing  Event Throughput: xxxx ev/s
   resJSON=`grep -A1 "INFO Statistics for 'evt'" $BASE_WDIR/proc_*/log.EVNTtoHITS | grep "<cpu>" | sed -e "s@[^(]*([[:blank:]]*\([ 0-9\.]*\) +/-.*@\1@" | awk '
     BEGIN{amin=1000000;amax=0;count=0;}
     { if ($1>0) {val=1./(int($1*10.)/10000.); a[count]=val; count+=1; sum+=val; if(amax<val) amax=val; if(amin>val) amin=val} }
@@ -19,13 +16,11 @@ function parseResults(){
       } else {
         median=(a[(n / 2)] + a[(n / 2) + 1]) / 2.0;
       }; printf "{\"score\": %.4f, \"avg\": %.4f, \"median\": %.4f, \"min\": %.4f, \"max\": %.4f, \"count\": %d}", sum, sum/count, median, amin, amax , count
-    }' || (STATUS=1; echo "\"[ERROR] Something went wrong in parsing the CPU score\""; exit 1)`
-  echo laststatus=$?
-  echo STATUS=$STATUS
-
+    }' || (echo "\"[ERROR] Something went wrong in parsing the CPU score\""; exit 1)`
+  parsestatus=$?
   export resJSON
-
-  return $STATUS
+  echo "parseResults completed (status=$parsestatus)"
+  return $parsestatus
 }
 
 export resJSON='""'
-- 
GitLab


From 4d7feef45b40792ee7c0cd140a9e207933291c1c Mon Sep 17 00:00:00 2001
From: Andrea Valassi <andrea.valassi@cern.ch>
Date: Mon, 22 Jul 2019 16:57:55 +0200
Subject: [PATCH 2/2] Move good_1 to bad_1: this is a silently failing job
 (BMK-129)

---
 atlas/sim/atlas-sim/atlas-sim-bmk.sh                            | 2 +-
 .../sim/atlas-sim/jobs/{good_1 => bad_1}/atlas-sim_summary.json | 0
 .../atlas-sim/jobs/{good_1 => bad_1}/atlas-sim_summary_new.json | 0
 atlas/sim/atlas-sim/jobs/{good_1 => bad_1}/cishortlog.txt       | 0
 atlas/sim/atlas-sim/jobs/{good_1 => bad_1}/joburl.txt           | 0
 .../sim/atlas-sim/jobs/{good_1 => bad_1}/proc_1/jobReport.json  | 0
 .../sim/atlas-sim/jobs/{good_1 => bad_1}/proc_1/log.EVNTtoHITS  | 0
 .../jobs/{good_1 => bad_1}/proc_1/mem.summary.EVNTtoHITS.json   | 0
 atlas/sim/atlas-sim/jobs/{good_1 => bad_1}/proc_1/out_1.log     | 0
 .../sim/atlas-sim/jobs/{good_1 => bad_1}/proc_2/jobReport.json  | 0
 .../sim/atlas-sim/jobs/{good_1 => bad_1}/proc_2/log.EVNTtoHITS  | 0
 .../jobs/{good_1 => bad_1}/proc_2/mem.summary.EVNTtoHITS.json   | 0
 atlas/sim/atlas-sim/jobs/{good_1 => bad_1}/proc_2/out_2.log     | 0
 atlas/sim/atlas-sim/jobs/{good_1 => bad_1}/summary.json         | 0
 atlas/sim/atlas-sim/jobs/refjob                                 | 2 +-
 15 files changed, 2 insertions(+), 2 deletions(-)
 rename atlas/sim/atlas-sim/jobs/{good_1 => bad_1}/atlas-sim_summary.json (100%)
 rename atlas/sim/atlas-sim/jobs/{good_1 => bad_1}/atlas-sim_summary_new.json (100%)
 rename atlas/sim/atlas-sim/jobs/{good_1 => bad_1}/cishortlog.txt (100%)
 rename atlas/sim/atlas-sim/jobs/{good_1 => bad_1}/joburl.txt (100%)
 rename atlas/sim/atlas-sim/jobs/{good_1 => bad_1}/proc_1/jobReport.json (100%)
 rename atlas/sim/atlas-sim/jobs/{good_1 => bad_1}/proc_1/log.EVNTtoHITS (100%)
 rename atlas/sim/atlas-sim/jobs/{good_1 => bad_1}/proc_1/mem.summary.EVNTtoHITS.json (100%)
 rename atlas/sim/atlas-sim/jobs/{good_1 => bad_1}/proc_1/out_1.log (100%)
 rename atlas/sim/atlas-sim/jobs/{good_1 => bad_1}/proc_2/jobReport.json (100%)
 rename atlas/sim/atlas-sim/jobs/{good_1 => bad_1}/proc_2/log.EVNTtoHITS (100%)
 rename atlas/sim/atlas-sim/jobs/{good_1 => bad_1}/proc_2/mem.summary.EVNTtoHITS.json (100%)
 rename atlas/sim/atlas-sim/jobs/{good_1 => bad_1}/proc_2/out_2.log (100%)
 rename atlas/sim/atlas-sim/jobs/{good_1 => bad_1}/summary.json (100%)

diff --git a/atlas/sim/atlas-sim/atlas-sim-bmk.sh b/atlas/sim/atlas-sim/atlas-sim-bmk.sh
index f1b89b97..d5aabc3c 100755
--- a/atlas/sim/atlas-sim/atlas-sim-bmk.sh
+++ b/atlas/sim/atlas-sim/atlas-sim-bmk.sh
@@ -26,7 +26,7 @@ function doOne(){
   #  --geometryVersion="default:ATLAS-R2-2016-01-00-01_VALIDATION" --runNumber="407343" --AMITag="s3126" --DataRunNumber="284500" \
   #  --simulator="FullG4" --truthStrategy="MC15aPlus" 2>&1 > out_$1.log; then
   #  echo "Sim_tf.py failed"
-  if ! cp $BMKDIR/jobs/refjob/proc_$1/log.EVNTtoHITS .; then
+  if ! cp $BMKDIR/jobs/bad_1/proc_$1/log.EVNTtoHITS .; then # TEST SILENT FAILURES (BMK-129)
     status=1
     echo -e "\n`date` : Process $i failed\n"
     return $status # BMK-129
diff --git a/atlas/sim/atlas-sim/jobs/good_1/atlas-sim_summary.json b/atlas/sim/atlas-sim/jobs/bad_1/atlas-sim_summary.json
similarity index 100%
rename from atlas/sim/atlas-sim/jobs/good_1/atlas-sim_summary.json
rename to atlas/sim/atlas-sim/jobs/bad_1/atlas-sim_summary.json
diff --git a/atlas/sim/atlas-sim/jobs/good_1/atlas-sim_summary_new.json b/atlas/sim/atlas-sim/jobs/bad_1/atlas-sim_summary_new.json
similarity index 100%
rename from atlas/sim/atlas-sim/jobs/good_1/atlas-sim_summary_new.json
rename to atlas/sim/atlas-sim/jobs/bad_1/atlas-sim_summary_new.json
diff --git a/atlas/sim/atlas-sim/jobs/good_1/cishortlog.txt b/atlas/sim/atlas-sim/jobs/bad_1/cishortlog.txt
similarity index 100%
rename from atlas/sim/atlas-sim/jobs/good_1/cishortlog.txt
rename to atlas/sim/atlas-sim/jobs/bad_1/cishortlog.txt
diff --git a/atlas/sim/atlas-sim/jobs/good_1/joburl.txt b/atlas/sim/atlas-sim/jobs/bad_1/joburl.txt
similarity index 100%
rename from atlas/sim/atlas-sim/jobs/good_1/joburl.txt
rename to atlas/sim/atlas-sim/jobs/bad_1/joburl.txt
diff --git a/atlas/sim/atlas-sim/jobs/good_1/proc_1/jobReport.json b/atlas/sim/atlas-sim/jobs/bad_1/proc_1/jobReport.json
similarity index 100%
rename from atlas/sim/atlas-sim/jobs/good_1/proc_1/jobReport.json
rename to atlas/sim/atlas-sim/jobs/bad_1/proc_1/jobReport.json
diff --git a/atlas/sim/atlas-sim/jobs/good_1/proc_1/log.EVNTtoHITS b/atlas/sim/atlas-sim/jobs/bad_1/proc_1/log.EVNTtoHITS
similarity index 100%
rename from atlas/sim/atlas-sim/jobs/good_1/proc_1/log.EVNTtoHITS
rename to atlas/sim/atlas-sim/jobs/bad_1/proc_1/log.EVNTtoHITS
diff --git a/atlas/sim/atlas-sim/jobs/good_1/proc_1/mem.summary.EVNTtoHITS.json b/atlas/sim/atlas-sim/jobs/bad_1/proc_1/mem.summary.EVNTtoHITS.json
similarity index 100%
rename from atlas/sim/atlas-sim/jobs/good_1/proc_1/mem.summary.EVNTtoHITS.json
rename to atlas/sim/atlas-sim/jobs/bad_1/proc_1/mem.summary.EVNTtoHITS.json
diff --git a/atlas/sim/atlas-sim/jobs/good_1/proc_1/out_1.log b/atlas/sim/atlas-sim/jobs/bad_1/proc_1/out_1.log
similarity index 100%
rename from atlas/sim/atlas-sim/jobs/good_1/proc_1/out_1.log
rename to atlas/sim/atlas-sim/jobs/bad_1/proc_1/out_1.log
diff --git a/atlas/sim/atlas-sim/jobs/good_1/proc_2/jobReport.json b/atlas/sim/atlas-sim/jobs/bad_1/proc_2/jobReport.json
similarity index 100%
rename from atlas/sim/atlas-sim/jobs/good_1/proc_2/jobReport.json
rename to atlas/sim/atlas-sim/jobs/bad_1/proc_2/jobReport.json
diff --git a/atlas/sim/atlas-sim/jobs/good_1/proc_2/log.EVNTtoHITS b/atlas/sim/atlas-sim/jobs/bad_1/proc_2/log.EVNTtoHITS
similarity index 100%
rename from atlas/sim/atlas-sim/jobs/good_1/proc_2/log.EVNTtoHITS
rename to atlas/sim/atlas-sim/jobs/bad_1/proc_2/log.EVNTtoHITS
diff --git a/atlas/sim/atlas-sim/jobs/good_1/proc_2/mem.summary.EVNTtoHITS.json b/atlas/sim/atlas-sim/jobs/bad_1/proc_2/mem.summary.EVNTtoHITS.json
similarity index 100%
rename from atlas/sim/atlas-sim/jobs/good_1/proc_2/mem.summary.EVNTtoHITS.json
rename to atlas/sim/atlas-sim/jobs/bad_1/proc_2/mem.summary.EVNTtoHITS.json
diff --git a/atlas/sim/atlas-sim/jobs/good_1/proc_2/out_2.log b/atlas/sim/atlas-sim/jobs/bad_1/proc_2/out_2.log
similarity index 100%
rename from atlas/sim/atlas-sim/jobs/good_1/proc_2/out_2.log
rename to atlas/sim/atlas-sim/jobs/bad_1/proc_2/out_2.log
diff --git a/atlas/sim/atlas-sim/jobs/good_1/summary.json b/atlas/sim/atlas-sim/jobs/bad_1/summary.json
similarity index 100%
rename from atlas/sim/atlas-sim/jobs/good_1/summary.json
rename to atlas/sim/atlas-sim/jobs/bad_1/summary.json
diff --git a/atlas/sim/atlas-sim/jobs/refjob b/atlas/sim/atlas-sim/jobs/refjob
index 9912a471..2ab05185 120000
--- a/atlas/sim/atlas-sim/jobs/refjob
+++ b/atlas/sim/atlas-sim/jobs/refjob
@@ -1 +1 @@
-good_1
\ No newline at end of file
+bad_1
\ No newline at end of file
-- 
GitLab