Boost C++ Libraries: Ticket #2485: MPI broadcast issue https://svn.boost.org/trac10/ticket/2485 <p> The broadcast function is crashing and I can't see anything that I am doing wrong. Below I have the code and output to a very simple program that I used test the boost API. </p> <p> I compiled the boost libraries using Visual Studio 2008 SP1. I linked the MPI library against msmpi that is provided with the HPC server 2008 SDK. I ran this on a single HPC server 2008 box, so there is no cluster involved. It is the simplest case possible. </p> <p> Thanks for your help, Bryon </p> <p> Example Program <strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong>* int main(int argc, char* argv[]) { </strong></p> <blockquote> <p> mpi::environment env(argc, argv); mpi::communicator world; char value<a class="changeset" href="https://svn.boost.org/trac10/changeset/128" title="*** empty log message *** ">[128]</a>={'\0'}; if(world.rank()==0){ </p> <blockquote> <p> strcpy(value,"Hello Bryon from C API\0"); cout&lt;&lt;"start "&lt;&lt;value&lt;&lt;endl; </p> </blockquote> <p> } </p> </blockquote> <p> </p> <blockquote> <p> MPI_Bcast(value,12 , MPI_INT, 0, MPI_COMM_WORLD); std::cout&lt;&lt;world.rank()&lt;&lt;" " &lt;&lt; value&lt;&lt;std::endl; </p> </blockquote> <blockquote> <p> bool was_successful=false; if(world.rank()==0) </p> <blockquote> <p> was_successful=true; </p> </blockquote> <p> mpi::broadcast(world,was_successful,0); std::cout&lt;&lt;world.rank()&lt;&lt;" :"&lt;&lt;(was_successful?"Success with broacasting boolean":"Failure with broadcasting boolean")&lt;&lt;std::endl; </p> </blockquote> <blockquote> <p> std::string bvalue; if(world.rank()==0) </p> <blockquote> <p> bvalue="Hello Bryon from boost API with string."; </p> </blockquote> <p> mpi::broadcast(world,bvalue,0); std::cout&lt;&lt;world.rank()&lt;&lt;" :"&lt;&lt;bvalue&lt;&lt;std::endl; </p> </blockquote> <blockquote> <p> return 0; </p> </blockquote> <p> } </p> <p> Output <strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong> </p> <p> E:\HPC Class\hpcs-day3\HPCS-Day3\demos\09 MPI-Send-Recv\TaskParallelMPI\x64\rele ase&gt;mpiexec -n 2 TaskParallelMPI start Hello Bryon from C API 0 Hello Bryon from C API 0 :Success with broacasting boolean 1 Hello Bryon from C API 1 :Success with broacasting boolean </p> <p> This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. </p> <p> job aborted: [ranks] message </p> <p> <a class="missing changeset" title="No changeset 0 in the repository">[0]</a> terminated </p> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/1" title="Import core sources for SVNmanger 0.38 ">[1]</a> process exited without calling finalize </p> <hr /> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/1" title="Import core sources for SVNmanger 0.38 ">[1]</a> on 2008ROBIDOUXBR TaskParallelMPI ended prematurely and may have crashed. exit code 255 </p> <hr /> <p> E:\HPC Class\hpcs-day3\HPCS-Day3\demos\09 MPI-Send-Recv\TaskParallelMPI\x64\rele ase&gt; </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2485 Trac 1.4.3 Matthias Troyer Thu, 06 Aug 2009 18:54:56 GMT owner changed https://svn.boost.org/trac10/ticket/2485#comment:1 https://svn.boost.org/trac10/ticket/2485#comment:1 <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 Matthias Troyer Thu, 06 Aug 2009 18:55:12 GMT status changed https://svn.boost.org/trac10/ticket/2485#comment:2 https://svn.boost.org/trac10/ticket/2485#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> Ticket Matthias Troyer Thu, 06 Aug 2009 19:56:11 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/2485#comment:3 https://svn.boost.org/trac10/ticket/2485#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">worksforme</span> </li> </ul> <p> I tried this on the platforms available to me and it works. Since I don't have a Windows machine I cannot test it there. I will close this ticket until someone can confirm this on a Windows machine and can help me debug this. </p> Ticket