[Mpi3-tools] reviewing the document

Martin Schulz schulzm at llnl.gov
Wed Jan 26 10:46:40 CST 2011


Hi Dave,

On Jan 26, 2011, at 7:32 AM, Dave Goodell wrote:

> On Jan 26, 2011, at 8:09 AM CST, Jeff Squyres wrote:
> 
>> On Jan 25, 2011, at 6:58 PM, Dave Goodell wrote:
>> 
>>>> I'm wondering if there are really two options here:
>>>> 
>>>> 1. Have a real casting operating (somewhat akin to Martin's initial proposal): have a casting function that returns the OUT value (vs. an int error code).  Then you can nest the output of the casting function as an argument to MPI_Perfvar_handle_allocate(), for example.
>>>> 
>>>> 2. Have 9 different versions of MPI_Perfvar_handle_allocate() and MPI_Controlvar_handle_allocate() -- one for each MPI handle type.
>>>> 
>>>> I assume most people will recoil from #2.  But... hmm.  It *is* the safest way to go.  But ugly (because it's lots of functions).  Hmm...
>>> 
>>> #1 is cute, but it doesn't match MPI error handling conventions, and I'd rather not begin passing the error code back as an OUT arg for just this small set of conversion routines.
>> 
>> MPI_Wtick, MPI_Wtime, and the f2c / c2f routines return their OUT values.  Indeed, the f2c / c2f routines could be considered "casting-like" operators.
> 
> That's a good point, I always forget about f2c/c2f routines because they are just little integer type casting macros in MPICH2.  Maybe it's not quite the departure from convention that I claimed.
> 
> Actually, I think I'm in favor of #1 if the implementation is allowed to implement them as macros.  They'll be no-ops for us, but you can have full functions if you like to add some type checking from the compiler.  But if you want to allocate/deallocate memory in the conversion routines in order to create a new generic handle then this system won't work.  Is that what you want?  Or is a "user comment" cast of the pointer value all that you need?

I think allowing the implementation to be macros is problematic.
MPI objects are often intercepted by tools and in many cases
also replaced. In this case, the tool must be able to intercept
also these conversion routines to make sure any replaced
object is also passed on to the MPIT routines.

Martin



> 
> -Dave
> 
> 
> _______________________________________________
> Mpi3-tools mailing list
> Mpi3-tools at lists.mpi-forum.org
> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi3-tools

________________________________________________________________________
Martin Schulz, schulzm at llnl.gov, http://people.llnl.gov/schulzm
CASC @ Lawrence Livermore National Laboratory, Livermore, USA







More information about the mpiwg-tools mailing list