Skip to content

Commit 186053f

Browse files
authored
Merge pull request #28 from redhat-performance/pcp-support
Adding PCP support and removing pbench
2 parents 4cf2278 + 7103dd0 commit 186053f

2 files changed

Lines changed: 31 additions & 94 deletions

File tree

README.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,16 @@ To run:
2121
Options
2222
linpack Usage:
2323
--interleave: numactl interleave option
24-
--use_pbench_version: Instead of running the wrappers version
25-
of linpack, use pbench-linpack when pbench is requested
2624
2725
General options
2826
--home_parent <value>: Our parent home directory. If not set, defaults to current working directory.
2927
--host_config <value>: default is the current host name.
3028
--iterations <value>: Number of times to run the test, defaults to 1.
31-
--pbench: use pbench-user-benchmark and place information into pbench, defaults to do not use.
32-
--pbench_user <value>: user who started everything. Defaults to the current user.
33-
--pbench_copy: Copy the pbench data, not move it.
34-
--pbench_stats: What stats to gather. Defaults to all stats.
35-
--run_label: the label to associate with the pbench run. No default setting.
3629
--run_user: user that is actually running the test on the test system. Defaults to user running wrapper.
3730
--sys_type: Type of system working with, aws, azure, hostname. Defaults to hostname.
3831
--sysname: name of the system running, used in determining config files. Defaults to hostname.
3932
--tuned_setting: used in naming the tar file, default for RHEL is the current active tuned. For non
4033
RHEL systems, default is none.
4134
--usage: this usage message.
35+
--use_pcp: Enables use of Performance Co-Pilot in wrappers, defaults to 0.
4236
```
43-
44-
Note: The script does not install pbench for you. You need to do that manually.

linpack/linpack_run

Lines changed: 30 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -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
}
@@ -74,7 +72,6 @@ fi
7472
setup_done=0
7573
out_file=""
7674
interleave="all"
77-
use_pbench_version=0
7875
show_usage=0
7976

8077
#
@@ -125,9 +122,6 @@ fi
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
@@ -138,46 +132,6 @@ fi
138132
${curdir}/test_tools/gather_data ${curdir}
139133
source 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-
181135
execute_via_shell()
182136
{
183137
if [ $setup_done -eq 0 ]; then
@@ -224,7 +178,6 @@ ARGUMENT_LIST=(
224178
)
225179

226180
NO_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

282231
rm -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+
283244
for iteration in `seq 1 1 $to_times_to_run`
284245
do
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
291261
done
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
326271
exit 0

0 commit comments

Comments
 (0)