<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Why does it take so long to complete MPI_Comm_spawn? in Intel® MPI Library</title>
    <link>https://community.intel.com/t5/Intel-MPI-Library/Why-does-it-take-so-long-to-complete-MPI-Comm-spawn/m-p/922146#M2396</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I've using MPI_Comm_spawn in my code to dynamic create only one process but it takes a long time to complete (about 15s on Intel Xeon E5620&amp;nbsp;2.40GHz). I'm doing anything else but to call MPI_Comm_spawn. My simple code is:&lt;/P&gt;
&lt;PRE class="brush:cpp;"&gt;#include &amp;lt;mpi.h&amp;gt;
#include &amp;lt;stdio.h&amp;gt;

int main(int argc, char ** argv)
{
        int rank;
        MPI_Comm comm_parent, intercomm;
        int errcodes;
        double t0, t1;

        MPI_Init(&amp;amp;argc, &amp;amp;argv);
        MPI_Comm_get_parent(&amp;amp;comm_parent);

        if(comm_parent == MPI_COMM_NULL){
                // Parent process
                t0 = MPI_Wtime();
                MPI_Comm_spawn(argv[0], &amp;amp;argv[1], 1, MPI_INFO_NULL, 0, MPI_COMM_SELF, &amp;amp;intercomm, &amp;amp;errcodes);
                t1 = MPI_Wtime();
                printf("Spawn time: %f\n", t1-t0);
        }
        else{
                // Child process
                sleep(5);
                printf("child created\n");
        }
        MPI_Finalize();
        return(0);
}
&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Compiling:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;$ mpiicc teste_spawn2.c -o teste_spawn&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Running:&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;$ mpirun -n 1 -r ssh ./teste_spawn&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Output:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Spawn time: 15.221280&lt;BR /&gt;child created&lt;/P&gt;
&lt;P&gt;Does anyone know why?&lt;/P&gt;
&lt;P&gt;Fernanda&lt;/P&gt;</description>
    <pubDate>Fri, 21 Feb 2014 21:05:00 GMT</pubDate>
    <dc:creator>fgpassos</dc:creator>
    <dc:date>2014-02-21T21:05:00Z</dc:date>
    <item>
      <title>Why does it take so long to complete MPI_Comm_spawn?</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Why-does-it-take-so-long-to-complete-MPI-Comm-spawn/m-p/922146#M2396</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I've using MPI_Comm_spawn in my code to dynamic create only one process but it takes a long time to complete (about 15s on Intel Xeon E5620&amp;nbsp;2.40GHz). I'm doing anything else but to call MPI_Comm_spawn. My simple code is:&lt;/P&gt;
&lt;PRE class="brush:cpp;"&gt;#include &amp;lt;mpi.h&amp;gt;
#include &amp;lt;stdio.h&amp;gt;

int main(int argc, char ** argv)
{
        int rank;
        MPI_Comm comm_parent, intercomm;
        int errcodes;
        double t0, t1;

        MPI_Init(&amp;amp;argc, &amp;amp;argv);
        MPI_Comm_get_parent(&amp;amp;comm_parent);

        if(comm_parent == MPI_COMM_NULL){
                // Parent process
                t0 = MPI_Wtime();
                MPI_Comm_spawn(argv[0], &amp;amp;argv[1], 1, MPI_INFO_NULL, 0, MPI_COMM_SELF, &amp;amp;intercomm, &amp;amp;errcodes);
                t1 = MPI_Wtime();
                printf("Spawn time: %f\n", t1-t0);
        }
        else{
                // Child process
                sleep(5);
                printf("child created\n");
        }
        MPI_Finalize();
        return(0);
}
&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Compiling:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;$ mpiicc teste_spawn2.c -o teste_spawn&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Running:&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;$ mpirun -n 1 -r ssh ./teste_spawn&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Output:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Spawn time: 15.221280&lt;BR /&gt;child created&lt;/P&gt;
&lt;P&gt;Does anyone know why?&lt;/P&gt;
&lt;P&gt;Fernanda&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2014 21:05:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Why-does-it-take-so-long-to-complete-MPI-Comm-spawn/m-p/922146#M2396</guid>
      <dc:creator>fgpassos</dc:creator>
      <dc:date>2014-02-21T21:05:00Z</dc:date>
    </item>
    <item>
      <title>Hi Fernanda,</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Why-does-it-take-so-long-to-complete-MPI-Comm-spawn/m-p/922147#M2397</link>
      <description>&lt;P&gt;Hi Fernanda,&lt;/P&gt;

&lt;P&gt;Please send the output from:&lt;/P&gt;

&lt;P&gt;[plain]icc -V&lt;/P&gt;

&lt;P&gt;mpirun -V&lt;/P&gt;

&lt;P&gt;env | grep I_MPI&lt;/P&gt;

&lt;P&gt;mpirun -n 1 -genv I_MPI_DEBUG 5 ./teste_spawn[/plain]&lt;/P&gt;

&lt;P&gt;I'm getting a spawn time of approximately 0.21 s with icc 14.0.1.106 and IMPI 4.1 Update 2.&lt;/P&gt;

&lt;P&gt;Sincerely,&lt;BR /&gt;
	James Tullos&lt;BR /&gt;
	Technical Consulting Engineer&lt;BR /&gt;
	Intel® Cluster Tools&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2014 19:53:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Why-does-it-take-so-long-to-complete-MPI-Comm-spawn/m-p/922147#M2397</guid>
      <dc:creator>James_T_Intel</dc:creator>
      <dc:date>2014-03-06T19:53:20Z</dc:date>
    </item>
    <item>
      <title>Fernanda,</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Why-does-it-take-so-long-to-complete-MPI-Comm-spawn/m-p/922148#M2398</link>
      <description>&lt;P&gt;Fernanda,&lt;/P&gt;

&lt;P&gt;On additional testing, it appears that this occurs on every 8th rank launched on a node.&amp;nbsp; Our developers have stated that this is intentional, as a means of not overloading SSH connections.&amp;nbsp; As such, it will not be fixed.&lt;/P&gt;</description>
      <pubDate>Thu, 08 May 2014 13:10:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Why-does-it-take-so-long-to-complete-MPI-Comm-spawn/m-p/922148#M2398</guid>
      <dc:creator>James_T_Intel</dc:creator>
      <dc:date>2014-05-08T13:10:32Z</dc:date>
    </item>
  </channel>
</rss>

