On Mon, Aug 18, 2014 at 8:58 AM, John Peterson <[email protected]> wrote: > On Mon, Aug 18, 2014 at 8:33 AM, Derek Gaston <[email protected]> wrote: >> You're right - it doesn't... I misread my old code... I missed my own >> packing/unpacking of the coordinates from/to Points (read them out into a >> flat array, broadcast(), recreate Points). >> >> So - never mind. I guess I'll do the same thing again for now. >> >> How tough would it be to make this work with Point? > > Looks like it involves template magic and defining custom MPI types? > > >> Or should I be using allgather_packed_range() for this instead (would that >> work as is?). > > That looks pretty close to what you want, actually... It looks like > it takes a generic "context" and uses an std::inserter object for > unpacking. > > Here's an example from mesh_communication.C on Node*s... > > mesh.comm().allgather_packed_range (&mesh, > mesh.nodes_begin(), > mesh.nodes_end(), > mesh_inserter_iterator<Node>(mesh)) :
Actually the more I looked into it, it appears that allgather_packed_range is fairly specific to working with a Mesh object... so if you just have a vector<Point> you'd like to allgather(), it doesn't seem to be a viable choice. -- John ------------------------------------------------------------------------------ _______________________________________________ Libmesh-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-devel
