I have a computer software program that is very complicated and I run for now in pthreads. When I increase the number of cores the program runs faster-as one would expect. I am interested in the number of cores and the load for each.
Can I use the PGroup Profiler to profile this program. If so how can I do it?
Yes, you can use PGPROF to profile your pthreads program. I am assuming you are running on Linux.
The first, easiest thing to do is to use the following command to collect time data:
$ pgcollect -time myprog
then use the profiler to examine the time data:
$ pgprof -exe myprog
The “Parallelism” tab near the bottom of the PGPROF display should provide thread-specific times for the function, line, or assembly instruction selected in the main statistics panel in the upper part of the PGPROF display. Double-click lines in the main statistics panel to drill down from the function level to the source level to the assembly level.
You may want to rebuild your application with -Minfo=ccff, which will generate a database of information about how the compiler did or didn’t optimize your program. This can provide useful hints in the profiler by correlating the larger execution times with source code and compiler messages.
PGPROF has more capabilities than we can cover in a forum posting, like access to processor hardware counters via OProfile.