Files
rocm-systems/test/run.sh
T

46 lines
1.1 KiB
Bash
Raw Normal View History

2017-11-09 17:26:19 -06:00
#!/bin/sh
2017-11-29 17:42:36 -06:00
test_bin_dflt=./test/ctrl
2017-11-09 17:26:19 -06:00
2017-11-29 17:42:36 -06:00
# paths to ROC profiler and oher libraries
2017-12-22 15:36:40 -06:00
export LD_LIBRARY_PATH=$PWD
2017-11-29 17:42:36 -06:00
# enable error messages logging to '/tmp/rocprofiler_log.txt'
2017-11-09 17:26:19 -06:00
export ROCPROFILER_LOG=1
2017-11-29 17:42:36 -06:00
# ROC profiler library loaded by HSA runtime
2017-11-09 17:26:19 -06:00
export HSA_TOOLS_LIB=librocprofiler64.so
2017-11-29 17:42:36 -06:00
# tool library loaded by ROC profiler
2018-03-07 15:08:20 -06:00
export ROCP_TOOL_LIB=libtool.so
2017-11-29 17:42:36 -06:00
# enable HSA dispatch intercepting by ROC profiler
2017-11-09 17:26:19 -06:00
export ROCP_HSA_INTERCEPT=1
2017-11-29 17:42:36 -06:00
# ROC profiler metrics config file
2017-11-15 20:59:24 -06:00
unset ROCP_PROXY_QUEUE
2017-11-29 17:42:36 -06:00
# ROC profiler metrics config file
2017-11-09 17:26:19 -06:00
export ROCP_METRICS=metrics.xml
2017-11-29 17:42:36 -06:00
# input file for the tool library
2017-11-09 17:26:19 -06:00
export ROCP_INPUT=input.xml
2017-11-29 17:42:36 -06:00
# output directory for the tool library, for metrics results file 'results.txt'
# and SQTT trace files 'thread_trace.se<n>.out'
2018-02-01 14:52:21 -06:00
export ROCP_OUTPUT_DIR=./RESULTS
2017-11-09 17:26:19 -06:00
2018-03-07 15:08:20 -06:00
if [ ! -e $ROCP_TOOL_LIB ] ; then
ln -s test/$ROCP_TOOL_LIB
fi
2017-11-09 17:26:19 -06:00
if [ -n "$1" ] ; then
2017-11-29 17:42:36 -06:00
tbin="$*"
2017-11-09 17:26:19 -06:00
else
2017-11-29 17:42:36 -06:00
tbin=$test_bin_dflt
2017-11-09 17:26:19 -06:00
fi
2018-03-07 15:08:20 -06:00
export ROCP_KITER=100
export ROCP_DITER=100
2018-03-07 15:08:20 -06:00
echo "Run $tbin"
2017-11-29 17:42:36 -06:00
eval $tbin
2018-02-12 15:00:20 -06:00
#valgrind --leak-check=full $tbin
#valgrind --tool=massif $tbin
#ms_print massif.out.<N>
2017-11-09 17:26:19 -06:00
exit 0