[mpich2-dev] wrapping library calls

Quincey Koziol koziol at hdfgroup.org
Thu Nov 19 17:47:36 CST 2009


Hi Rob,
	The h5cc wrapper script that we include with the HDF5 distribution might give you a model for doing this.  I'll CC Mike McGreevy on our team, to see if he can help or point you in the right direction.

	Quincey

On Nov 19, 2009, at 4:02 PM, Rob Latham wrote:

> Hey folks
> 
> Phil's put together this slick tool called 'darshan'[1].  Darshan
> uses the MPI profiling interface to wrap MPI calls, and linker tricks
> (-wrap) to wrap posix I/O calls.
> 
> We have to modify the MPI wrapper scripts so that darshan's
> implementation of the wrapped symbols gets linked in.  Each driver
> update requires a new set of wrapper shell scripts.
> 
> Is there some way through the command line that we can pass the flags
> '-Wl,-wrap,read,-wrap,write,...' and '-L/path/to/darshan
> -ldarshan-posix'  ?  
> 
> What would be great is if darshan could ship an mpicc wrapper that was
> just one line "/path/to/real/mpicc -Wl,-wrap,read,-wrap,write... $@
> -L/path/to/darshan -ldarshan-io".  
> 
> Unfortunately when I try this, the -Wl and -L flags I pass in go in
> very early in the generated command line ("${allargs[@]}" ).  
> 
> Phil wrote a script to take the output of 'mpicc -show' and munge the
> command line accordingly, so this is kind of a solved problem for
> Darshan.  I was just wondering if there was an approach I had not
> considered in case we want to wrap function calls for some other
> project in the future.
> 
> [1]http://press.mcs.anl.gov/darshan/
> 
> Thanks
> ==rob
> 
> -- 
> Rob Latham
> Mathematics and Computer Science Division
> Argonne National Lab, IL USA



More information about the mpich2-dev mailing list