I tried to profile my application with "sprofile" program but in this way my application doesn't find an input file. My application named "shallow_water" is in "home/roberto/shallow_water_old_old_version/shallow_water" folder where there is also the input file.
I tried
./sprofile -o "/home/roberto/output.csv" "/home/roberto/shallow_water_old_old_version/shallow_water/shallow_water"
and then
./sprofile -o "/home/roberto/output.csv" -w "/home/roberto/shallow_water_old_old_version/shallow_water" "/home/roberto/shallow_water_old_old_version/shallow_water/shallow_water"
Solved! Go to Solution.
do you open with relative address? because most likely you just need chenge current working directory. so run sprofile with absolute path and you program with relative.
do you open with relative address? because most likely you just need chenge current working directory. so run sprofile with absolute path and you program with relative.
I ran from sprofile folder, as you can see I wrote ./sprofile and then I tried setting working directory with -w.
I tried now to run sprofile with absolute path in the folder of my application and all worked but I don't understand why the second way in the first message is wrong, in that I set working directory with -w.
It's not really necessary to run sprofile from it's own folder. Does it work if you run sprofile from the folder you usually start your app in?
e.g.: /opt/AMDAPP/tools/AMDAPPProfiler-2.3/x86_64/sprofile -o "/home/roberto/output.csv" ./shallow_water
maybe bug in profiler
Thank you, this also works, the way I said that works n my previous message is identical but I used absolute path for the application, too. I didn't think I was already in the folder ...
Oh, true. Must have somehow skipped that part of your post on reading. Sorry for the spam.
Thanks for reporting this issue. We confirmed -w switch doesn't work for Linux version of APP Profiler. It will be fixed in the next release. To workaround the problem, you can add sprofile to your $PATH.
I have another problem now, I don't understand how to use -k and -c parameters: using -k all I don't know where output files should be and I don't know how counterfile has to be.
kernel files(cl, il, isa) should go to the same path as your perf counter output file. If no output file is specified, they should go to home directory.
-c takes a path as input
You can create your counter file anywhere you want.
For example:
sprofile -k all -c ~/mycounters.txt myApp appArgs