This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Using systemtap on MPI applications
- From: "Olausson, Bjoern" <contactme at olausson dot de>
- To: "Frank Ch. Eigler" <fche at redhat dot com>, systemtap at sourceware dot org
- Date: Mon, 2 May 2016 17:21:29 +0200
- Subject: Re: Using systemtap on MPI applications
- Authentication-results: sourceware.org; auth=none
- References: <CAE7O3Td1P1jFFbbBFu5k+uu8w8Zw9+fSgRYJqc7d4H57dAV09A at mail dot gmail dot com> <y0mh9g7a77l dot fsf at fche dot csb> <CAE7O3TfvL=7YmYeEyo=MrKM7T8ph_PMqgxYGko-BtzyHGLaf4Q at mail dot gmail dot com> <20160316140724 dot GD3854 at redhat dot com> <CAE7O3Tcg7317VY5eH_ipqP7wqUR9CnwmCsdU4z+=wVbv3y14SQ at mail dot gmail dot com> <20160317124917 dot GC29879 at redhat dot com> <CAE7O3Tf0fxhQOusWsoD=_oRCOZ+vUj_49aAL=fa1x6xzWdBG5A at mail dot gmail dot com>
So using SystemTap with a filter on the binary works great when
running on multiple nodes - thanks for that Frank :-)
As long as I am using POSIX IO everything works as expected. Now when
I use MPIIO of course the vfs.read.return and write function do no
longer work.
Does anyone have a suggestion on how to trace MPIIO calls?
Currently I am probing like this:
probe vfs.read.return {
if (execname() == binfilter) {
time_stamp = timestamp()
latency = gettimeofday_us() - @entry(gettimeofday_us())
offset = $file->f_pos
filename = __file_filename(file)
bytes = $return
printf("%s;%s;%d;%d;%d;%d;%d;%d;%d\n", filename, name,
time_stamp, latency, offset, bytes_to_read, bytes_read, bytes, pid())
}
}
Greetings,
Bjoern
On Thu, Mar 17, 2016 at 1:51 PM, Olausson, Bjoern <contactme@olausson.de> wrote:
> On Thu, Mar 17, 2016 at 1:49 PM, Frank Ch. Eigler <fche@redhat.com> wrote:
>> Hi -
>>
>>> Excuse that stupid question, but I thought using "-c CMD" will always
>>> instantly execute the CMD, so that would not play will with MPI
>>> executed applications :)
>>
>> Not exactly - "stap -c CMD" should run CMD at each --remote site.
>> The extent to which an mpi CMD would run correctly though (and find
>> its MPI peers etc.) is unknown though.
>>
>>> But is there a way to pass a string to stap on which I can apply e.g.
>>> your above filter instead of hardcoding the exec name I want to filter
>>> on?
>>
>> Certainly; command line options or global variables are two of the ways.
>> The latter performs better because it permits caching.
>>
>> stap -e 'probe something { if (execname() == @1) { ...} }' bar
>> stap -e 'global foo; probe something { if (execname() == foo) { ...} }' -Gfoo=bar
>>
>> - FChE
>
> Thanks a lot, that makes things way easier!
>
> Cheers,
> Bjoern