
On 23:12 Sun 30 Dec , Philipp Kraus wrote:
Sorry I have forgot a "main information": This calls are a preexecution of the algorithm. The main algorithm is cycled and uses a MPI blocking communication, so only the preexecution must be a little bit weak.
Sorry, I don't quite get it. Could you elaborate on this? What is in this context the "preexecution", what is the main algorithm, and what do you mean by "must be a little bit weak"?
Thanks for the code, but this code is based on OpenMPI. My program must be also work wirth MPI CH2 (MPI implemention on Windows based systems), so I would like to create a boost-only solution.
The code uses the MPI standard interface, it contains nothing specific to Open MPI (BTW: it's not called "OpenMPI", but that's just nitpicking). It thus works with MPICH2, too -- no matter if the OS is Linux or Windows.
I do it at the moment with:
while (thread_is_running) {
if (!l_mpicom.rank()) for(std::size_t i=1; i < l_mpicom.size(); ++i) l_mpicom.isend(i, 666, l_task.getID()); else if (boost::optionalmpi::status l_status = l_mpicom.iprobe(0, 666)) { std::size_t l_taskid = 0; l_mpicom.recv( l_status->source(), l_status->tag(), l_taskid ); } }
You could rebuild the binary tree communication scheme I've illustrated using Boost MPI (I'm too lazy). I'm pretty sure calling isend() without ever waiting for completion is illegal according to the MPI standard and will result in a memory leak (plus the code won't scale thanks to the for loop). Cheers -Andreas -- ========================================================== Andreas Schäfer HPC and Grid Computing Chair of Computer Science 3 Friedrich-Alexander-Universität Erlangen-Nürnberg, Germany +49 9131 85-27910 PGP/GPG key via keyserver http://www.libgeodecomp.org ========================================================== (\___/) (+'.'+) (")_(") This is Bunny. Copy and paste Bunny into your signature to help him gain world domination!