<?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 OpenMP and allocatable fields of shared derived types in Intel® Moderncode for Parallel Architectures</title>
    <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/OpenMP-and-allocatable-fields-of-shared-derived-types/m-p/801473#M591</link>
    <description>&lt;P&gt;&lt;SPAN class="comments"&gt;&lt;SPAN style="color: #008200;"&gt;!$ompparallel&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;if(.not. allocated(a%vec) then&lt;BR /&gt; &lt;SPAN style="color: #008200;"&gt;!$ompcritical&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; if (.not. allocated(a%vec)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="keyword bold"&gt;&lt;STRONG&gt;&lt;SPAN style="color: #006699;"&gt;allocate&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;(a%vec(10))&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="comments"&gt;&lt;SPAN style="color: #008200;"&gt; !$ompendcritical&lt;BR /&gt;&lt;SPAN style="color: #000000;"&gt;endif&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;(assume other code here)&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="comments"&gt;&lt;SPAN style="color: #008200;"&gt;!$ompendparallel&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Your program was in error.&lt;BR /&gt;&lt;BR /&gt;Jim Dempsey&lt;/SPAN&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 23 Oct 2010 11:35:53 GMT</pubDate>
    <dc:creator>jimdempseyatthecove</dc:creator>
    <dc:date>2010-10-23T11:35:53Z</dc:date>
    <item>
      <title>OpenMP and allocatable fields of shared derived types</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/OpenMP-and-allocatable-fields-of-shared-derived-types/m-p/801470#M588</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I was wondering why this simple program:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;[fortran]program allocatable

  type pippo
     real(8), allocatable :: vec(:)
  end type pippo

  type(pippo) :: a

  !$omp parallel 
  !$omp single
  allocate(a%vec(10))
  !$omp end single
  !$omp end parallel

end program allocatable[/fortran]&lt;/PRE&gt; crashes when compiled with:&lt;BR /&gt;&lt;BR /&gt;&lt;UL&gt;&lt;LI&gt;ifort -openmp&lt;/LI&gt;&lt;/UL&gt;&lt;BR /&gt;Notice that the same program works fine when compiled with gfortran and PGI compiler. If anybody has a clue I would be really glad to hear that.&lt;BR /&gt;&lt;BR /&gt;M.</description>
      <pubDate>Fri, 22 Oct 2010 06:59:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/OpenMP-and-allocatable-fields-of-shared-derived-types/m-p/801470#M588</guid>
      <dc:creator>Massimiliano_Culpo</dc:creator>
      <dc:date>2010-10-22T06:59:33Z</dc:date>
    </item>
    <item>
      <title>OpenMP and allocatable fields of shared derived types</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/OpenMP-and-allocatable-fields-of-shared-derived-types/m-p/801471#M589</link>
      <description>Not with any version of ifort I have installed here (up to 14 weeks old, none older).&lt;BR /&gt;Maybe you found a buggy version of the compiler, or got the environment PATH settings fouled?&lt;BR /&gt;Are you certain, if you tried every past version of those other compilers, you would never find a bug?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 22 Oct 2010 13:24:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/OpenMP-and-allocatable-fields-of-shared-derived-types/m-p/801471#M589</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2010-10-22T13:24:22Z</dc:date>
    </item>
    <item>
      <title>OpenMP and allocatable fields of shared derived types</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/OpenMP-and-allocatable-fields-of-shared-derived-types/m-p/801472#M590</link>
      <description>The version of ifort I am using is:&lt;BR /&gt;&lt;BR /&gt;&lt;UL&gt;&lt;LI&gt;ifort (IFORT) 11.1 20091130&lt;BR /&gt;Copyright (C) 1985-2009 Intel Corporation. All rights reserved.&lt;/LI&gt;&lt;/UL&gt;so it's more than 14weeks old. The problem I encountered seems to be due to an automatic allocation of the allocatable field as soon as one enters the parallel region. Notice that the serial program works just fine. What I get on stdout is the following:&lt;BR /&gt;&lt;BR /&gt;forrtl: severe (151): allocatable array is already allocated&lt;BR /&gt;Image PC Routine Line Source &lt;BR /&gt;a.out 0809129D Unknown Unknown Unknown&lt;BR /&gt;a.out 08090095 Unknown Unknown Unknown&lt;BR /&gt;a.out 08072938 Unknown Unknown Unknown&lt;BR /&gt;a.out 0806516D Unknown Unknown Unknown&lt;BR /&gt;a.out 080557CD Unknown Unknown Unknown&lt;BR /&gt;a.out 0804A548 Unknown Unknown Unknown&lt;BR /&gt;libiomp5.so B776AA6D Unknown Unknown Unknown&lt;BR /&gt;libiomp5.so B774A56C Unknown Unknown Unknown&lt;BR /&gt;libiomp5.so B774D020 Unknown Unknown Unknown&lt;BR /&gt;libiomp5.so B77328B7 Unknown Unknown Unknown&lt;BR /&gt;a.out 0804A477 Unknown Unknown Unknown&lt;BR /&gt;a.out 0804A391 Unknown Unknown Unknown&lt;BR /&gt;libc.so.6 B75ABB56 Unknown Unknown Unknown&lt;BR /&gt;a.out 0804A2A1 Unknown Unknown Unknown&lt;BR /&gt;&lt;BR /&gt;If "pointer" is used instead of "allocatable" or the option "-O0" is passed to the compiler, then no fail is encountered. &lt;BR /&gt;&lt;BR /&gt;I know that FORTRAN 90/95 standards do not admit allocatable fields as part of a derived data-type, but I am quite curious to understand what the compiler does when it compiles that simple program and why it fails with ifort and not with other compilers. Possibly this will give me a better understanding of the differences between pointers and allocatables types.&lt;BR /&gt;&lt;BR /&gt;M.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 23 Oct 2010 10:32:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/OpenMP-and-allocatable-fields-of-shared-derived-types/m-p/801472#M590</guid>
      <dc:creator>Massimiliano_Culpo</dc:creator>
      <dc:date>2010-10-23T10:32:08Z</dc:date>
    </item>
    <item>
      <title>OpenMP and allocatable fields of shared derived types</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/OpenMP-and-allocatable-fields-of-shared-derived-types/m-p/801473#M591</link>
      <description>&lt;P&gt;&lt;SPAN class="comments"&gt;&lt;SPAN style="color: #008200;"&gt;!$ompparallel&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;if(.not. allocated(a%vec) then&lt;BR /&gt; &lt;SPAN style="color: #008200;"&gt;!$ompcritical&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; if (.not. allocated(a%vec)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="keyword bold"&gt;&lt;STRONG&gt;&lt;SPAN style="color: #006699;"&gt;allocate&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;(a%vec(10))&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="comments"&gt;&lt;SPAN style="color: #008200;"&gt; !$ompendcritical&lt;BR /&gt;&lt;SPAN style="color: #000000;"&gt;endif&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;(assume other code here)&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="comments"&gt;&lt;SPAN style="color: #008200;"&gt;!$ompendparallel&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Your program was in error.&lt;BR /&gt;&lt;BR /&gt;Jim Dempsey&lt;/SPAN&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Oct 2010 11:35:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/OpenMP-and-allocatable-fields-of-shared-derived-types/m-p/801473#M591</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2010-10-23T11:35:53Z</dc:date>
    </item>
    <item>
      <title>OpenMP and allocatable fields of shared derived types</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/OpenMP-and-allocatable-fields-of-shared-derived-types/m-p/801474#M592</link>
      <description>Dear Jim,&lt;BR /&gt;&lt;BR /&gt;I am sorry, but I can't get your point. Could you be more specific and tell me where is the error and why is it an error?&lt;BR /&gt;&lt;BR /&gt;M.</description>
      <pubDate>Mon, 25 Oct 2010 09:19:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/OpenMP-and-allocatable-fields-of-shared-derived-types/m-p/801474#M592</guid>
      <dc:creator>Massimiliano_Culpo</dc:creator>
      <dc:date>2010-10-25T09:19:45Z</dc:date>
    </item>
    <item>
      <title>OpenMP and allocatable fields of shared derived types</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/OpenMP-and-allocatable-fields-of-shared-derived-types/m-p/801475#M593</link>
      <description>Your code may accidentally work, then unexpectedly fail, should you insert additional code following the !$OMP SINGLE and preceeding the !$OMP END PARALLEL.&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;[bash]!$omp parallel    
!$omp single   
allocate(a%vec(10))   
!$omp end single  
{any code here can experience problems} 
!$omp end parallel
{ code here should be OK}
 &lt;BR /&gt;&lt;SPAN class="sectionBody"&gt;Often postings on this forum are in "sketch" format (meaning missing details).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Jim Dempsey&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;[/bash]&lt;/PRE&gt;</description>
      <pubDate>Mon, 25 Oct 2010 13:06:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/OpenMP-and-allocatable-fields-of-shared-derived-types/m-p/801475#M593</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2010-10-25T13:06:11Z</dc:date>
    </item>
    <item>
      <title>OpenMP and allocatable fields of shared derived types</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/OpenMP-and-allocatable-fields-of-shared-derived-types/m-p/801476#M594</link>
      <description>&lt;P&gt;&lt;SPAN class="comments"&gt;&lt;SPAN style="color: #008200;"&gt; Try adding shared(a)&lt;BR /&gt;&lt;BR /&gt; !$ompparallelshared(a)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="comments"&gt;&lt;SPAN style="color: #008200;"&gt;!$ompsingle&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="keyword bold"&gt;&lt;STRONG&gt;&lt;SPAN style="color: #006699;"&gt;allocate&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;(a%vec(10))&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="comments"&gt;&lt;SPAN style="color: #008200;"&gt;!$ompendsingle&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="comments"&gt;&lt;SPAN style="color: #008200;"&gt;!$ompendparallel&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Oct 2010 14:32:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/OpenMP-and-allocatable-fields-of-shared-derived-types/m-p/801476#M594</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2010-10-25T14:32:07Z</dc:date>
    </item>
  </channel>
</rss>

