From b3588c25a0e7612601d0525143759eb0bb181159 Mon Sep 17 00:00:00 2001 From: Andrea Valassi <andrea.valassi@cern.ch> Date: Wed, 17 Jul 2019 11:13:05 +0200 Subject: [PATCH 01/12] Add a dummy CI test bmk (BMK-148) --- .gitlab-ci.yml | 19 +++++- test/ci/Dockerfile.append | 3 + test/ci/test-ci.spec | 10 +++ test/ci/test-ci/parseResults.sh | 7 ++ test/ci/test-ci/test-ci-bmk.sh | 114 ++++++++++++++++++++++++++++++++ 5 files changed, 151 insertions(+), 2 deletions(-) create mode 100644 test/ci/Dockerfile.append create mode 100644 test/ci/test-ci.spec create mode 100644 test/ci/test-ci/parseResults.sh create mode 100755 test/ci/test-ci/test-ci-bmk.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3f3da018..f4b543a4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -46,11 +46,26 @@ job_build-hepwlbuilder: when: always ### -### When a new build-image is created run the following test to verify that hep-workload images can be built +### When a new build-image is created run the following tests to verify that hep-workload images can be built +### Run the build of a dummy CI test image ### Run the build of a kv standalone image ### -job_test-hepwlbuilder: +job_test-hepwlbuilder-ci: + variables: + CIENV_HEPWL_SPECFILE: $CI_PROJECT_DIR/test/ci/test-ci.spec + only: + refs: + - qa + changes: + - build-executor/* + - .gitlab-ci.* + - test/ci/* + - test/ci/*/* + <<: *build-hepwl-anchor + stage: test-hepwlbuilder + +job_test-hepwlbuilder-kv: variables: CIENV_HEPWL_SPECFILE: $CI_PROJECT_DIR/atlas/kv/atlas-kv.spec only: diff --git a/test/ci/Dockerfile.append b/test/ci/Dockerfile.append new file mode 100644 index 00000000..26b0f71e --- /dev/null +++ b/test/ci/Dockerfile.append @@ -0,0 +1,3 @@ +# Add here any workload-specific Dockerfile instructions. +# They will be appended to the Dockerfile generated from a common template. + diff --git a/test/ci/test-ci.spec b/test/ci/test-ci.spec new file mode 100644 index 00000000..c68ef3e0 --- /dev/null +++ b/test/ci/test-ci.spec @@ -0,0 +1,10 @@ +# These variables are needed in Dockerfile.template +HEPWL_BMKEXE=test-ci-bmk.sh +HEPWL_BMKDIR=test-ci +HEPWL_BMKDESCRIPTION="DUMMY benchmark for CI tests (based on LHCb setup)" + +# These variables are needed in main.sh +HEPWL_BMKOPTS="-n 1 -e DUMMY" # DUMMY TEST FOR GITLAB CI DEVELOPMENTS +HEPWL_DOCKERIMAGENAME=test-ci-bmk +HEPWL_DOCKERIMAGETAG=ci0.0 +HEPWL_DOCKERIMAGETAG=DUMMY # DUMMY TEST FOR GITLAB CI DEVELOPMENTS diff --git a/test/ci/test-ci/parseResults.sh b/test/ci/test-ci/parseResults.sh new file mode 100644 index 00000000..14e85f3d --- /dev/null +++ b/test/ci/test-ci/parseResults.sh @@ -0,0 +1,7 @@ +function generateSummary(){ + echo -e "{ \"copies\": $ncopies , \"threads_x_copy\": 1 , \"events_x_thread\" : $nevents , \"througput_score\" : 1 , \"log\": \"OK\", \"app\":`cat $BMKDIR/version.json` }" > $BASE_WDIR/test-ci_summary.json + cat $BASE_WDIR/test-ci_summary.json +} + +function parseResults(){ +} diff --git a/test/ci/test-ci/test-ci-bmk.sh b/test/ci/test-ci/test-ci-bmk.sh new file mode 100755 index 00000000..15f6f6da --- /dev/null +++ b/test/ci/test-ci/test-ci-bmk.sh @@ -0,0 +1,114 @@ +#!/bin/bash + +#set -x # enable debug printouts + +#set -e # immediate exit on error + +function doOne(){ + [ $DEBUG -gt 0 ] && echo "`date` : start process $i"; + sleep 5 + WDIR=$BASE_WDIR/proc_$1 + [ $DEBUG -gt 0 ] && echo $WDIR + [ -e $WDIR ] && rm -f $WDIR + mkdir -p $WDIR + cd $WDIR + date + if [ "$nevents" == "1" ]; then + echo "FASTER DUMMY TEST" 2>&1 >out_$1.log # FASTER DUMMY TEST FOR GITLAB CI DEVELOPMENTS + else + source /cvmfs/lhcb.cern.ch/lib/LbLogin.sh + lb-run --use-sp -c x86_64-slc6-gcc48-opt --use="AppConfig v3r335" --use="DecFiles v30r11" --use="ProdConf" Gauss/v49r9 echo "DEFAULT DUMMY TEST" 2>&1 >out_$1.log # DEFAULT DUMMY TEST FOR GITLAB CI DEVELOPMENTS + else + fi + status=${?} + date + if [ "$status" != "0" ]; then + echo "Process $i failed" + return $status + else + [ $DEBUG -gt 0 ] && echo "Process $i succesfully completed" + return 0 + fi +} + +echo "[test-ci-bmk.sh] starting at $(date)" + +cd `dirname $0` +export BMKDIR=`pwd` +. $BMKDIR/parseResults.sh + +export APP=`basename $0 -bmk.sh` +export RESULTS_DIR=/results + +export DATETAG=`date +%s` +export NTHREADS=1 #Num Threads per copy + +export DEBUG=0 +export ncopies=`nproc` +export nevents=1 # Num Events per thread + +function usage(){ + echo "Usage: $0 [-n <num_copies [1]>] [-e <num_events [5]>] [-w <results_dir [$RESULTS_DIR]>] [-d (enable debug printouts)]" + echo " num_events=1: dummy HalloWorld test (faster)" + echo " num_events>1: dummy LHCb setup test (default)" + exit 1 +} + +while getopts "w:n:e:d" o; do + case ${o} in + w) + RESULTS_DIR=$OPTARG + ;; + n) + if [ $OPTARG -gt 0 ]; then + ncopies=$OPTARG + else + echo "ERROR! Invalid argument '-n $OPTARG'" + exit 1 + fi + ;; + e) + if [ $OPTARG -gt 0 ]; then + nevents=$OPTARG + else + echo "ERROR! Invalid argument '-e $OPTARG'" + exit 1 + fi + ;; + d) + DEBUG=1 + ;; + *) + usage + ;; + esac +done + +export BASE_WDIR=${RESULTS_DIR}/${APP}-n${ncopies}-e${nevents}-${DATETAG}_$(((RANDOM%9000)+1000)) +echo "BASE WORKING DIR=$BASE_WDIR" + +for i in `seq 1 $ncopies`; +do + ( doOne $i; )& +done + +status=0 +FAIL=0 +for job in `jobs -p` +do + [ $DEBUG -gt 0 ] && echo "...waiting forked process " $job + wait $job || let "FAIL+=1" +done +[ $DEBUG -gt 0 ] && echo "FAILS " $FAIL + +if [ $FAIL -gt 0 ]; then s_msg="[test-ci-bmk.sh] ERROR: $FAIL subprocess(es) failed"; echo $s_msg; generateSummary; exit $FAIL; fi + +if [ "$nevents" != "DUMMY" ]; then + parseResults + status=$? + if [ "$status" != "0" ]; then s_msg="[test-ci-bmk.sh] ERROR: parseResults failed"; echo $s_msg; fi + generateSummary + exit $status +fi + +echo "[test-ci-bmk.sh] finished at $(date)" -- GitLab From 1c14d83a595e36540b04af4b27147183dbf5c7ad Mon Sep 17 00:00:00 2001 From: Andrea Valassi <andrea.valassi@cern.ch> Date: Wed, 17 Jul 2019 11:13:31 +0200 Subject: [PATCH 02/12] Remove build-executor/singularity from yaml (BMK-77) --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f4b543a4..770991c8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -73,7 +73,6 @@ job_test-hepwlbuilder-kv: - qa changes: - build-executor/* - - build-executor/singularity/* - .gitlab-ci.* <<: *build-hepwl-anchor stage: test-hepwlbuilder -- GitLab From 4e1c59beac4817a461e7f73ac9f54bc847442bbb Mon Sep 17 00:00:00 2001 From: Andrea Valassi <andrea.valassi@cern.ch> Date: Wed, 17 Jul 2019 11:28:46 +0200 Subject: [PATCH 03/12] Fix test-ci.spec --- test/ci/test-ci.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/ci/test-ci.spec b/test/ci/test-ci.spec index c68ef3e0..0342cc05 100644 --- a/test/ci/test-ci.spec +++ b/test/ci/test-ci.spec @@ -4,7 +4,7 @@ HEPWL_BMKDIR=test-ci HEPWL_BMKDESCRIPTION="DUMMY benchmark for CI tests (based on LHCb setup)" # These variables are needed in main.sh -HEPWL_BMKOPTS="-n 1 -e DUMMY" # DUMMY TEST FOR GITLAB CI DEVELOPMENTS +###HEPWL_BMKOPTS="-n 1 -e 1" # DUMMY HalloWorld TEST (FASTEST) +HEPWL_BMKOPTS="-n 1" # DUMMY LHCbSETUP TEST (DEFAULT) HEPWL_DOCKERIMAGENAME=test-ci-bmk HEPWL_DOCKERIMAGETAG=ci0.0 -HEPWL_DOCKERIMAGETAG=DUMMY # DUMMY TEST FOR GITLAB CI DEVELOPMENTS -- GitLab From db846725b01a28712c685ea4d036341054bd28e4 Mon Sep 17 00:00:00 2001 From: Andrea Valassi <andrea.valassi@cern.ch> Date: Wed, 17 Jul 2019 11:40:30 +0200 Subject: [PATCH 04/12] Fix CI after moving the clear_images script --- .gitlab-ci.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.sh b/.gitlab-ci.sh index b52c1665..2c514088 100755 --- a/.gitlab-ci.sh +++ b/.gitlab-ci.sh @@ -135,7 +135,7 @@ if [ "$stage" == "build" ]; then # Clean up: clear old docker images echo -e "\n\n--------------\n Clean up docker images\n--------------\n" - $CI_PROJECT_DIR/test/clear_images.sh + $CI_PROJECT_DIR/scripts/clear_images.sh # Exit the CI with the return code of docker run echo -e "\n\nTerminating with exit status $status" -- GitLab From fcb17a763d6e9c88b3bb6ad8eb1376ed4d2d84da Mon Sep 17 00:00:00 2001 From: Andrea Valassi <andrea.valassi@cern.ch> Date: Wed, 17 Jul 2019 11:51:23 +0200 Subject: [PATCH 05/12] Add cvmfsrepos for ci test --- test/ci/test-ci.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/test/ci/test-ci.spec b/test/ci/test-ci.spec index 0342cc05..65dc6571 100644 --- a/test/ci/test-ci.spec +++ b/test/ci/test-ci.spec @@ -8,3 +8,4 @@ HEPWL_BMKDESCRIPTION="DUMMY benchmark for CI tests (based on LHCb setup)" HEPWL_BMKOPTS="-n 1" # DUMMY LHCbSETUP TEST (DEFAULT) HEPWL_DOCKERIMAGENAME=test-ci-bmk HEPWL_DOCKERIMAGETAG=ci0.0 +HEPWL_CVMFSREPOS=lhcb.cern.ch -- GitLab From 2dce277ac5485de4c44ef3f8419a787962da7cbb Mon Sep 17 00:00:00 2001 From: Andrea Valassi <andrea.valassi@cern.ch> Date: Wed, 17 Jul 2019 11:53:24 +0200 Subject: [PATCH 06/12] Fix the ci test --- test/ci/test-ci/test-ci-bmk.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/test/ci/test-ci/test-ci-bmk.sh b/test/ci/test-ci/test-ci-bmk.sh index 15f6f6da..d2788c3b 100755 --- a/test/ci/test-ci/test-ci-bmk.sh +++ b/test/ci/test-ci/test-ci-bmk.sh @@ -18,7 +18,6 @@ function doOne(){ else source /cvmfs/lhcb.cern.ch/lib/LbLogin.sh lb-run --use-sp -c x86_64-slc6-gcc48-opt --use="AppConfig v3r335" --use="DecFiles v30r11" --use="ProdConf" Gauss/v49r9 echo "DEFAULT DUMMY TEST" 2>&1 >out_$1.log # DEFAULT DUMMY TEST FOR GITLAB CI DEVELOPMENTS - else fi status=${?} date -- GitLab From 881240aa200202fb5b32cc015ec6a2e0626d19f9 Mon Sep 17 00:00:00 2001 From: Andrea Valassi <andrea.valassi@cern.ch> Date: Wed, 17 Jul 2019 11:56:21 +0200 Subject: [PATCH 07/12] Fix empty parseResults --- test/ci/test-ci/parseResults.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/ci/test-ci/parseResults.sh b/test/ci/test-ci/parseResults.sh index 14e85f3d..32586475 100644 --- a/test/ci/test-ci/parseResults.sh +++ b/test/ci/test-ci/parseResults.sh @@ -1,7 +1,9 @@ function generateSummary(){ + echo "[${FUNCNAME[0]}] Generate json summary" echo -e "{ \"copies\": $ncopies , \"threads_x_copy\": 1 , \"events_x_thread\" : $nevents , \"througput_score\" : 1 , \"log\": \"OK\", \"app\":`cat $BMKDIR/version.json` }" > $BASE_WDIR/test-ci_summary.json cat $BASE_WDIR/test-ci_summary.json } function parseResults(){ + echo "[${FUNCNAME[0]}] Nothing to parse" } -- GitLab From 7a1899288df08e2e7b7d7cd65a42d300afc6f151 Mon Sep 17 00:00:00 2001 From: Andrea Valassi <andrea.valassi@cern.ch> Date: Wed, 17 Jul 2019 12:05:41 +0200 Subject: [PATCH 08/12] Minor improvements to dummy CI tests --- test/ci/test-ci/parseResults.sh | 4 +++- test/ci/test-ci/test-ci-bmk.sh | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/test/ci/test-ci/parseResults.sh b/test/ci/test-ci/parseResults.sh index 32586475..c9bf0ffd 100644 --- a/test/ci/test-ci/parseResults.sh +++ b/test/ci/test-ci/parseResults.sh @@ -5,5 +5,7 @@ function generateSummary(){ } function parseResults(){ - echo "[${FUNCNAME[0]}] Nothing to parse" + echo "[${FUNCNAME[0]}] BASE_WDIR=$BASE_WDIR" + echo "[${FUNCNAME[0]}] Parsing results from " $BASE_WDIR/proc_*/out_*.log + for f in $BASE_WDIR/proc_*/out_*.log; do echo "[${FUNCNAME[0]}] === $f"; cat $f; done } diff --git a/test/ci/test-ci/test-ci-bmk.sh b/test/ci/test-ci/test-ci-bmk.sh index d2788c3b..29d56708 100755 --- a/test/ci/test-ci/test-ci-bmk.sh +++ b/test/ci/test-ci/test-ci-bmk.sh @@ -14,10 +14,10 @@ function doOne(){ cd $WDIR date if [ "$nevents" == "1" ]; then - echo "FASTER DUMMY TEST" 2>&1 >out_$1.log # FASTER DUMMY TEST FOR GITLAB CI DEVELOPMENTS - else source /cvmfs/lhcb.cern.ch/lib/LbLogin.sh - lb-run --use-sp -c x86_64-slc6-gcc48-opt --use="AppConfig v3r335" --use="DecFiles v30r11" --use="ProdConf" Gauss/v49r9 echo "DEFAULT DUMMY TEST" 2>&1 >out_$1.log # DEFAULT DUMMY TEST FOR GITLAB CI DEVELOPMENTS + lb-run --use-sp -c x86_64-slc6-gcc48-opt --use="AppConfig v3r335" --use="DecFiles v30r11" --use="ProdConf" Gauss/v49r9 echo "LHCb setup (DEFAULT DUMMY TEST)" 2>&1 >out_$1.log + else + echo "Hallo World! (FASTER DUMMY TEST)" 2>&1 >out_$1.log fi status=${?} date -- GitLab From 78a64f6de183b6f904fa295a10e36f69b7cf99f1 Mon Sep 17 00:00:00 2001 From: Andrea Valassi <andrea.valassi@cern.ch> Date: Wed, 17 Jul 2019 12:07:10 +0200 Subject: [PATCH 09/12] Remove DUMMY test from LHCb, moved to test/ci (BMK-148) --- lhcb/gen-sim/lhcb-gen-sim.spec | 5 ---- lhcb/gen-sim/lhcb-gen-sim/lhcb-gen-sim-bmk.sh | 25 ++++++------------- 2 files changed, 8 insertions(+), 22 deletions(-) diff --git a/lhcb/gen-sim/lhcb-gen-sim.spec b/lhcb/gen-sim/lhcb-gen-sim.spec index 0491fe7e..799152f1 100644 --- a/lhcb/gen-sim/lhcb-gen-sim.spec +++ b/lhcb/gen-sim/lhcb-gen-sim.spec @@ -1,12 +1,7 @@ -# These variables are needed in Dockerfile.template HEPWL_BMKEXE=lhcb-gen-sim-bmk.sh HEPWL_BMKDIR=lhcb-gen-sim HEPWL_BMKDESCRIPTION="LHCb GEN-SIM benchmark" - -# These variables are needed in main.sh HEPWL_BMKOPTS="-n 1 -e 2" -###HEPWL_BMKOPTS="-n 1 -e DUMMY" # DUMMY TEST FOR GITLAB CI DEVELOPMENTS HEPWL_DOCKERIMAGENAME=lhcb-gen-sim-bmk HEPWL_DOCKERIMAGETAG=testv0.6 -###HEPWL_DOCKERIMAGETAG=DUMMY # DUMMY TEST FOR GITLAB CI DEVELOPMENTS HEPWL_CVMFSREPOS=lhcb.cern.ch diff --git a/lhcb/gen-sim/lhcb-gen-sim/lhcb-gen-sim-bmk.sh b/lhcb/gen-sim/lhcb-gen-sim/lhcb-gen-sim-bmk.sh index 66b26e4a..a4e3dafa 100755 --- a/lhcb/gen-sim/lhcb-gen-sim/lhcb-gen-sim-bmk.sh +++ b/lhcb/gen-sim/lhcb-gen-sim/lhcb-gen-sim-bmk.sh @@ -17,12 +17,7 @@ function doOne(){ date strace="" ###strace="strace -tt -f -o out_$1_strace0.txt" # optionally produce a strace output - if [ "$nevents" == "DUMMY" ]; then - ###${strace} lb-run --use-sp -c x86_64-slc6-gcc48-opt --use="AppConfig v3r335" --use="DecFiles v30r11" --use="ProdConf" Gauss/v49r9 echo "DUMMY TEST" 2>&1 >out_$1.log # DUMMY TEST FOR GITLAB CI DEVELOPMENTS - echo "FASTER DUMMY TEST" 2>&1 >out_$1.log # FASTER DUMMY TEST FOR GITLAB CI DEVELOPMENTS - else - ${strace} lb-run --use-sp -c x86_64-slc6-gcc48-opt --use="AppConfig v3r335" --use="DecFiles v30r11" --use="ProdConf" Gauss/v49r9 gaudirun.py -T '$APPCONFIGOPTS/Gauss/Beam6500GeV-md100-2016-nu1.6.py' '$APPCONFIGOPTS/Gauss/EnableSpillover-25ns.py' '$APPCONFIGOPTS/Gauss/DataType-2016.py' '$APPCONFIGOPTS/Gauss/RICHRandomHits.py' '$DECFILESROOT/options/27163076.py' '$LBPYTHIA8ROOT/options/Pythia8.py' '$APPCONFIGOPTS/Gauss/G4PL_FTFP_BERT_EmNoCuts.py' '$APPCONFIGOPTS/Persistency/Compression-ZLIB-1.py' "$WDIR/prodConf_Gauss_00071400_00000089_1.py" 2>&1 >out_$1.log - fi + ${strace} lb-run --use-sp -c x86_64-slc6-gcc48-opt --use="AppConfig v3r335" --use="DecFiles v30r11" --use="ProdConf" Gauss/v49r9 gaudirun.py -T '$APPCONFIGOPTS/Gauss/Beam6500GeV-md100-2016-nu1.6.py' '$APPCONFIGOPTS/Gauss/EnableSpillover-25ns.py' '$APPCONFIGOPTS/Gauss/DataType-2016.py' '$APPCONFIGOPTS/Gauss/RICHRandomHits.py' '$DECFILESROOT/options/27163076.py' '$LBPYTHIA8ROOT/options/Pythia8.py' '$APPCONFIGOPTS/Gauss/G4PL_FTFP_BERT_EmNoCuts.py' '$APPCONFIGOPTS/Persistency/Compression-ZLIB-1.py' "$WDIR/prodConf_Gauss_00071400_00000089_1.py" 2>&1 >out_$1.log status=${?} ###if [ "$strace" != "" ]; then cat out_$1_strace0.txt | grep '"/cvmfs' | awk '{p=$0; while(1){ i1=index(p,"\"/cvmfs"); if (i1<=0) break; p=substr(p,i1+1); i2=index(p,"\""); if (substr(p,i2+1,3)!="...") {print substr(p,0,i2-1)}; p=substr(p,i2+1)} }' | sort -u > out_$1_strace1.txt; fi date @@ -66,9 +61,7 @@ while getopts "w:n:e:dh" o; do fi ;; e) - if [ "$OPTARG" == "DUMMY" ]; then - nevents=$OPTARG - elif [ $OPTARG -gt 0 ]; then + if [ $OPTARG -gt 0 ]; then nevents=$OPTARG else echo "ERROR! Invalid argument '-e $OPTARG'" @@ -79,7 +72,7 @@ while getopts "w:n:e:dh" o; do DEBUG=1 ;; h) - echo "Usage: $0 [-n <num_copies [$ncopies]>] [-e <num_events|DUMMY [$nevents]>] [-w <results_dir [$RESULTS_DIR]>] [-d (enable debug printouts)]" + echo "Usage: $0 [-n <num_copies [$ncopies]>] [-e <num_events [$nevents]>] [-w <results_dir [$RESULTS_DIR]>] [-d (enable debug printouts)]" exit 0 ;; esac @@ -104,12 +97,10 @@ done if [ $FAIL -gt 0 ]; then s_msg="[lhcb-bmk.sh] ERROR: $FAIL subprocess(es) failed"; echo $s_msg; generateSummary; exit $FAIL; fi -if [ "$nevents" != "DUMMY" ]; then - parseResults - status=$? - if [ "$status" != "0" ]; then s_msg="[lhcb-bmk.sh] ERROR: parseResults failed"; echo $s_msg; fi - generateSummary - exit $status -fi +parseResults +status=$? +if [ "$status" != "0" ]; then s_msg="[lhcb-bmk.sh] ERROR: parseResults failed"; echo $s_msg; fi +generateSummary +exit $status echo "[lhcb-bmk.sh] finished at $(date)" -- GitLab From f6b5961fe752ffa207207521408837583df2bb23 Mon Sep 17 00:00:00 2001 From: Andrea Valassi <andrea.valassi@cern.ch> Date: Wed, 17 Jul 2019 12:15:47 +0200 Subject: [PATCH 10/12] Improve CI tests --- test/ci/test-ci.spec | 5 +++-- test/ci/test-ci/test-ci-bmk.sh | 14 +++++++++----- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/test/ci/test-ci.spec b/test/ci/test-ci.spec index 65dc6571..bb94cdae 100644 --- a/test/ci/test-ci.spec +++ b/test/ci/test-ci.spec @@ -4,8 +4,9 @@ HEPWL_BMKDIR=test-ci HEPWL_BMKDESCRIPTION="DUMMY benchmark for CI tests (based on LHCb setup)" # These variables are needed in main.sh -###HEPWL_BMKOPTS="-n 1 -e 1" # DUMMY HalloWorld TEST (FASTEST) -HEPWL_BMKOPTS="-n 1" # DUMMY LHCbSETUP TEST (DEFAULT) +###HEPWL_BMKOPTS="-n 1 -e 1" # DUMMY HalloWorld TEST (FASTER) +HEPWL_BMKOPTS="-n 1 -e 2" # DUMMY LHCb setup TEST (DEFAULT) +###HEPWL_BMKOPTS="-n 1 -e 3" # DUMMY LHCb Gauss setup TEST (SLOWER) HEPWL_DOCKERIMAGENAME=test-ci-bmk HEPWL_DOCKERIMAGETAG=ci0.0 HEPWL_CVMFSREPOS=lhcb.cern.ch diff --git a/test/ci/test-ci/test-ci-bmk.sh b/test/ci/test-ci/test-ci-bmk.sh index 29d56708..39c6f5a1 100755 --- a/test/ci/test-ci/test-ci-bmk.sh +++ b/test/ci/test-ci/test-ci-bmk.sh @@ -14,10 +14,13 @@ function doOne(){ cd $WDIR date if [ "$nevents" == "1" ]; then - source /cvmfs/lhcb.cern.ch/lib/LbLogin.sh - lb-run --use-sp -c x86_64-slc6-gcc48-opt --use="AppConfig v3r335" --use="DecFiles v30r11" --use="ProdConf" Gauss/v49r9 echo "LHCb setup (DEFAULT DUMMY TEST)" 2>&1 >out_$1.log - else echo "Hallo World! (FASTER DUMMY TEST)" 2>&1 >out_$1.log + elif [ "$nevents" == "2" ]; then + source /cvmfs/lhcb.cern.ch/lib/LbLogin.sh 2>&1 >out_$1.log + echo "LHCb setup (DEFAULT DUMMY TEST)" 2>&1 >>out_$1.log + else + source /cvmfs/lhcb.cern.ch/lib/LbLogin.sh 2>&1 >out_$1.log + lb-run --use-sp -c x86_64-slc6-gcc48-opt --use="AppConfig v3r335" --use="DecFiles v30r11" --use="ProdConf" Gauss/v49r9 echo "LHCb Gauss setup (SLOWER DUMMY TEST)" 2>&1 >>out_$1.log fi status=${?} date @@ -44,12 +47,13 @@ export NTHREADS=1 #Num Threads per copy export DEBUG=0 export ncopies=`nproc` -export nevents=1 # Num Events per thread +export nevents=2 # Num Events per thread function usage(){ echo "Usage: $0 [-n <num_copies [1]>] [-e <num_events [5]>] [-w <results_dir [$RESULTS_DIR]>] [-d (enable debug printouts)]" echo " num_events=1: dummy HalloWorld test (faster)" - echo " num_events>1: dummy LHCb setup test (default)" + echo " num_events=2: dummy LHCb setup test (default)" + echo " num_events>2: dummy LHCb Gauss setup test (slower)" exit 1 } -- GitLab From f8266faf060be6b6ed009d21a7d3a5dc8cdc4074 Mon Sep 17 00:00:00 2001 From: Andrea Valassi <andrea.valassi@cern.ch> Date: Wed, 17 Jul 2019 12:18:57 +0200 Subject: [PATCH 11/12] Minor improvements --- test/ci/test-ci/parseResults.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/ci/test-ci/parseResults.sh b/test/ci/test-ci/parseResults.sh index c9bf0ffd..7243a2e3 100644 --- a/test/ci/test-ci/parseResults.sh +++ b/test/ci/test-ci/parseResults.sh @@ -6,6 +6,6 @@ function generateSummary(){ function parseResults(){ echo "[${FUNCNAME[0]}] BASE_WDIR=$BASE_WDIR" - echo "[${FUNCNAME[0]}] Parsing results from " $BASE_WDIR/proc_*/out_*.log - for f in $BASE_WDIR/proc_*/out_*.log; do echo "[${FUNCNAME[0]}] === $f"; cat $f; done + echo "[${FUNCNAME[0]}] Available log files: " $BASE_WDIR/proc_*/out_*.log + for f in $BASE_WDIR/proc_*/out_*.log; do echo "[${FUNCNAME[0]}] --> Parsing results from $f"; cat $f; done } -- GitLab From 0adfde59e8d16228b7c3334497110171111f7452 Mon Sep 17 00:00:00 2001 From: Andrea Valassi <andrea.valassi@cern.ch> Date: Wed, 17 Jul 2019 12:29:51 +0200 Subject: [PATCH 12/12] Cosmetics --- test/ci/test-ci/parseResults.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ci/test-ci/parseResults.sh b/test/ci/test-ci/parseResults.sh index 7243a2e3..ca4c067f 100644 --- a/test/ci/test-ci/parseResults.sh +++ b/test/ci/test-ci/parseResults.sh @@ -6,6 +6,6 @@ function generateSummary(){ function parseResults(){ echo "[${FUNCNAME[0]}] BASE_WDIR=$BASE_WDIR" - echo "[${FUNCNAME[0]}] Available log files: " $BASE_WDIR/proc_*/out_*.log + echo "[${FUNCNAME[0]}] Available log files:" $BASE_WDIR/proc_*/out_*.log for f in $BASE_WDIR/proc_*/out_*.log; do echo "[${FUNCNAME[0]}] --> Parsing results from $f"; cat $f; done } -- GitLab