<?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 Question about local allocatable arrays in  FORTRAN subroutines with OpenMP in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Question-about-local-allocatable-arrays-in-FORTRAN-subroutines/m-p/813570#M44125</link>
    <description>I'm trying to parallelize my FORTAN code using OpenMP. There are local allocatable arrays in subroutines. I wonder if these local allocatable arrays are private or shared. The results seemed to tell that these arrays were private. But the Intel Inspector XE reported quite a few data race problems with these allocatable arrays.</description>
    <pubDate>Tue, 31 May 2011 22:36:56 GMT</pubDate>
    <dc:creator>Wuwei_L_</dc:creator>
    <dc:date>2011-05-31T22:36:56Z</dc:date>
    <item>
      <title>Question about local allocatable arrays in  FORTRAN subroutines with OpenMP</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Question-about-local-allocatable-arrays-in-FORTRAN-subroutines/m-p/813570#M44125</link>
      <description>I'm trying to parallelize my FORTAN code using OpenMP. There are local allocatable arrays in subroutines. I wonder if these local allocatable arrays are private or shared. The results seemed to tell that these arrays were private. But the Intel Inspector XE reported quite a few data race problems with these allocatable arrays.</description>
      <pubDate>Tue, 31 May 2011 22:36:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Question-about-local-allocatable-arrays-in-FORTRAN-subroutines/m-p/813570#M44125</guid>
      <dc:creator>Wuwei_L_</dc:creator>
      <dc:date>2011-05-31T22:36:56Z</dc:date>
    </item>
    <item>
      <title>Question about local allocatable arrays in  FORTRAN subroutines</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Question-about-local-allocatable-arrays-in-FORTRAN-subroutines/m-p/813571#M44126</link>
      <description>Are the allocations performed within a parallel region in the subroutine where the array descriptor is declared? If so, you willneed to declare the (unallocated)array descriptor private.&lt;BR /&gt;&lt;BR /&gt;.OR.&lt;BR /&gt;&lt;BR /&gt;Are the subroutines called from within a parallel region? (including nested calls begun in a parallel region).&lt;BR /&gt;If so, then are these subroutines compiled with -openmp .OR. attributed with RECURSIVE?&lt;BR /&gt;&lt;BR /&gt;Recursive subroutines have the property where the array descriptor default placement is on the stack (you can override this with SAVE). -openmp has the effect of adding RECURSIVE to the subroutine (it wouldn't hurt to explicitly mark this subroutine as RECURSIVE).&lt;BR /&gt;&lt;BR /&gt;Posting problem code samples may help us in diagnosing your problem.&lt;BR /&gt;&lt;BR /&gt;Jim Dempsey&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 01 Jun 2011 01:15:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Question-about-local-allocatable-arrays-in-FORTRAN-subroutines/m-p/813571#M44126</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2011-06-01T01:15:34Z</dc:date>
    </item>
    <item>
      <title>Question about local allocatable arrays in  FORTRAN subroutines</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Question-about-local-allocatable-arrays-in-FORTRAN-subroutines/m-p/813572#M44127</link>
      <description>The subroutine is called within a parallel region and the array is allocated and deallocated with the parallel region. The following sample code illustrates the problem. The 'recursive' flag wasn't used in compiling the code.&lt;BR /&gt;-------------------------&lt;BR /&gt;program main&lt;BR /&gt;&lt;BR /&gt;integer :: i&lt;BR /&gt;&lt;BR /&gt;!$OMP PARALLEL DO&lt;BR /&gt; do i = 1, 4&lt;BR /&gt; call sub(i)&lt;BR /&gt; enddo &lt;BR /&gt;!$OMP END PARALLEL DO&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;contains&lt;BR /&gt;&lt;BR /&gt; subroutine sub(i)&lt;BR /&gt; integer :: i&lt;BR /&gt; integer, allocatable :: a(:)&lt;BR /&gt; &lt;BR /&gt; allocate(a(3))&lt;BR /&gt; &lt;BR /&gt; a = i&lt;BR /&gt; &lt;BR /&gt; !$omp critical&lt;BR /&gt; write(*,*) a(1:3)&lt;BR /&gt; !$omp end critical&lt;BR /&gt; &lt;BR /&gt; deallocate(a)&lt;BR /&gt; end subroutine&lt;BR /&gt;end program&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 01 Jun 2011 16:32:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Question-about-local-allocatable-arrays-in-FORTRAN-subroutines/m-p/813572#M44127</guid>
      <dc:creator>Wuwei_L_</dc:creator>
      <dc:date>2011-06-01T16:32:05Z</dc:date>
    </item>
    <item>
      <title>Question about local allocatable arrays in  FORTRAN subroutines</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Question-about-local-allocatable-arrays-in-FORTRAN-subroutines/m-p/813573#M44128</link>
      <description>The above should be fine. However you report it is not...&lt;BR /&gt;&lt;BR /&gt;See what happens with&lt;BR /&gt;&lt;BR /&gt; recursive subroutine sub(i)&lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;BR /&gt;subroutine sub(i)&lt;BR /&gt; integer :: i&lt;BR /&gt; integer, automatic,allocatable :: a(:)&lt;BR /&gt;&lt;BR /&gt;The recursive should be implicit when compiled for OpenMP. Stick it on to see what happens.&lt;BR /&gt;Also "automatic" is Intel specific (non-portable) which forces the array descriptor to go on stack.&lt;BR /&gt;Is the error sensitive to optimization level?&lt;BR /&gt;&lt;BR /&gt;Jim Dempsey</description>
      <pubDate>Wed, 01 Jun 2011 23:11:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Question-about-local-allocatable-arrays-in-FORTRAN-subroutines/m-p/813573#M44128</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2011-06-01T23:11:36Z</dc:date>
    </item>
    <item>
      <title>Question about local allocatable arrays in  FORTRAN subroutines</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Question-about-local-allocatable-arrays-in-FORTRAN-subroutines/m-p/813574#M44129</link>
      <description>Is the inspector message a report of a conflict (error) or performance issue. Allocate will use a critical section, but Inspector XE should special case allocation/deallocation.&lt;BR /&gt;&lt;BR /&gt;Jim Dempsey</description>
      <pubDate>Wed, 01 Jun 2011 23:15:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Question-about-local-allocatable-arrays-in-FORTRAN-subroutines/m-p/813574#M44129</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2011-06-01T23:15:01Z</dc:date>
    </item>
  </channel>
</rss>

