[Mpi3-tools] MPI handles interface
Jeff Squyres
jsquyres at cisco.com
Tue Apr 21 08:41:20 CDT 2009
On Apr 21, 2009, at 5:56 AM, Ashley Pittman wrote:
> > Could I get some comments on the group as to the general style of
> what
> > I did?
>
> The general style looks OK to me, without digging too far however I'm
> concerned about the idea of the DLL allocating memory and then having
> the debugger free it, this seems like a recipe for disaster to me.
>
In addition to John's reply...
The suggestion was made on the call yesterday to [effectively] convert
the (image, image_info, process, process_info, c_comm) tuple into an
opaque handle that is then queried by the individual functions.
Hence, instead of passing that big tuple to each of the query
functions (and therefore potentially having the DLL re-lookup the data
in each query function), have the DLL do all the lookups at once,
possibly store it in a DLL-internal One Big Struct, and then return an
opaque handle to it to the debugger. The debugger then uses that
handle for the individual query functions, which then become quite
simple in the DLL (i.e., copy from the handle to the OUT params). The
debugger eventually invokes a function to free the handle.
I haven't made these modifications yet, but I will.
--
Jeff Squyres
Cisco Systems
More information about the mpiwg-tools
mailing list