Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
16 Views

Using Thread profiler with MPI/pThread on Linux


Hi there,

I built an application involving both pThread and MPI and I would like to know if it is possible to use Thread profiler to analyse this application (Obviously, I'm running tprofiler on a single computer, part of the cluster, thus I'm only looking at the pthread part).

The issue that I have come up with is that the command tprofile_cl (I'm running the collector only, the GUI is on a window station) don't accept mpirun... as an application launcher. Thiswas to be expected since we don't want to acquire data about MPI.

Second attempt: using a launching script and the tprofiler_cl option (-x) to specify the application to be acquired. Unfortunately I keep on receiving the following message.

-sh-3.2$ tprofile_cl ./script -x hunt.exe

Building project

script: (E) Not a program module.

It seems that my script (only a file with the command line) is not well accepted by tprofile_cl, although it works well when used alone.

Did anybody tried acquiring with an application using MPI, used a launching script while callingtprofiler_cl or used succesfully the (-x) option, any of these info could be of interest.

Thanks,
Fred

0 Kudos
3 Replies
Highlighted
Black Belt
16 Views

Perhaps if you would establish a goal for your use of tprofile_cl, you could get some idea of how to move in that direction. Supposing that you wished to perform thread profiling of one or more MPI ranks of an MPI FUNNELED application, you might link it against the thread profiling library, and arrange to run each rank in a separate directory, so that you collect the threadprofiler.thr for each rank. Then you could examine the result of profiling each rank at leisure, using tprofile_cl or alternative.
Running thread profiler on your script doesn't appear to make a lot of sense, aside from the fact that tprofile_cl says it doesn't make sense; do you somehow engage pthreads in the script, rather than in your MPI application?
0 Kudos
Highlighted
Employee
16 Views

For tprofile_cl, the text after the application (or launcher script) is treated as an argument to the application, not an argument to tprofile_cl.
Try this:
tprofile_cl -x hunt.exe ./script
0 Kudos
Highlighted
Beginner
16 Views


Hi guys,

thanks for your responses, here what I'm using now:

tprofile_cl -x ./hunt.exe ./script

Thanks Mark, your answer made me look in this direction.

Now everything seems to work well, but I have a segmentation fault that occurs. This fault doesn't appears when running the application without tprofiler_cl, but it is likely to be related to my application, because when I reduce the code to the minimum (main{MPI_Init();MPI_Finalize();return 0;}) it works.I'm going to look deeper into this and let you know if I find something helpful.

Thanks again,
Fred

/*discussion about the script*/

In the script file I wrote:

mpirun [mpi launch options] hunt.exe

so it is only a "wrapper" to fool tprofile and make him consider it as a launching script since mpirun (is mpirun a launching script or an application?) is not accepted as an argument. This come from what is written in tprofile light help:

Usage: tprofile_cl [] []

Select an executable to analyze in one of the following ways.

- Specify the executable on the command line

- Specify the application launcher (a script or other executable)

on the command line and select the executable with

the --exe_of_interest (-x) option

(this should answer tim18's question on why I was using thread profiler on a script)

0 Kudos