<?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 MPI_WAITALL difference OpenMPI - MPI in Intel® Moderncode for Parallel Architectures</title>
    <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/MPI-WAITALL-difference-OpenMPI-MPI/m-p/1108658#M7431</link>
    <description>&lt;P&gt;Dear all,&lt;/P&gt;

&lt;P&gt;I have written the following code:&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt; REQUEST = MPI_REQUEST_NULL
 !send data share with left
 IF(MPIdata%rank.NE.0)THEN
    MsgLength = MPIdata%imaxN
    DO icount=1,MPIdata%imaxN
            iNode = MPIdata%nodeFromUp(icount)
            send_messageL(icount) = R1(iNode)
    ENDDO
    CALL MPI_ISEND(send_messageL, MsgLength, MPIdata%AUTO_COMP, MPIdata%rank-1, MPIdata%rank, MPI_COMM_WORLD, REQUEST(1), MPIdata%iErr)
 ENDIF
 !
 !recive message FROM RIGHT CPU
 IF(MPIdata%rank.NE.MPIdata%nCPU-1)THEN
    MsgLength = MPIdata%imaxN
    CALL MPI_IRECV(recv_messageR, MsgLength, MPIdata%AUTO_COMP, MPIdata%rank+1, MPIdata%rank+1, MPI_COMM_WORLD, REQUEST(2), MPIdata%iErr)
 ENDIF
 CALL MPI_WAITALL(2,REQUEST,send_status_list,MPIdata%iErr)
 IF(MPIdata%rank.NE.MPIdata%nCPU-1)THEN
    DO i=1,MPIdata%imaxN
       iNode=MPIdata%nodeList2Up(i)
       R1(iNode)=recv_messageR(i)
    ENDDO
 ENDIF&lt;/PRE&gt;

&lt;P&gt;The code works with fortran and OpenMPI. The same code does not work with intel MPI and I do not why. I get the following error:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;Fatal error in MPI_Waitall: Invalid MPI_Request, error stack:
MPI_Waitall(271): MPI_Waitall(count=3, req_array=0x7445f0, status_array=0x744600) failed
MPI_Waitall(119): The supplied request in array element 2 was invalid (kind=0)
&lt;/PRE&gt;

&lt;P&gt;Can someone help me, please?&lt;/P&gt;

&lt;P&gt;Thanks a lot&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 29 Jan 2016 10:59:53 GMT</pubDate>
    <dc:creator>diedro</dc:creator>
    <dc:date>2016-01-29T10:59:53Z</dc:date>
    <item>
      <title>MPI_WAITALL difference OpenMPI - MPI</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/MPI-WAITALL-difference-OpenMPI-MPI/m-p/1108658#M7431</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;

&lt;P&gt;I have written the following code:&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt; REQUEST = MPI_REQUEST_NULL
 !send data share with left
 IF(MPIdata%rank.NE.0)THEN
    MsgLength = MPIdata%imaxN
    DO icount=1,MPIdata%imaxN
            iNode = MPIdata%nodeFromUp(icount)
            send_messageL(icount) = R1(iNode)
    ENDDO
    CALL MPI_ISEND(send_messageL, MsgLength, MPIdata%AUTO_COMP, MPIdata%rank-1, MPIdata%rank, MPI_COMM_WORLD, REQUEST(1), MPIdata%iErr)
 ENDIF
 !
 !recive message FROM RIGHT CPU
 IF(MPIdata%rank.NE.MPIdata%nCPU-1)THEN
    MsgLength = MPIdata%imaxN
    CALL MPI_IRECV(recv_messageR, MsgLength, MPIdata%AUTO_COMP, MPIdata%rank+1, MPIdata%rank+1, MPI_COMM_WORLD, REQUEST(2), MPIdata%iErr)
 ENDIF
 CALL MPI_WAITALL(2,REQUEST,send_status_list,MPIdata%iErr)
 IF(MPIdata%rank.NE.MPIdata%nCPU-1)THEN
    DO i=1,MPIdata%imaxN
       iNode=MPIdata%nodeList2Up(i)
       R1(iNode)=recv_messageR(i)
    ENDDO
 ENDIF&lt;/PRE&gt;

&lt;P&gt;The code works with fortran and OpenMPI. The same code does not work with intel MPI and I do not why. I get the following error:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;Fatal error in MPI_Waitall: Invalid MPI_Request, error stack:
MPI_Waitall(271): MPI_Waitall(count=3, req_array=0x7445f0, status_array=0x744600) failed
MPI_Waitall(119): The supplied request in array element 2 was invalid (kind=0)
&lt;/PRE&gt;

&lt;P&gt;Can someone help me, please?&lt;/P&gt;

&lt;P&gt;Thanks a lot&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2016 10:59:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/MPI-WAITALL-difference-OpenMPI-MPI/m-p/1108658#M7431</guid>
      <dc:creator>diedro</dc:creator>
      <dc:date>2016-01-29T10:59:53Z</dc:date>
    </item>
  </channel>
</rss>

