Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ Streams Options:
--cache_start_factor <value>: Start the cache size at base cache * <value>. Default is 1.
--cache_cap_size <value>: Caps the size of cache to this value. Default is no cap (0).
--nsizes <value>: Maximum number of cache sizes to test. Default is 4.
--ntimes <value>: Sets the compile flag NTIMES to value x. The streams run will"
report the best value of the x runs.
--opt2 <value>: If value is not 0, run with O2 optimization level. Default is 1.
--opt3 <value>: If value is not 0, run with O3 optimization level. Default is 1.
--result_dir <string>: Directory to place results into. Default is
Expand Down
9 changes: 7 additions & 2 deletions streams/streams_extra/run_stream
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ ARGUMENT_LIST=(
"cache_start_size"
"host"
"iterations"
"ntimes"
"numb_sizes"
"optimize_lvl"
"pcpdir"
Expand Down Expand Up @@ -94,6 +95,10 @@ while [[ $# -gt 0 ]]; do
iterations=${2}
shift 2
;;
--ntimes)
ntimes=${2}
shift 2
;;
--numb_sizes)
numb_sizes=${2}
shift 2
Expand Down Expand Up @@ -189,7 +194,7 @@ build_images()
continue
fi

CC_CMD="gcc ${MOPT} -fopenmp -mcmodel=large ${optim_opt} -DSTREAM_ARRAY_SIZE=${use_cache} stream_omp_5_10.c -o ${stream} -fno-pic"
CC_CMD="gcc ${MOPT} -fopenmp -mcmodel=large ${optim_opt} -DNTIMES=${ntimes} -DSTREAM_ARRAY_SIZE=${use_cache} stream_omp_5_10.c -o ${stream} -fno-pic"
Comment thread
dvalinrh marked this conversation as resolved.
echo $CC_CMD >> streams_build_options
$CC_CMD
if [ $? -ne 0 ]; then
Expand Down Expand Up @@ -222,7 +227,7 @@ build_images()
streams_exec=$streams_exec" "$stream
fi
echo gcc ${MOPT} -fopenmp -mcmodel=large ${optim_opt} -DSTREAM_ARRAY_SIZE=${test_size} stream_omp_5_10.c -o ${stream} -fno-pic >> streams_build_options
gcc ${MOPT} -fopenmp -mcmodel=large ${optim_opt} -DSTREAM_ARRAY_SIZE=${test_size} stream_omp_5_10.c -o ${stream} -fno-pic
gcc ${MOPT} -fopenmp -mcmodel=large ${optim_opt} -DNTIMES=${ntimes} -DSTREAM_ARRAY_SIZE=${test_size} stream_omp_5_10.c -o ${stream} -fno-pic
if [ $? -ne 0 ]; then
echo Compilation of streams failed.
exit $E_GENERAL
Expand Down
13 changes: 11 additions & 2 deletions streams/streams_run
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ array_size=""
streams_wrapper_version=1.0
curdir=`pwd`
start_time=""
ntimes=100

end_time=""
if [[ $0 == "./"* ]]; then
chars=`echo $0 | awk -v RS='/' 'END{print NR-1}'`
Expand Down Expand Up @@ -369,8 +371,8 @@ set_up_test()
run_stream()
{
cd $run_dir
echo ./run_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} --top_dir $curdir $pcp
./run_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} --top_dir $curdir > /tmp/streams_results/${2}_opt_${1} $pcp
echo ./run_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} --top_dir $curdir $pcp --ntimes $ntimes
./run_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} --top_dir $curdir > /tmp/streams_results/${2}_opt_${1} $pcp --ntimes $ntimes
if [ $? -ne 0 ]; then
echo "Execution of run stream failed."
exit $E_GENERAL
Expand Down Expand Up @@ -398,6 +400,8 @@ usage()
echo " Default is 1"
echo "--cache_cap_size <value>: Caps the size of cache to this value. Default is no cap."
echo "--nsizes <value>: Maximum number of cache sizes to do. Default is 4"
echo "--ntimes <value>: Sets the compile flag NTIMES to value x. The streams run will"
echo " report the best value of the x runs. Default value is 100"
echo "--opt2 <value>: If value is not 0, then we will run with optimization level"
echo " 2. Default value is 1"
echo "--opt3 <value>: If value is not 0, then we will run with optimization level"
Expand Down Expand Up @@ -479,6 +483,7 @@ ARGUMENT_LIST=(
"cache_multiply"
"cache_start_factor"
"nsizes"
"ntimes"
"opt2"
"opt3"
"results_dir"
Expand Down Expand Up @@ -530,6 +535,10 @@ while [[ $# -gt 0 ]]; do
nsizes=${2}
shift 2
;;
--ntimes)
ntimes=${2}
shift 2
;;
--opt2)
opt_two=${2}
shift 2
Expand Down
Loading