<?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 allocatable array should only be allocate in omp zone? in Intel® Moderncode for Parallel Architectures</title>
    <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/allocatable-array-should-only-be-allocate-in-omp-zone/m-p/823470#M1289</link>
    <description>I have a question about allocatable array in omp zone.&lt;BR /&gt;An allocatable array, which is private in parallel zone, is already allocated before go to the parallel zone, why there is still an error 'attempt to fetch from allocatable variable *** which is not allocated'?&lt;BR /&gt;Is it should allocate in each thread? or there is any other way?&lt;BR /&gt;&lt;BR /&gt;thanks!</description>
    <pubDate>Tue, 14 Sep 2010 14:33:03 GMT</pubDate>
    <dc:creator>vectorzhang</dc:creator>
    <dc:date>2010-09-14T14:33:03Z</dc:date>
    <item>
      <title>allocatable array should only be allocate in omp zone?</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/allocatable-array-should-only-be-allocate-in-omp-zone/m-p/823470#M1289</link>
      <description>I have a question about allocatable array in omp zone.&lt;BR /&gt;An allocatable array, which is private in parallel zone, is already allocated before go to the parallel zone, why there is still an error 'attempt to fetch from allocatable variable *** which is not allocated'?&lt;BR /&gt;Is it should allocate in each thread? or there is any other way?&lt;BR /&gt;&lt;BR /&gt;thanks!</description>
      <pubDate>Tue, 14 Sep 2010 14:33:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/allocatable-array-should-only-be-allocate-in-omp-zone/m-p/823470#M1289</guid>
      <dc:creator>vectorzhang</dc:creator>
      <dc:date>2010-09-14T14:33:03Z</dc:date>
    </item>
    <item>
      <title>allocatable array should only be allocate in omp zone?</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/allocatable-array-should-only-be-allocate-in-omp-zone/m-p/823471#M1290</link>
      <description>When you want private allocatable arrays inside a parallel region (zone) have an unallocated array descriptor outside the region and then perform the thread allocation within the region.&lt;BR /&gt;&lt;BR /&gt;C++&lt;BR /&gt;&lt;BR /&gt;double* array;&lt;BR /&gt;...&lt;BR /&gt;#pragma omp parallel private(array)&lt;BR /&gt;{&lt;BR /&gt;array = new double[sizeArray];&lt;BR /&gt;#pragma omp for&lt;BR /&gt;for(int i = 0; i &amp;lt; sizeOther; ++i)&lt;BR /&gt;{&lt;BR /&gt; ...&lt;BR /&gt;}&lt;BR /&gt;delete [] array;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Fortran would use different looking OpenMP directives. The design would be the same.&lt;BR /&gt;&lt;BR /&gt;Note, the C++ programmer would be advised to place the double* array; inside the scope of the parallel region.&lt;BR /&gt;The Fortran programmer must declare the array descriptor up at the variable declaration section of the subroutine. This is why you pass in an empty array descriptor.&lt;BR /&gt;&lt;BR /&gt;Jim Dempsey</description>
      <pubDate>Fri, 17 Sep 2010 20:53:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/allocatable-array-should-only-be-allocate-in-omp-zone/m-p/823471#M1290</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2010-09-17T20:53:20Z</dc:date>
    </item>
  </channel>
</rss>

