Boost C++ Libraries: Ticket #5292: boost::mpi::scatterv and boost::mpi::gatherv added https://svn.boost.org/trac10/ticket/5292 <p> Two more collective operations for Boost.MPI. I made the headers completely based on the existent one: scatter.hpp and gather.hpp </p> <p> "common use versions" was added too, for those cases where the great buffer is stored contiguously at the root process. </p> <p> The "common use version" of gatherv needs a warning in the docs: Since the process send it's own buffer size and nothing more, all sizes will be gathered before the real call. I don't know if this is tolerable, you have the decision. </p> <p> Other doubt about gatherv implementation: I did switch to the packed_archive_send() / packed_archive_recv() communication, i tried to figure out the difference in send an archive or send using communicator::send when dealing with non-MPI types, but without success. boost::mpi::scatter uses the first and boost::mpi::gather uses the second. Anyway,the snippet of code is commented if you want to switch back. </p> <p> I'm sending a Main.cpp file with the simple tests i made, comment or uncomment the prototypes in pairs: scatterv / gatherv. </p> <p> To see the results in a separate terminal for each process, this is a possible way: </p> <p> <strong>mpicxx Main.cpp -o test &amp;&amp; echo 107 &gt; input.txt &amp;&amp; mpirun -np 4 xterm -e ./test</strong> </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5292 Trac 1.4.3 Júlio Hoffimann <julio.hoffimann@…> Fri, 11 Mar 2011 16:09:24 GMT attachment set https://svn.boost.org/trac10/ticket/5292 https://svn.boost.org/trac10/ticket/5292 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">scatterv.hpp</span> </li> </ul> Ticket Júlio Hoffimann <julio.hoffimann@…> Fri, 11 Mar 2011 16:09:58 GMT attachment set https://svn.boost.org/trac10/ticket/5292 https://svn.boost.org/trac10/ticket/5292 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">gatherv.hpp</span> </li> </ul> Ticket Júlio Hoffimann <julio.hoffimann@…> Fri, 11 Mar 2011 16:10:47 GMT attachment set https://svn.boost.org/trac10/ticket/5292 https://svn.boost.org/trac10/ticket/5292 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">Main.cpp</span> </li> </ul> Ticket Júlio Hoffimann <julio.hoffimann@…> Sun, 13 Mar 2011 19:05:01 GMT attachment set https://svn.boost.org/trac10/ticket/5292 https://svn.boost.org/trac10/ticket/5292 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">scatterv(fixed version).hpp</span> </li> </ul> <p> Fixed version </p> Ticket Júlio Hoffimann <julio.hoffimann@…> Sun, 13 Mar 2011 19:06:07 GMT attachment set https://svn.boost.org/trac10/ticket/5292 https://svn.boost.org/trac10/ticket/5292 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">gatherv(fixed version).hpp</span> </li> </ul> <p> Fixed version </p> Ticket Júlio Hoffimann <julio.hoffimann@…> Sun, 13 Mar 2011 19:06:52 GMT attachment set https://svn.boost.org/trac10/ticket/5292 https://svn.boost.org/trac10/ticket/5292 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">Main(fixed version).cpp</span> </li> </ul> <p> Fixed version </p> Ticket Júlio Hoffimann <julio.hoffimann@…> Mon, 14 Mar 2011 19:41:32 GMT attachment set https://svn.boost.org/trac10/ticket/5292 https://svn.boost.org/trac10/ticket/5292 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">gatherv(fixed version 2).hpp</span> </li> </ul> <p> Fixed version 2 </p> Ticket Júlio Hoffimann <julio.hoffimann@…> Tue, 15 Mar 2011 01:40:10 GMT attachment set https://svn.boost.org/trac10/ticket/5292 https://svn.boost.org/trac10/ticket/5292 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">gatherv(fixed version 3).hpp</span> </li> </ul> <p> Fixed version 3 </p> Ticket Júlio Hoffimann <julio.hoffimann@…> Tue, 15 Mar 2011 01:40:49 GMT attachment set https://svn.boost.org/trac10/ticket/5292 https://svn.boost.org/trac10/ticket/5292 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">Main(fixed version 2).cpp</span> </li> </ul> <p> Fixed version 2 </p> Ticket Júlio Hoffimann <julio.hoffimann@…> Tue, 15 Mar 2011 01:51:57 GMT <link>https://svn.boost.org/trac10/ticket/5292#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5292#comment:1</guid> <description> <p> Thinking better... the gatherv prototype that calls gather is not great. Was discarded and the user needs to pass all sizes. </p> </description> <category>Ticket</category> </item> <item> <author>Júlio Hoffimann <julio.hoffimann@…></author> <pubDate>Wed, 20 Apr 2011 23:53:44 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5292#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5292#comment:2</guid> <description> <p> I don't understand so much about copyright terms, be free to remove my name in the header files. :-) </p> <p> Júlio. </p> </description> <category>Ticket</category> </item> <item> <author>Júlio Hoffimann <julio.hoffimann@…></author> <pubDate>Sat, 30 Jul 2011 13:15:46 GMT</pubDate> <title>type changed https://svn.boost.org/trac10/ticket/5292#comment:3 https://svn.boost.org/trac10/ticket/5292#comment:3 <ul> <li><strong>type</strong> <span class="trac-field-old">Feature Requests</span> → <span class="trac-field-new">Patches</span> </li> </ul> Ticket Matthias Troyer Tue, 01 Jan 2013 11:19:52 GMT owner changed https://svn.boost.org/trac10/ticket/5292#comment:4 https://svn.boost.org/trac10/ticket/5292#comment:4 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Douglas Gregor</span> to <span class="trac-author">Matthias Troyer</span> </li> </ul> Ticket dkushner2@… Wed, 09 Apr 2014 17:19:48 GMT <link>https://svn.boost.org/trac10/ticket/5292#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5292#comment:5</guid> <description> <p> Can we receive an update on this, please? Seems like an excellent and much-needed addition to the present implementation. As it stands, the Boost implementation of scatter is all but useless (i.e. no support for count-array and thus no ability to scatter a vector that is greater than the comm size). </p> </description> <category>Ticket</category> </item> </channel> </rss>