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


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]