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: Thu, 17 Mar 2016 13:51:41 +0100
- 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>
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