<?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 Detecting process failure using Intel MPI in Intel® MPI Library</title>
    <link>https://community.intel.com/t5/Intel-MPI-Library/Detecting-process-failure-using-Intel-MPI/m-p/819675#M1151</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I'm trying to use MPI_Errhandler_set in the communicator from a process created by MPI_Comm_spawn. I would like to detect process failure and do something about it.&lt;BR /&gt;&lt;BR /&gt;My testing code is:&lt;BR /&gt;&lt;BR /&gt;------------------&lt;BR /&gt;&lt;B&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;#include &lt;UNISTD.H&gt;&lt;BR /&gt;#include &lt;MPI.H&gt;&lt;BR /&gt;&lt;BR /&gt;int main(int argc, char ** argv){&lt;BR /&gt;&lt;BR /&gt; MPI_Comm comm_parent, intercomm;&lt;BR /&gt; int err, errRecv;&lt;BR /&gt; int v = 0;&lt;BR /&gt; MPI_Status status;&lt;BR /&gt; MPI_Info info;&lt;BR /&gt;&lt;BR /&gt; MPI_Init(&amp;amp;argc, &amp;amp;argv);&lt;BR /&gt; MPI_Comm_get_parent(&amp;amp;comm_parent);&lt;BR /&gt;&lt;BR /&gt; if(comm_parent == MPI_COMM_NULL){&lt;BR /&gt;&lt;BR /&gt; MPI_Info_create(&amp;amp;info);&lt;BR /&gt; MPI_Info_set(info, "host", "192.168.0.2");&lt;BR /&gt;&lt;BR /&gt; printf("Parent creates child...\\n");&lt;BR /&gt; MPI_Comm_spawn(argv[0], MPI_ARGV_NULL, 1, info, 0, MPI_COMM_SELF, &amp;amp;intercomm, &amp;amp;err);&lt;BR /&gt;&lt;BR /&gt; MPI_Errhandler_set(intercomm, MPI_ERRORS_RETURN);&lt;BR /&gt;&lt;BR /&gt; printf("Waiting...\\n");&lt;BR /&gt; errRecv = MPI_Recv(&amp;amp;v, 1, MPI_INT, 0, 0, intercomm, &amp;amp;status);&lt;BR /&gt;&lt;BR /&gt; if(errRecv != MPI_SUCCESS){&lt;BR /&gt; printf("Error detected!\\n");&lt;BR /&gt; fflush(stdout);&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt; }&lt;BR /&gt; else{&lt;BR /&gt;&lt;BR /&gt; sleep(60);&lt;BR /&gt; MPI_Send(&amp;amp;v, 1, MPI_INT, 0, 0, comm_parent);&lt;BR /&gt;&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt; printf("Finalize\\n");&lt;BR /&gt; MPI_Finalize();&lt;BR /&gt; return(0);&lt;BR /&gt;&lt;BR /&gt;}&lt;/MPI.H&gt;&lt;/UNISTD.H&gt;&lt;/STDIO.H&gt;&lt;/B&gt;&lt;BR /&gt;------------------&lt;BR /&gt;&lt;BR /&gt;I typed in a terminal:&lt;BR /&gt;&lt;BR /&gt;&lt;B&gt;$ export I_MPI_FAULT_CONTINUE=on&lt;BR /&gt;$ mpicc test.c -o test -Wall&lt;BR /&gt;$ mpirun -np 1 ./test 1&lt;/B&gt;&lt;BR /&gt;&lt;BR /&gt;In another terminal, I killed child process and parent process stoped without printing the following messages (from printf). The output is only:&lt;BR /&gt;&lt;BR /&gt;&lt;B&gt;&lt;SPAN class="sectionBody"&gt;$ mpirun -np 1 ./test 1&lt;BR /&gt;Parent creates child...&lt;BR /&gt;Waiting...&lt;BR /&gt;$ &lt;/SPAN&gt;&lt;BR /&gt;&lt;/B&gt;&lt;BR /&gt;I was expecting that the program to continue and print "Error detected!" and "Finalize".&lt;BR /&gt;Why doesn't it happen?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Fernanda Oliveira&lt;BR /&gt;</description>
    <pubDate>Mon, 03 Oct 2011 18:33:26 GMT</pubDate>
    <dc:creator>fgpassos</dc:creator>
    <dc:date>2011-10-03T18:33:26Z</dc:date>
    <item>
      <title>Detecting process failure using Intel MPI</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Detecting-process-failure-using-Intel-MPI/m-p/819675#M1151</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I'm trying to use MPI_Errhandler_set in the communicator from a process created by MPI_Comm_spawn. I would like to detect process failure and do something about it.&lt;BR /&gt;&lt;BR /&gt;My testing code is:&lt;BR /&gt;&lt;BR /&gt;------------------&lt;BR /&gt;&lt;B&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;#include &lt;UNISTD.H&gt;&lt;BR /&gt;#include &lt;MPI.H&gt;&lt;BR /&gt;&lt;BR /&gt;int main(int argc, char ** argv){&lt;BR /&gt;&lt;BR /&gt; MPI_Comm comm_parent, intercomm;&lt;BR /&gt; int err, errRecv;&lt;BR /&gt; int v = 0;&lt;BR /&gt; MPI_Status status;&lt;BR /&gt; MPI_Info info;&lt;BR /&gt;&lt;BR /&gt; MPI_Init(&amp;amp;argc, &amp;amp;argv);&lt;BR /&gt; MPI_Comm_get_parent(&amp;amp;comm_parent);&lt;BR /&gt;&lt;BR /&gt; if(comm_parent == MPI_COMM_NULL){&lt;BR /&gt;&lt;BR /&gt; MPI_Info_create(&amp;amp;info);&lt;BR /&gt; MPI_Info_set(info, "host", "192.168.0.2");&lt;BR /&gt;&lt;BR /&gt; printf("Parent creates child...\\n");&lt;BR /&gt; MPI_Comm_spawn(argv[0], MPI_ARGV_NULL, 1, info, 0, MPI_COMM_SELF, &amp;amp;intercomm, &amp;amp;err);&lt;BR /&gt;&lt;BR /&gt; MPI_Errhandler_set(intercomm, MPI_ERRORS_RETURN);&lt;BR /&gt;&lt;BR /&gt; printf("Waiting...\\n");&lt;BR /&gt; errRecv = MPI_Recv(&amp;amp;v, 1, MPI_INT, 0, 0, intercomm, &amp;amp;status);&lt;BR /&gt;&lt;BR /&gt; if(errRecv != MPI_SUCCESS){&lt;BR /&gt; printf("Error detected!\\n");&lt;BR /&gt; fflush(stdout);&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt; }&lt;BR /&gt; else{&lt;BR /&gt;&lt;BR /&gt; sleep(60);&lt;BR /&gt; MPI_Send(&amp;amp;v, 1, MPI_INT, 0, 0, comm_parent);&lt;BR /&gt;&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt; printf("Finalize\\n");&lt;BR /&gt; MPI_Finalize();&lt;BR /&gt; return(0);&lt;BR /&gt;&lt;BR /&gt;}&lt;/MPI.H&gt;&lt;/UNISTD.H&gt;&lt;/STDIO.H&gt;&lt;/B&gt;&lt;BR /&gt;------------------&lt;BR /&gt;&lt;BR /&gt;I typed in a terminal:&lt;BR /&gt;&lt;BR /&gt;&lt;B&gt;$ export I_MPI_FAULT_CONTINUE=on&lt;BR /&gt;$ mpicc test.c -o test -Wall&lt;BR /&gt;$ mpirun -np 1 ./test 1&lt;/B&gt;&lt;BR /&gt;&lt;BR /&gt;In another terminal, I killed child process and parent process stoped without printing the following messages (from printf). The output is only:&lt;BR /&gt;&lt;BR /&gt;&lt;B&gt;&lt;SPAN class="sectionBody"&gt;$ mpirun -np 1 ./test 1&lt;BR /&gt;Parent creates child...&lt;BR /&gt;Waiting...&lt;BR /&gt;$ &lt;/SPAN&gt;&lt;BR /&gt;&lt;/B&gt;&lt;BR /&gt;I was expecting that the program to continue and print "Error detected!" and "Finalize".&lt;BR /&gt;Why doesn't it happen?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Fernanda Oliveira&lt;BR /&gt;</description>
      <pubDate>Mon, 03 Oct 2011 18:33:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Detecting-process-failure-using-Intel-MPI/m-p/819675#M1151</guid>
      <dc:creator>fgpassos</dc:creator>
      <dc:date>2011-10-03T18:33:26Z</dc:date>
    </item>
    <item>
      <title>Detecting process failure using Intel MPI</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Detecting-process-failure-using-Intel-MPI/m-p/819676#M1152</link>
      <description>Hi Fernanda,&lt;BR /&gt;&lt;BR /&gt;According to the documentation, Fault Tolerance works only for master-slave processes and only for processes which rank is not 0. Also you need to set Errhandler for MPI_COMM_WORLD. Might be it's not obvious but it means that fault tolerance feature won't work for spawn processes (you can see that both processes in your case have rank 0).&lt;BR /&gt;You just need to modify your program:&lt;BR /&gt;&lt;B&gt; MPI_Init(&amp;amp;argc, &amp;amp;argv);&lt;/B&gt;&lt;BR /&gt;&lt;B&gt;MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_RETURN);&lt;/B&gt;&lt;BR /&gt;&lt;BR /&gt;And start 2 processes: mpirun -np 2 ...&lt;BR /&gt;So, you need also change &lt;BR /&gt;&lt;B&gt;if(comm_parent == MPI_COMM_NULL){&lt;BR /&gt;to &lt;BR /&gt;&lt;/B&gt;&lt;B&gt;if(rank == 0){&lt;/B&gt;&lt;BR /&gt;&lt;BR /&gt;Working with spawned processes is very difficult task and I'd recommend avoiding this scheme of MPI programming.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt; Dmitry&lt;BR /&gt;</description>
      <pubDate>Tue, 04 Oct 2011 06:39:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Detecting-process-failure-using-Intel-MPI/m-p/819676#M1152</guid>
      <dc:creator>Dmitry_K_Intel2</dc:creator>
      <dc:date>2011-10-04T06:39:23Z</dc:date>
    </item>
    <item>
      <title>Detecting process failure using Intel MPI</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Detecting-process-failure-using-Intel-MPI/m-p/819677#M1153</link>
      <description>Our testing has shown that in addition to the restrictions on fault tolerance mentioned in the MPI reference guide, it also only works when the slave process send only and the master receives with MPI_WaitAny, on a vector if receive objects. When an error is received that object must be eliminated from the vector and not called again. All other scenarios we tried resulted in various system failures.</description>
      <pubDate>Tue, 11 Oct 2011 06:01:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Detecting-process-failure-using-Intel-MPI/m-p/819677#M1153</guid>
      <dc:creator>David_M_13</dc:creator>
      <dc:date>2011-10-11T06:01:38Z</dc:date>
    </item>
  </channel>
</rss>

