diff --git a/README.md b/README.md index 5e62aab..be763d4 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,58 @@ -# streams -Wrapper for running the streams test. +Automation wrapper for streams + +Description: + This wrapper runs the streams program written by + John D. McCalpin + Joe R. Zagar + The program being executed, measures memory transfer + rates in MB/s and provides a rough idea of memory rates + of the machine. However it is a bit outdated + and does not deal with numa. + +Location of underlying workload: part of the github kit + +Packages required: gcc,bc + +To run: +``` +[root@hawkeye ~]# git clone https://github.com/redhat-performance/streams-wrapper +[root@hawkeye ~]# streams-wrapper/streams/streams_run +``` + +The script will set the buffer sizes based on the hardware it is being executed on. + +``` +Options +--cache_multiply : Multiply cache sizes by . Default is 2 +--cache_start_factor : Start the cache size at base cache * + Default is 1 +--cache_cap_size : Caps the size of cache to this value. Default is no cap. +--nsizes : Maximum number of cache sizes to do. Default is 4 +--opt2 : If value is not 0, then we will run with optimization level + 2. Default value is 1 +--opt3 : If value is not 0, then we will run with optimization level + 3. Default value is 1 +--result_dir : Directory to place results into. Default is + results_streams_tuned__ +--size_list : List of array sizes in byte +--threads_multiple : Multiply number threads by . Default is 2 +--tools_git : git repo to retrieve the required tools from, default is https://github.com/redhat-performance/test_tools-wrappers + +General options + --home_parent : Our parent home directory. If not set, defaults to current working directory. + --host_config : default is the current host name. + --iterations : Number of times to run the test, defaults to 1. + --pbench: use pbench-user-benchmark and place information into pbench, defaults to do not use. + --pbench_user : user who started everything. Defaults to the current user. + --pbench_copy: Copy the pbench data, not move it. + --pbench_stats: What stats to gather. Defaults to all stats. + --run_label: the label to associate with the pbench run. No default setting. + --run_user: user that is actually running the test on the test system. Defaults to user running wrapper. + --sys_type: Type of system working with, aws, azure, hostname. Defaults to hostname. + --sysname: name of the system running, used in determining config files. Defaults to hostname. + --tuned_setting: used in naming the tar file, default for RHEL is the current active tuned. For non + RHEL systems, default is none. + --usage: this usage message. +``` + +Note: The script does not install pbench for you. You need to do that manually. diff --git a/streams/streams_run b/streams/streams_run index fbb4203..66a98a6 100755 --- a/streams/streams_run +++ b/streams/streams_run @@ -20,6 +20,7 @@ arguments="$@" curdir=`pwd` + if [[ $0 == "./"* ]]; then chars=`echo $0 | awk -v RS='/' 'END{print NR-1}'` if [[ $chars == 1 ]]; then @@ -28,9 +29,15 @@ if [[ $0 == "./"* ]]; then run_dir=`echo $0 | cut -d'/' -f 1-${chars} | cut -d'.' -f2-` run_dir="${curdir}${run_dir}" fi +elif [[ $0 != "/"* ]]; then + dir=`echo $0 | rev | cut -d'/' -f2- | rev` + run_dir="${curdir}/${dir}" else chars=`echo $0 | awk -v RS='/' 'END{print NR-1}'` run_dir=`echo $0 | cut -d'/' -f 1-${chars}` + if [[ $run_dir != "/"* ]]; then + run_dir=${curdir}/${run_dir} + fi fi test_name="streams" @@ -39,7 +46,7 @@ test_name="streams" # size_list="0" opt_three=1 -opt_two=1 +opt_two=0 cache_multiply=2 nsizes=4 cache_start_factor=1 @@ -174,7 +181,13 @@ retrieve_line() items=0 calc_line="" - info=`grep "${search_for}" ${file}* | tr -s " " | sed "s/ /:/g" | cut -d: -f 3` + numb_files=`ls ${file}* | wc -w` + if [ $numb_files -ne 1 ]; then + cut_field=4 + else + cut_field=3 + fi + info=`grep "${search_for}" ${file}* | tr -s " " | sed "s/ /:/g" | cut -d: -f $cut_field` for i in $info; do if [ $items -eq 0 ]; then @@ -182,7 +195,7 @@ retrieve_line() else calc_line=${calc_line}"+"${i} fi - let items="${items}+1" + let items="${items}+1" done calc_line=$calc_line")/"$items out_line=$out_line":"`echo $calc_line | bc`