[mpich-discuss] Existence of something like MPI_Type_compare()?

Rob Latham robl at mcs.anl.gov
Tue Dec 13 13:46:30 CST 2011


On Tue, Dec 13, 2011 at 01:23:37PM -0600, Dave Goodell wrote:
> Also, if you only need to check for datatype compatibility and not all of the other issues listed in our paper, you probably would benefit from the hashing scheme developed by Langou et al.: http://www.springerlink.com/content/6xdbmmva33cwvj33/
> 
> I'm not sure how to obtain a copy of that code though at this point.  The listed web page for downloading it is offline and archive.org does not seem to have a copy.

I have a copy.    The authors dug it up from an archive when I bugged
them about this back in March/April.

I've attached the 17k tarball.  

This type equivalence seems to be exactly what Jed's looking for. 

==rob

> -Dave
> 
> On Dec 13, 2011, at 1:09 PM CST, Dave Goodell wrote:
> 
> > Some relevant reading on datatype equivalence: http://www.mcs.anl.gov/~goodell/pdfs/eurompi2010-type-marshalling.pdf
> > 
> > Let me dig around and see if I can find the code that we developed for that paper.  It didn't strictly compare types, but I'm sure that the marshalling code could be easily adapted to do so.
> > 
> > AFAIK there is nothing available in the MPI standard nor as an MPICH2 extension that would give you exactly what you want.  Everything would need to be based on MPI_Type_get_envelope/_get_contents.
> > 
> > -Dave
> > 
> > On Dec 13, 2011, at 12:52 PM CST, Jed Brown wrote:
> > 
> >> I'm not sure if I'm blind or if something like this doesn't exist. How can I check whether two types are compatible?
> >> 
> >> Here's the scenario:
> >> 
> >> I'm implementing communication primitives for a parallel bipartite graph and want to be able to move composite types such as user-defined structs associated with each vertex in the graph. I call this the "unit" type.
> >> 
> >> Inside my communication library, I'm constructing composite datatypes for each unit that needs to be sent. I'd like to create these lazily (the first time the user tries to use that unit) and cache them for future use. I MPI_Type_dup() the unit so that lifetime of the custom type can be managed independently (shorter or longer) from lifetime of the communication graph object.
> >> 
> >> Now I need to determine whether a user-provided "unit" is already cached. I don't mind a linear search, but I don't have an "equality" test. I can call MPI_Type_get_envelope() and MPI_Type_get_contents(), but I would have to explore this backward for types that have been duped and it just doesn't seem like a robust equality test. Is there such a thing?
> >> 
> >> Do you have a different recommendation?
> >> _______________________________________________
> >> mpich-discuss mailing list     mpich-discuss at mcs.anl.gov
> >> To manage subscription options or unsubscribe:
> >> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
> > 
> > _______________________________________________
> > mpich-discuss mailing list     mpich-discuss at mcs.anl.gov
> > To manage subscription options or unsubscribe:
> > https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
> 
> _______________________________________________
> mpich-discuss mailing list     mpich-discuss at mcs.anl.gov
> To manage subscription options or unsubscribe:
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss

-- 
Rob Latham
Mathematics and Computer Science Division
Argonne National Lab, IL USA
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hash-mpi-datatype-0.9.2.tar.gz
Type: application/octet-stream
Size: 17359 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20111213/7b667453/attachment-0001.obj>


More information about the mpich-discuss mailing list