diff --git a/common/bmk-driver.sh b/common/bmk-driver.sh index e30533e07ef119febfd9b5e96661eaf61a5efd89..23b1292ed922f2ed0a72181766046753ddf6d78b 100755 --- a/common/bmk-driver.sh +++ b/common/bmk-driver.sh @@ -130,6 +130,7 @@ function usage(){ echo " -W : (bool) store results in directly (default: 0 , current: $skipSubDir)" echo " -c --copies : (int) # identical copies (default $NCOPIES)" echo " -t --threads : (ubt# threads (or processes, or threads*processes) per copy (default $NTHREADS)" + echo " --mp_num : (int) total number of threads (threads*copies)" echo " -e --events : # events per thread (default $NEVENTS_THREAD)" echo " -m --mop : clean working directory mode: none/all/custom (current: $MOP)" echo " -d --debug : debug mode (current: $DEBUG)" @@ -177,7 +178,7 @@ function usage(){ ##################### debug_args=$@ -OPTPARSE=`getopt -o c:t:e:w:Wdhm: --long help,debug,events:,threads:,copies:,mop: -n $bmkScript -- "$@"` +OPTPARSE=`getopt -o c:t:e:w:Wdhm: --long help,debug,events:,threads:,copies:,mop:,mp_num: -n $bmkScript -- "$@"` if [ $? != 0 ] ; then echo "Invalid options provided." >&2 ; usage ; fi eval set -- "$OPTPARSE" @@ -207,6 +208,15 @@ while true; do fi shift 2 ;; + --mp_num ) + if [ $2 -gt 0 ]; then + N_TOTAL_THREADS=$2 + else + echo "[$bmkDriver] ERROR! Invalid argument '--mp_num $2' (must be > 0)" + exit 1 # early termination (invalid arguments to benchmark script) + fi + shift 2 + ;; -e | --events ) if [ $2 -gt 0 ]; then USER_NEVENTS_THREAD=$2 @@ -267,7 +277,7 @@ check_mandatory_functions check_mandatory_variables # Dump all relevant variables after parsing the input arguments -for var in USER_NCOPIES USER_NTHREADS USER_NEVENTS_THREAD; do +for var in USER_NCOPIES USER_NTHREADS USER_NEVENTS_THREAD N_TOTAL_THREADS; do echo "Current value: $var=${!var}" done echo @@ -317,6 +327,11 @@ else echo -e "\n[$bmkDriver] function 'validateInputArguments' completed (status=$fail)\n" fi +if [ "$N_TOTAL_THREADS" != "" ]; then NCOPIES=$((N_TOTAL_THREADS/NTHREADS)); fi +if [ "$(($NTOTALTHREADS%$NTHREADS))))" != "0" ]; then + echo -e "[$bmkDriver] This benchmark uses $NTHREADS and can not fill nm_num ($NTOTALTHREADS) cores \n" +fi + # Set baseWDir and create it if necessary if [ "$skipSubDir" == "1" ]; then baseWDir=${resultsDir} diff --git a/igwn/pe/igwn-pe/parseResults.py b/igwn/pe/igwn-pe/parseResults.py index 601285929cef70f53cdd4bf913a92a4007cdd7f6..48e549663b1ac82e005fe06281b60bfd47b146e9 100755 --- a/igwn/pe/igwn-pe/parseResults.py +++ b/igwn/pe/igwn-pe/parseResults.py @@ -46,4 +46,3 @@ basewdir = os.environ['baseWDir'] with open(basewdir+"/parser_output.json", "w") as OutputFile: json.dump(OutputJSON, OutputFile) -