1919mem_offset=0
2020numa_iterations=10
2121arguments="$@"
22+ pcp=""
23+ pdir=""
2224
2325curdir=`pwd`
2426if [[ $0 == "./"* ]]; then
@@ -93,7 +95,7 @@ process_results()
9395 # Sort the data based on # sockets. To do this, dump the data to a temp
9496 # file and sort it. We expect the results file to already be sorted based on size.
9597 #
96- data_file=$(mktemp /tmp/streams_reduce_ .XXXXXX)
98+ data_file=$(mktemp /tmp/numa_streams_reduce_ .XXXXXX)
9799 for item in ${data[*]}; do
98100 if [ $item_count -eq $data_index ]; then
99101 break;
@@ -242,7 +244,7 @@ retrieve_sys_config()
242244 echo "% Socket(s) "`grep "Socket(s):" stream* | cut -d: -f 3 | sort -u` >> ../results_${test_name}.csv
243245 echo "% Model_name "`grep "^Model name" stream* | cut -d: -f 3 | sort -u` >> ../results_${test_name}.csv
244246 echo "% total_memory "`grep "MemTotal:" /proc/meminfo | cut -d':' -f 2 | sed "s/ //g"` >> ../results_${test_name}.csv
245- echo "% streams_version_ # "`grep "^STREAM version" stream * | cut -d':' -f 3 | cut -d' ' -f2 | sort -u` >> ../results_${test_name}.csv
247+ echo "% numa_streams_version_ # "`grep "^Numa version" numa_stream * | cut -d':' -f 3 | cut -d' ' -f2 | sort -u` >> ../results_${test_name}.csv
246248}
247249
248250#
@@ -256,13 +258,9 @@ set_up_test()
256258 if [[ $results_dir == "" ]]; then
257259 results_dir=results_${test_name}_${to_tuned_setting}_`date +"%Y%m%d%H%M%S"`
258260 fi
259- if [ -d /$run_dir/run_numa_stream ]; then
260- rm -rf /$run_dir/run_numa_stream 2> /dev/null
261- fi
262- if [ -d /tmp/streams_results ]; then
263- rm -rf /tmp/streams_results 2> /dev/null
264- fi
265- mkdir /tmp/streams_results
261+ rm -f /$run_dir/run_numa_stream
262+ rm -rf /tmp/numa_streams_results
263+ mkdir /tmp/numa_streams_results
266264
267265 #
268266 # Setup the run script
@@ -276,15 +274,15 @@ set_up_test()
276274#
277275run_numa_stream()
278276{
279- cd $run_dir
280- ./run_numa_stream --cache_cap_size ${cache_cap_size} --iterations ${to_times_to_run} --cache_start_size $cache_start_factor --optimize_lvl ${1} --cache_multiply $cache_multiply --numb_sizes $nsizes --thread_multiply $threads_multiple --results_dir ${results_dir} --host ${to_configuration} --size_list ${size_list} --numa_iterations=${numa_iterations} --mem_offset=${mem_offset} > /tmp/streams_results /${2}_opt_${1}
281- mv ${results_dir}_* /tmp/streams_results
282- cd ..
277+ pushd $run_dir > /dev/null
278+ ./run_numa_stream --cache_cap_size ${cache_cap_size} --iterations ${to_times_to_run} --cache_start_size $cache_start_factor --optimize_lvl ${1} --cache_multiply $cache_multiply --numb_sizes $nsizes --thread_multiply $threads_multiple --results_dir ${results_dir} --host ${to_configuration} --size_list ${size_list} --numa_iterations=${numa_iterations} --mem_offset=${mem_offset} ${pcp} > /tmp/numa_streams_results /${2}_opt_${1}
279+ mv ${results_dir}_* /tmp/numa_streams_results
280+ popd > /dev/null
283281}
284282
285- streams_run ()
283+ numa_streams_run ()
286284{
287- run_numa_stream 3 "streams_O3_ ${to_tuned_setting}.out"
285+ run_numa_stream 3 "numa_streams_O3_ ${to_tuned_setting}.out"
288286}
289287
290288tools_git=https://github.com/redhat-performance/test_tools-wrappers
353351# to_home_root: home directory
354352# to_configuration: configuration information
355353# to_times_to_run: number of times to run the test
356- # to_pbench: Run the test via pbench
357- # to_puser: User running pbench
358354# to_run_label: Label for the run
359355# to_user: User on the test system running the test
360356# to_sys_type: for results info, basically aws, azure or local
364360
365361${curdir}/test_tools/gather_data ${curdir}
366362source test_tools/general_setup "$@"
363+ export TOOLS_BIN
367364
368365if [ ! -f "/tmp/${test_name}.out" ]; then
369366 ${TOOLS_BIN}/invoke_test --test_name ${test_name} --command ${0} --options "${arguments}"
@@ -484,36 +481,32 @@ while [[ $# -gt 0 ]]; do
484481 esac
485482done
486483
487- if [ $to_pbench -eq 1 ]; then
488- $TOOLS_BIN/execute_via_pbench --cmd_executing "$0" $arguments --test $test_name --spacing 11 --pbench_stats $to_pstats
489- else
490- set_up_test
491- streams_run
492- wdir=`pwd`
493- cd /tmp
494- if [[ $results_dir == "" ]]; then
495- results_dir=results_numa_streams_${tuned_setting}_$(date "+%Y.%m.%d-%H.%M.%S")
496- rm results_${test_name}_${tuned_setting} 2> /dev/null
497- mkdir ${results_dir}
498- ln -s ${results_dir} results_${test_name}_${tuned_setting}
499- cp /tmp/results_numa_streams/* $results_dir
500- else
501- mkdir ${results_dir}
502- cp /tmp/results_numa_streams/* $results_dir
503- fi
504- ${curdir}/test_tools/move_data $curdir $results_dir
505- #
506- # report the results
507- #
508- pushd $results_dir > /dev/null
509- mv /tmp/streams.out .
510- mv /tmp/test_results_report .
511- mv /tmp/numa_results/* .
512- tar hcf results_${test_name}_${to_tuned_setting}.tar $results_dir
513- rm -rf results_pbench.tar
514- popd > /dev/null
515- tar hcf results_${test_name}_${to_tuned_setting}.tar $results_dir
516- working_dir=`ls -rtd /tmp/results*${test_name}* | grep -v tar | tail -1`
517- find $working_dir -type f | tar --transform 's/.*\///g' -cf results_pbench.tar --files-from=/dev/stdin
484+ set_up_test
485+
486+ if [[ $to_use_pcp -eq 1 ]]; then
487+ pdir=/tmp/pcp_`date "+%Y.%m.%d-%H.%M.%S"`
488+ pcp="--pcp ${pdir}"
518489fi
490+
491+ numa_streams_run
492+ wdir=`pwd`
493+ cd /tmp
494+ if [[ $results_dir == "" ]]; then
495+ results_dir=/tmp/results_numa_streams_${tuned_setting}_$(date "+%Y.%m.%d-%H.%M.%S")
496+ rm results_${test_name}_${tuned_setting} 2> /dev/null
497+ mkdir ${results_dir}
498+ ln -s ${results_dir} results_${test_name}_${tuned_setting}
499+ cp /tmp/results_numa_streams/* $results_dir
500+ else
501+ mkdir ${results_dir}
502+ cp /tmp/results_numa_streams/* $results_dir
503+ fi
504+ #
505+ # report the results
506+ #
507+ pushd $results_dir > /dev/null
508+ mv /tmp/${test_name}.out .
509+ popd > /dev/null
510+ tar hcf /tmp/results_${test_name}_${to_tuned_setting}.tar $results_dir
511+ ${curdir}/test_tools/save_results --curdir $curdir --home_root $to_home_root --test_name $test_name --tuned_setting=$to_tuned_setting --version NONE --user $to_user --copy_dir "$results_dir $pdir"
519512exit 0
0 commit comments