<?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 routines inside openmp parallel region in Intel® Moderncode for Parallel Architectures</title>
    <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/mpi-routines-inside-openmp-parallel-region/m-p/785625#M305</link>
    <description>It's "illegal" to mix threading with MPI, unless you use MPI_Init_thread() to ask your MPI to support the type of threading you intend to use. It would hardly be "weird" to encounter an assertion failure when you mix threading with MPI in a way different from what you announced.</description>
    <pubDate>Mon, 05 Jul 2010 04:55:59 GMT</pubDate>
    <dc:creator>TimP</dc:creator>
    <dc:date>2010-07-05T04:55:59Z</dc:date>
    <item>
      <title>mpi routines inside openmp parallel region</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/mpi-routines-inside-openmp-parallel-region/m-p/785624#M304</link>
      <description>Does anyone know if it is illegal to call mpi routines (specifically MPI_ALLGATHER) inside a openmp parallel region (for example PARALLEL DO)? The structure I'm trying to describe is like this:&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;[fortran]program main
  use mymod
  ...

  !$OMP PARALLEL DO ...
  call mysub(...)
  !$OMP END PARALLEL DO

end program

module mymod

contains
  subroutine mysub(...)
    use mpi
    ...    
    
    call MPI_ALLGATHER(...)

  end subroutine mysub

end module[/fortran]&lt;/PRE&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Some code like the above gave a bug. Eventually I figured out if I commented the !$OMP pragmas that the error disappeared. (Btw, I thought using -openmp-stubs would cause the same behavior as commenting the pragmas, but that wasn't the case.) &lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;The error by the way was weird: "assertion failed in ch3_progress.c". I thought it was a fault mpi installation (because of this&lt;META http-equiv="content-type" content="text/html; charset=utf-8" /&gt;&lt;A href="http://lists.mcs.anl.gov/pipermail/mpich-discuss/2008-December/000195.html"&gt;http://lists.mcs.anl.gov/pipermail/mpich-discuss/2008-December/000195.html&lt;/A&gt;) on the cluster, but I tried mpich1 and mpich2 and both failed at the same point but worked before then. &lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;By the way, the ifort version is old (10.1 20080312) but I'm not an admin on the cluster so there's little I can do about that. The MPI versions mpich-1.2.7p1 and mpich2-1.0.5p3. And I'm using linux.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Thanks.&lt;/DIV&gt;</description>
      <pubDate>Sun, 04 Jul 2010 21:20:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/mpi-routines-inside-openmp-parallel-region/m-p/785624#M304</guid>
      <dc:creator>Richard_Gordon</dc:creator>
      <dc:date>2010-07-04T21:20:26Z</dc:date>
    </item>
    <item>
      <title>mpi routines inside openmp parallel region</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/mpi-routines-inside-openmp-parallel-region/m-p/785625#M305</link>
      <description>It's "illegal" to mix threading with MPI, unless you use MPI_Init_thread() to ask your MPI to support the type of threading you intend to use. It would hardly be "weird" to encounter an assertion failure when you mix threading with MPI in a way different from what you announced.</description>
      <pubDate>Mon, 05 Jul 2010 04:55:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/mpi-routines-inside-openmp-parallel-region/m-p/785625#M305</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2010-07-05T04:55:59Z</dc:date>
    </item>
  </channel>
</rss>

