<?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 Problem with MPI_detach in Intel® Moderncode for Parallel Architectures</title>
    <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Problem-with-MPI-detach/m-p/803115#M691</link>
    <description>You could more likely get an expert answer on the HPC forum. I'm not totally surprised that you may not be able to release the buffers until MPI_RECV is complete. OpenMPI seems to be more tolerant of such things.</description>
    <pubDate>Wed, 09 Jun 2010 22:41:03 GMT</pubDate>
    <dc:creator>TimP</dc:creator>
    <dc:date>2010-06-09T22:41:03Z</dc:date>
    <item>
      <title>Problem with MPI_detach</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Problem-with-MPI-detach/m-p/803114#M690</link>
      <description>Hi everyone,&lt;BR /&gt;I'm experiencing a problem with the intel implementation of MPI (version 4.0.0.027) used in conjunction with the Intel compiler (version 11.1.072)on a Linux RedHat cluster. The code is written in Fortran 90.&lt;BR /&gt;The problem arises when I execute a Buffered Send (MPI_BSEND) between the master (0) and all the other processes, including itself. It is required to attach (MPI_ATTACH) a buffer of sufficient size and then detach it (MPI_DETACH) when the messages have been sent.&lt;BR /&gt;Unfortunately, the code gets stuck during the MPI_DETACH without any reason.&lt;BR /&gt;When I use the same code with Open MPI (and the same intel compiler) the code is executed correcly.&lt;BR /&gt;&lt;BR /&gt;I know that in this case I could use other types of send/receive or (in many cases) broadcast. Alternatively I could also exclude the master from the process and send only to the rest of the processes, but there are reasons for using the chosen structure.&lt;BR /&gt;&lt;BR /&gt;The problem can be reproduced with the following Fortran code:&lt;BR /&gt;&lt;BR /&gt;&lt;P&gt;program main&lt;/P&gt;&lt;P&gt; implicit none&lt;/P&gt;&lt;P&gt;include 'mpif.h'&lt;/P&gt;&lt;P&gt; integer i, send_buf, recv_buf, nprocs, rank, namelen, ierr, req&lt;BR /&gt; character (len=MPI_MAX_PROCESSOR_NAME) :: name&lt;BR /&gt; integer stat(MPI_STATUS_SIZE)&lt;BR /&gt; INTEGER :: bsend_size&lt;BR /&gt; CHARACTER, dimension (:), allocatable :: bsend_buffer&lt;/P&gt;&lt;P&gt; call MPI_INIT (ierr)&lt;/P&gt;&lt;P&gt; call MPI_COMM_SIZE (MPI_COMM_WORLD, nprocs, ierr)&lt;BR /&gt; call MPI_COMM_RANK (MPI_COMM_WORLD, rank, ierr)&lt;BR /&gt; call MPI_GET_PROCESSOR_NAME (name, namelen, ierr)&lt;/P&gt;&lt;P&gt; if (rank.eq.0) then&lt;/P&gt;&lt;P&gt; bsend_size = nprocs*(1*MPI_INTEGER + MPI_BSEND_OVERHEAD)&lt;/P&gt;&lt;P&gt; allocate(bsend_buffer(bsend_size))&lt;BR /&gt; call MPI_Buffer_attach(bsend_buffer, bsend_size, ierr)&lt;/P&gt;&lt;P&gt; do i = 0, nprocs - 1&lt;BR /&gt; send_buf = i*10&lt;BR /&gt; call MPI_BSEND (send_buf, 1, MPI_INTEGER, i, 1, MPI_COMM_WORLD, ierr)&lt;BR /&gt; enddo&lt;/P&gt;&lt;P&gt; ! attached buffer always need to be detached after use&lt;BR /&gt; call MPI_Buffer_detach(bsend_buffer, bsend_size, ierr)&lt;BR /&gt; deallocate(bsend_buffer)&lt;BR /&gt; end if&lt;/P&gt;&lt;P&gt; call MPI_RECV (recv_buf, 1, MPI_INTEGER, 0, 1, MPI_COMM_WORLD, stat, ierr)&lt;/P&gt;&lt;P&gt; print *, 'Hello world: rank ', rank, 'received', recv_buf&lt;/P&gt;&lt;P&gt; call MPI_BARRIER(MPI_COMM_WORLD, ierr)&lt;/P&gt;&lt;P&gt; call MPI_FINALIZE (ierr)&lt;/P&gt;&lt;P&gt; end&lt;BR /&gt;&lt;BR /&gt;Is anyone aware of a known issue with this type of calls?&lt;BR /&gt;&lt;BR /&gt;Thank you!&lt;BR /&gt;&lt;BR /&gt;Pietro Ghillani&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2010 17:04:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Problem-with-MPI-detach/m-p/803114#M690</guid>
      <dc:creator>ghillo_ptiscali_it</dc:creator>
      <dc:date>2010-06-08T17:04:57Z</dc:date>
    </item>
    <item>
      <title>Problem with MPI_detach</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Problem-with-MPI-detach/m-p/803115#M691</link>
      <description>You could more likely get an expert answer on the HPC forum. I'm not totally surprised that you may not be able to release the buffers until MPI_RECV is complete. OpenMPI seems to be more tolerant of such things.</description>
      <pubDate>Wed, 09 Jun 2010 22:41:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Problem-with-MPI-detach/m-p/803115#M691</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2010-06-09T22:41:03Z</dc:date>
    </item>
    <item>
      <title>Problem with MPI_detach</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Problem-with-MPI-detach/m-p/803116#M692</link>
      <description>Thank you. I was just not thinking about this aspect.&lt;BR /&gt;I think you're right, Intel MPI is less tolerant on this.&lt;BR /&gt;I tried to detach it after the receive and everything worked fine.&lt;BR /&gt;So, no need topost it again.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;</description>
      <pubDate>Thu, 10 Jun 2010 09:02:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Problem-with-MPI-detach/m-p/803116#M692</guid>
      <dc:creator>ghillo_ptiscali_it</dc:creator>
      <dc:date>2010-06-10T09:02:27Z</dc:date>
    </item>
  </channel>
</rss>

