|
Boost Users : |
Subject: [Boost-users] [Boost.MPI] Scattering/Sending a complicated object
From: Ryan Lewis (me_at_[hidden])
Date: 2011-04-12 14:00:18
I have an object which has as a private type a
boost::unordered_map<Object,Struct>, and an iterator, which iterates
over the map elements. For a given <Object, Struct> map element, the
value Struct has a member variable, which is an integer storing a
value between 0,...,#NUM_PROCESSORS-1.
I'd like to 'scatter' the object by creating new instances of this
object on all the threads, where a given <key,value> pair is on
processor i, if value has this integer set to be value i.
I suppose I could perform a large number of Sends and Receives, i.e.
iterate over the complex, and then send a <key,value> pair to the
correct worker node every time I find it, but, this seems bad
communication wise? Would there be a way to somehow buffer the sends
happen at once? Or is there possibly an even better way of doing this?
-rhl
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net