@@ -31,8 +31,6 @@ usage()
3131{
3232 echo " $1 Usage:"
3333 echo " --interleave: numactl interleave option"
34- echo " --use_pbench_version: Instead of running the wrappers version"
35- echo " of linpack, use pbench-linpack when pbench is requested"
3634 source test_tools/general_setup --usage
3735 exit 1
3836}
7472setup_done=0
7573out_file=" "
7674interleave=" all"
77- use_pbench_version=0
7875show_usage=0
7976
8077#
125122# to_home_root: home directory
126123# to_configuration: configuration information
127124# to_times_to_run: number of times to run the test
128- # to_pbench: Run the test via pbench
129- # to_pbench_copy: Copy the data to the pbench repository, not move_it.
130- # to_puser: User running pbench
131125# to_run_label: Label for the run
132126# to_user: User on the test system running the test
133127# to_sys_type: for results info, basically aws, azure or local
138132${curdir} /test_tools/gather_data ${curdir}
139133source test_tools/general_setup " $@ "
140134
141- copy_pbench_data ()
142- {
143- value=` $TOOLS_BIN /set_pbench_variables --host_config $to_configuration --sys_type $to_sys_type --test ${test_name} --pbench_user $to_puser --run_label $to_run_label `
144- results_prefix=` echo $value | cut -d: -f 2`
145-
146- echo $TOOLS_BIN /pbench_copy_data --hostname " ${to_puser} _${to_run_label} " --user " ${to_puser} " --prefix ${results_prefix} --copy $to_pbench_copy >> /tmp/debugging
147- $TOOLS_BIN /pbench_copy_data --hostname " ${to_puser} _${to_run_label} " --user " ${to_puser} " --prefix ${results_prefix} --copy $to_pbench_copy
148- }
149-
150- execute_via_pbench ()
151- {
152- if [ $use_pbench_version -eq 1 ]; then
153- #
154- # Run original pbench-linpack
155- #
156- yum install -y pbench-linpack.x86_64
157- if [ $? -ne 0 ]; then
158- error_exit " yum install of pbench-linpack.x86_64 failed" 1
159- fi
160- echo " pbench-linpack --config ${to_configuration} _${to_tuned_setting} _iteration_${iteration} "
161- pbench-linpack --config ${to_configuration} _${to_tuned_setting} _iteration_${iteration}
162- if [ $? -ne 0 ]; then
163- error_exit " pbench-linpack execution failed" 1
164- fi
165- #
166- # We do not have enough control of where pbench-linpack puts the results in pbench
167- # to match things if we ran without. So remove the results and then do the copying by
168- # hand.
169- pushd /var/lib/pbench-agent
170- rm -f ` ls -rt lin* copied | head -1`
171- popd
172- else
173- cd $curdir
174- $TOOLS_BIN /execute_via_pbench --cmd_executing " $0 " $arguments --test $test_name --spacing 11 --pbench_stats $to_pstats
175- if [ $? -ne 0 ]; then
176- error_exit " executing linpack via pbench failed" 1
177- fi
178- fi
179- }
180-
181135execute_via_shell ()
182136{
183137 if [ $setup_done -eq 0 ]; then
@@ -224,7 +178,6 @@ ARGUMENT_LIST=(
224178)
225179
226180NO_ARGUMENTS=(
227- " use_pbench_version"
228181)
229182
230183# read arguments
@@ -251,10 +204,6 @@ while [[ $# -gt 0 ]]; do
251204 interleave=${2}
252205 shift 2
253206 ;;
254- --use_pbench_version)
255- use_pbench_version=1
256- shift 1
257- ;;
258207 -h)
259208 usage $test_name
260209 ;;
@@ -280,47 +229,43 @@ chmod 755 ${run_dir}/linpack/xlinpack_xeon64
280229${curdir} /test_tools/gather_data ${curdir}
281230
282231rm -rf $run_dir /linpack/linpack_results $run_dir /linpack/results*
232+
233+ # Get PCP setup if we're using it
234+ pdir=" "
235+ if [[ $to_use_pcp -eq 1 ]]; then
236+ source $TOOLS_BIN /pcp/pcp_commands.inc
237+ setup_pcp
238+ pcp_cfg=$TOOLS_BIN /pcp/default.cfg
239+ pcpdir=/tmp/pcp_` date " +%Y.%m.%d-%H.%M.%S" `
240+ pdir=" --copy_dir $pcpdir "
241+ start_pcp ${pcpdir} / ${test_name} $pcp_cfg
242+ fi
243+
283244for iteration in ` seq 1 1 $to_times_to_run `
284245do
246+ # If we're using PCP, snap a chalk line at the start of the iteration
247+ if [[ $to_use_pcp -eq 1 ]]; then
248+ start_pcp_subset
249+ fi
285250 out_file=/tmp/${test_name} _${to_tuned_setting} _numa_interleave_${interleave} _iteration_$iteration .out
286- if [ $to_pbench -eq 1 ]; then
287- execute_via_pbench
288- else
289- execute_via_shell
251+ execute_via_shell
252+ # If we're using PCP, snap the chalk line at the end of the iteration
253+ # and log the iteration's result
254+
255+ if [[ $to_use_pcp -eq 1 ]]; then
256+ echo " Send result to PCP archive"
257+ echo ${iteration}
258+ result2pcp iteration_number ${iteration}
259+ stop_pcp_subset
290260 fi
291261done
292262
263+ if [[ $to_use_pcp -eq 1 ]]; then
264+ shutdown_pcp
265+ fi
266+
293267#
294268# Process the data.
295269#
296- if [ $use_pbench_version -eq 1 ]; then
297- results_prefix=$to_puser " _instance_" $to_configuration
298-
299- dir=` ls -rtd /var/lib/pbench-agent/linpack_* | tail -1`
300- cd $dir
301- for i in ` ls -d * threads`
302- do
303- if [[ ! -d /tmp/results_${test_name} _${to_tuned_setting} _numa_interleave_${interleave} /$i ]]; then
304- mkdir -p /tmp/results_${test_name} _${to_tuned_setting} _numa_interleave_${interleave} /$i
305- fi
306- cd $i
307- for j in ` ls -d sample* `
308- do
309- if [[ ! -d /tmp/results_${test_name} _${to_tuned_setting} _numa_interleave_${interleave} /$i /$j ]]; then
310- mkdir -p /tmp/results_${test_name} _${to_tuned_setting} _numa_interleave_${interleave} /$i /$j
311- fi
312- cp $j /result.txt /tmp/results_${test_name} _${to_tuned_setting} _numa_interleave_${interleave} /$i /$j
313- done
314- cd ..
315- done
316- cd /tmp
317- tar cf results_pbench_${test_name} _${to_tuned_setting} .tar results_${test_name} _${to_tuned_setting} _numa_interleave_${interleave}
318-
319- copy_pbench_data
320- else
321- if [ $to_pbench -eq 0 ]; then
322- ${curdir} /test_tools/save_results --curdir $curdir --home_root $to_home_root --results linpack_results/results.csv --test_name $test_name --tuned_setting=$to_tuned_setting --version NONE --user $to_user --other_files " linpack_results/test_results_report,${curdir} /hw_info.out"
323-
324- fi
325- fi
270+ ${curdir} /test_tools/save_results --curdir $curdir --home_root $to_home_root --results linpack_results/results.csv --test_name $test_name --tuned_setting=$to_tuned_setting --version NONE --user $to_user --other_files " linpack_results/test_results_report,${curdir} /hw_info.out" $pdir
326271exit 0
0 commit comments