This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Using systemtap on MPI applications


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]