Skip to content
Snippets Groups Projects

BMK-64: fix parameters and add checksum

Merged Domenico Giordano requested to merge BMK-64 into qa
5 files
+ 43
43
Compare changes
  • Side-by-side
  • Inline
Files
5
@@ -28,7 +28,6 @@ function doOne(){
[ $DEBUG -gt 0 ] && echo -e "\n`date` : done process $i\n"
}
export APP=`basename $0 -bmk.sh`
export RESULTS_DIR=/results
@@ -36,27 +35,36 @@ cd `dirname $0`
export BMKDIR=`pwd`
export DATETAG=`date +%s`
export NTHREADS=8 #Num Threads per copy
export NTHREADS=8 #Default Num Threads per copy
export ncopies=$((`nproc`/$NTHREADS))
#when $NTHREADS > nproc
if [ "$ncopies" -lt 1 ]; then
ncopies=1
NTHREADS=$((`nproc`/$ncopies))
fi
export DEBUG=0
export nevents_thread=20 #Num Events per thread
. $BMKDIR/parseResults.sh
user_ncopies=""
user_threads=""
while getopts "w:n:e:t:dh" o; do
case ${o} in
w)
RESULTS_DIR=$OPTARG
;;
n)
[ $OPTARG -gt 0 ] && ncopies=$OPTARG
[ $OPTARG -gt 0 ] && user_ncopies=$OPTARG
;;
e)
[ $OPTARG -gt 0 ] && nevents_thread=$OPTARG
[ $OPTARG -gt 0 ] && nevents_thread=$OPTARG
;;
t)
[ $OPTARG -gt 0 ] && NTHREADS=$OPTARG
[ $OPTARG -gt 0 ] && user_nthreads=$OPTARG
;;
d)
DEBUG=1
@@ -68,28 +76,39 @@ while getopts "w:n:e:t:dh" o; do
esac
done
if [ "$user_nthreads" != "" ] && [ "$user_ncopies" != "" ]; then
ncopies=$user_ncopies
NTHREADS=$user_nthreads
elif [ "$user_nthreads" != "" ]; then
NTHREADS=$user_nthreads
ncopies=$((`nproc`/$NTHREADS))
else
ncopies=$user_ncopies
NTHREADS=$((`nproc`/$ncopies))
fi
export s_msg="ok"
export nevents=$(($nevents_thread*$NTHREADS))
[ $(($ncopies*$NTHREADS)) -gt `nproc` ] && s_msg="[ERROR] ncopies*NTHREADS ($ncopies*$NTHREADS=$(($ncopies*$NTHREADS))) > number of available cores (`nproc`)" && generateSummary && exit 1
tot_load=$(($ncopies*$NTHREADS))
[ $tot_load -gt `nproc` ] && s_msg="[ERROR] ncopies*NTHREADS=$ncopies*$NTHREADS=$tot_load > number of available cores (`nproc`)" && generateSummary && exit 1
[ $tot_load -eq 0 ] && s_msg="[ERROR] ncopies*NTHREADS=$ncopies*$NTHREADS=$tot_load. Please fix it" && generateSummary && exit 1
[ $(($ncopies*$NTHREADS)) -ne `nproc` ] && s_msg="[WARNING] ncopies*NTHREADS ($ncopies*$NTHREADS=$(($ncopies*$NTHREADS))) != number of available cores (`nproc`)"
[ $tot_load -ne `nproc` ] && s_msg="[WARNING] ncopies*NTHREADS ($ncopies*$NTHREADS=$tot_load) != `nproc` (number of available cores)" && echo $s_msg
#export job_events=$(($nevents * NTHREADS))
export ATHENA_PROC_NUMBER=$NTHREADS #enc variable for ATHENA threads number
echo "threads_x_copy=$NTHREADS"
echo "ncopies=$ncopies"
echo "nevents_x_thread=$nevents_thread"
export BASE_WDIR=${RESULTS_DIR}/${APP}-n${ncopies}-t${NTHREADS}-e${nevents_thread}-${DATETAG}_$(((RANDOM%9000)+1000))
echo "BASE WORKING DIR=$BASE_WDIR"
release=21.0.15
export ATLAS_LOCAL_ROOT_BASE=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase
source ${ATLAS_LOCAL_ROOT_BASE}/user/atlasLocalSetup.sh -q
asetup --cmtconfig=x86_64-slc6-gcc49-opt AtlasOffline,${release}
Loading