Skip to content
Snippets Groups Projects
Commit 8aab2f43 authored by Domenico Giordano's avatar Domenico Giordano
Browse files

BMK-36, updated the alice script to use new version

parent 4fdd4c27
No related branches found
No related tags found
No related merge requests found
......@@ -12,36 +12,15 @@ function doOne(){
ln -s $BMKDIR/environment environment
ln -s $BMKDIR/GeneratorCustom.C GeneratorCustom.C
ln -s $BMKDIR/GenParamCustomSingle.C GenParamCustomSingle.C
ln -s $BMKDIR/OCDBrec.root OCDBrec.root
ln -s $BMKDIR/OCDBsim.root OCDBsim.root
ln -s $BMKDIR/data/OCDBrec.root OCDBrec.root
ln -s $BMKDIR/data/OCDBsim.root OCDBsim.root
./dpgsim.sh --run 264035 --mode sim --uid 1 --nevents $nevents --generator Custom --system 2>&1 > out_$1.log
./dpgsim.sh --run 292839 --mode sim --uid 1 --nevents $nevents --generator Custom --system 2>&1 > out_$1.log
[ $DEBUG -gt 0 ] && echo -e "\n`date` : done process $i\n"
}
function parseResults(){
STATUS=0
echo "Parsing results from " $BASE_WDIR/proc_*/time.useronly
#Parsing Event Throughput: xxxx ev/s
res=` cat $BASE_WDIR/proc_*/time.useronly | awk -v nevents=$nevents '
BEGIN{amin=1000000;amax=0;count=0;}
{ if ($1>0) {val=( int(nevents*1.) / int($1*1.) ); a[count]=val; count+=1; sum+=val; if(amax<val) amax=val; if(amin>val) amin=val} }
END{sep=sprintf("%*s", 120, "");gsub(/ /, "*", sep);n=asort(a);
if (n % 2) {
median=a[(n + 1) / 2];
} else {
median=(a[(n / 2)] + a[(n / 2) + 1]) / 2.0;
}; printf "{\"score\": %.4f, \"avg\": %.4f, \"median\": %.4f, \"min\": %.4f, \"max\": %.4f}", sum, sum/count, median, amin, amax
}' || (STATUS=1; echo "\"[ERROR] Something went wrong in parsing the CPU score\"")`
echo -e "{\"copies\":$ncopies , \"threads_x_copy\":$NTHREADS , \"events_x_thread\" : $nevents , \"CPU_score\": $res , \"app\": \"ALICE_pp_dpgsim\"}" > $BASE_WDIR/${APP}_summary.json
cat $BASE_WDIR/${APP}_summary.json
return $STATUS
}
export APP=`basename $0 -bmk.sh`
export RESULTS_DIR=/results
......@@ -69,7 +48,7 @@ while getopts "w:n:e:dh" o; do
DEBUG=1
;;
h)
echo "usage: $0 [-e <num_events_x_thread [$nevents]>] -n <num_copies [$ncopies]> [-d (for debug verbosity)] -w"
echo "usage: $0 [-e <num_events_x_thread [$nevents]>] -n <num_copies [$ncopies]> [-d (for debug verbosity)] [-w result_dir]"
exit 0
;;
esac
......@@ -89,11 +68,12 @@ echo "nevents x thread=$nevents"
cd `dirname $0`
export BMKDIR=`pwd`
export BASE_WDIR=${RESULTS_DIR}/test_${APP}-n${ncopies}-e${nevents}-${DATETAG}_$(((RANDOM%9000)+1000))
export BASE_WDIR=${RESULTS_DIR}/${APP}-n${ncopies}-e${nevents}-${DATETAG}_$(((RANDOM%9000)+1000))
echo "BASE WORKING DIR=$BASE_WDIR"
/cvmfs/alice.cern.ch/bin/alienv printenv VO_ALICE@AliDPG::v5-09-XX-15,VO_ALICE@AliPhysics::v5-09-09-01-1 &>environment
/cvmfs/alice.cern.ch/bin/alienv printenv VO_ALICE@AliDPG::prod-201901-02-1,VO_ALICE@AliPhysics::v5-09-45a-01-1 &>environment
source environment
......@@ -113,5 +93,6 @@ do
done
[ $DEBUG -gt 0 ] && echo "FAILS " $FAIL
. ./parseResults.sh
parseResults
exit $?
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment