<?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 Crash in MPI_COMM_SPAWN_MULTIPLE in Intel® MPI Library</title>
    <link>https://community.intel.com/t5/Intel-MPI-Library/Crash-in-MPI-COMM-SPAWN-MULTIPLE/m-p/1039149#M4282</link>
    <description>&lt;P&gt;I trying to manually spawn MPI processes. This code works fine when compiled with gfortran and linked against the OpenMPI libraries but when I compile it using ifort and the Intel MPI libraries, it results in an internal crash within the MPI_COMM_SPAWN_MULTIPLE subroutine. The relevant code is&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;         ALLOCATE(commands(num_processes - 1))
         ALLOCATE(args(num_processes - 1,2))
         ALLOCATE(info(num_processes - 1))
         ALLOCATE(max_procs(num_processes - 1))
         ALLOCATE(error_array(num_processes - 1))

         commands = TRIM(context%cl_parser%command)

         args(:,1) = temp_string
         IF (num_threads .lt. 0) THEN
            args(:,2) = '-para=-1'
         ELSE IF (num_threads .lt. 10) THEN
            WRITE (temp_string, 1001) num_threads
            args(:,2) = TRIM(temp_string)
         ELSE
            WRITE (temp_string, 1002) num_threads
            args(:,2) = TRIM(temp_string)
         END IF

         max_procs = 1

         DO i = 2, num_processes
            CALL MPI_INFO_CREATE(info(i - 1), error)
            CALL MPI_INFO_SET(info(i - 1), "wdir", process_dir(i),             &amp;amp;
     &amp;amp;                        error)
         END DO

         CALL MPI_COMM_SPAWN_MULTIPLE(num_processes - 1, commands, args,       &amp;amp;
     &amp;amp;                                max_procs, info, 0,                      &amp;amp;
     &amp;amp;                                MPI_COMM_WORLD, child_comm,              &amp;amp;
     &amp;amp;                                error_array, error)

         CALL MPI_INTERCOMM_MERGE(child_comm, .false.,                         &amp;amp;
     &amp;amp;                            context%intra_comm, error)

         DO i = 1, num_processes - 1
            CALL MPI_INFO_FREE(info(i), error)
         END DO

         DEALLOCATE(info)
         DEALLOCATE(max_procs)
         DEALLOCATE(args)
         DEALLOCATE(commands)
         DEALLOCATE(error_array)&lt;/PRE&gt;

&lt;P&gt;When run this results in a&amp;nbsp;segmentation fault internal to MPI_COMM_SPAWN_MULTIPLE. With the following error&lt;/P&gt;

&lt;PRE class="brush:plain;"&gt;Program received signal SIGSEGV, Segmentation fault.
0x00002aaaaadeb304 in pmpi_comm_spawn_multiple__ () from /usr/local/intel/impi/3.2.0.011/lib64/libmpiif.so.3.2&lt;/PRE&gt;

&lt;P&gt;Is there something that I'm doing wrong here to cause this?&lt;/P&gt;</description>
    <pubDate>Wed, 03 Sep 2014 18:39:17 GMT</pubDate>
    <dc:creator>Mark_C_</dc:creator>
    <dc:date>2014-09-03T18:39:17Z</dc:date>
    <item>
      <title>Crash in MPI_COMM_SPAWN_MULTIPLE</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Crash-in-MPI-COMM-SPAWN-MULTIPLE/m-p/1039149#M4282</link>
      <description>&lt;P&gt;I trying to manually spawn MPI processes. This code works fine when compiled with gfortran and linked against the OpenMPI libraries but when I compile it using ifort and the Intel MPI libraries, it results in an internal crash within the MPI_COMM_SPAWN_MULTIPLE subroutine. The relevant code is&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;         ALLOCATE(commands(num_processes - 1))
         ALLOCATE(args(num_processes - 1,2))
         ALLOCATE(info(num_processes - 1))
         ALLOCATE(max_procs(num_processes - 1))
         ALLOCATE(error_array(num_processes - 1))

         commands = TRIM(context%cl_parser%command)

         args(:,1) = temp_string
         IF (num_threads .lt. 0) THEN
            args(:,2) = '-para=-1'
         ELSE IF (num_threads .lt. 10) THEN
            WRITE (temp_string, 1001) num_threads
            args(:,2) = TRIM(temp_string)
         ELSE
            WRITE (temp_string, 1002) num_threads
            args(:,2) = TRIM(temp_string)
         END IF

         max_procs = 1

         DO i = 2, num_processes
            CALL MPI_INFO_CREATE(info(i - 1), error)
            CALL MPI_INFO_SET(info(i - 1), "wdir", process_dir(i),             &amp;amp;
     &amp;amp;                        error)
         END DO

         CALL MPI_COMM_SPAWN_MULTIPLE(num_processes - 1, commands, args,       &amp;amp;
     &amp;amp;                                max_procs, info, 0,                      &amp;amp;
     &amp;amp;                                MPI_COMM_WORLD, child_comm,              &amp;amp;
     &amp;amp;                                error_array, error)

         CALL MPI_INTERCOMM_MERGE(child_comm, .false.,                         &amp;amp;
     &amp;amp;                            context%intra_comm, error)

         DO i = 1, num_processes - 1
            CALL MPI_INFO_FREE(info(i), error)
         END DO

         DEALLOCATE(info)
         DEALLOCATE(max_procs)
         DEALLOCATE(args)
         DEALLOCATE(commands)
         DEALLOCATE(error_array)&lt;/PRE&gt;

&lt;P&gt;When run this results in a&amp;nbsp;segmentation fault internal to MPI_COMM_SPAWN_MULTIPLE. With the following error&lt;/P&gt;

&lt;PRE class="brush:plain;"&gt;Program received signal SIGSEGV, Segmentation fault.
0x00002aaaaadeb304 in pmpi_comm_spawn_multiple__ () from /usr/local/intel/impi/3.2.0.011/lib64/libmpiif.so.3.2&lt;/PRE&gt;

&lt;P&gt;Is there something that I'm doing wrong here to cause this?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Sep 2014 18:39:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Crash-in-MPI-COMM-SPAWN-MULTIPLE/m-p/1039149#M4282</guid>
      <dc:creator>Mark_C_</dc:creator>
      <dc:date>2014-09-03T18:39:17Z</dc:date>
    </item>
  </channel>
</rss>

