Skip to content

Commit

Permalink
Merge pull request #33 from redhat-performance/fix_dup_runs
Browse files Browse the repository at this point in the history
Fix extra runs.
  • Loading branch information
dvalinrh authored Oct 10, 2023
2 parents 5454697 + 2f57947 commit db4d607
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 23 deletions.
42 changes: 21 additions & 21 deletions streams/streams_extra/run_stream
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ build_images()
fi
done
fi
echo $streams_exec >> /tmp/dave
}

setup_sizing()
Expand Down Expand Up @@ -260,27 +259,28 @@ do
for iteration in $(seq 1 1 ${iterations})
do
for stream_size in $streams_exec
do
echo run $stream_size >> /tmp/dave
cpus=""
cpu_numa=`lscpu | grep "NUMA node" | grep CPU | cut -d: -f 2 | sed "s/ //g"`
for cpus_add in $cpu_numa; do
cpus=${cpus}${cpus_add}
echo Running on cpus: $cpus
export GOMP_CPU_AFFINITY=$cpus
total_sockets=$[$sockets_add]
if [[ $resultdir != "" ]]; then
lscpu >> ${resultdir}/${stream_size}.out.threads_${OMP_NUM_THREADS}.numb_sockets_${total_sockets}_iter_${iteration}
echo GOMP_CPU_AFFINITY: $cpus >> ${resultdir}/${stream_size}.out.threads_${OMP_NUM_THREADS}.numb_sockets_${total_sockets}_iter_${iteration}
./${stream_size} >> ${resultdir}/${stream_size}.out.threads_${OMP_NUM_THREADS}.numb_sockets_${total_sockets}_iter_${iteration}
else
lscpu
./${stream_size}
echo GOMP_CPU_AFFINITY: $cpus

fi
cpus=${cpus}","
do
separ=""
cpus=""
cpu_numa=`lscpu | grep "NUMA node" | grep CPU | cut -d: -f 2 | sed "s/ //g"`
for cpus_add in $cpu_numa; do
cpus=${cpus}${separ}
cpus=${cpus}${cpus_add}
separ=","
done
echo Running on cpus: $cpus
export GOMP_CPU_AFFINITY=$cpus
total_sockets=$[$sockets_add]
resfile=${stream_size}.out.threads_${OMP_NUM_THREADS}.numb_sockets_${total_sockets}_iter_${iteration}
if [[ $resultdir != "" ]]; then
lscpu >> ${resultdir}/$resfile
echo GOMP_CPU_AFFINITY: $cpus >> ${resultdir}/${resfile}
./${stream_size} >> ${resultdir}/${resfile}
else
lscpu
./${stream_size}
echo GOMP_CPU_AFFINITY: $cpus
fi
done
done
done
6 changes: 4 additions & 2 deletions streams/streams_run
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#

arguments="$@"

curdir=`pwd`
if [[ $0 == "./"* ]]; then
chars=`echo $0 | awk -v RS='/' 'END{print NR-1}'`
Expand Down Expand Up @@ -377,7 +376,10 @@ fi
#

${curdir}/test_tools/gather_data ${curdir}
source test_tools/general_setup "$@"
#
# We want a default of 5 iterations
#
source test_tools/general_setup "$@" --iteration_default 5

if [ ! -f "/tmp/${test_name}.out" ]; then
${TOOLS_BIN}/invoke_test --test_name ${test_name} --command ${0} --options "${arguments}"
Expand Down

0 comments on commit db4d607

Please sign in to comment.