<?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 FORALL inside SINGLE OpenMP Directive Error in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/FORALL-inside-SINGLE-OpenMP-Directive-Error/m-p/749733#M6545</link>
    <description>FORALL will be accepted withina SINGLE directive in an update to the 12.1 compiler. It was a straight bug, pure and simple. I'll post an update here when a compiler with the fix is available.&lt;BR /&gt;&lt;BR /&gt;Tracking number for this defect: DPD200161616&lt;BR /&gt;&lt;BR /&gt;Patrick Kennedy&lt;BR /&gt;Intel Developer Support</description>
    <pubDate>Mon, 17 Oct 2011 13:49:53 GMT</pubDate>
    <dc:creator>pbkenned1</dc:creator>
    <dc:date>2011-10-17T13:49:53Z</dc:date>
    <item>
      <title>FORALL inside SINGLE OpenMP Directive Error</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/FORALL-inside-SINGLE-OpenMP-Directive-Error/m-p/749727#M6539</link>
      <description>Hi all,&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I'm trying to compile a code with ifort v11.0 on a linux system and receive the following compiler error:&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;error #7636: This statement or directive is not permitted within the body of an OpenMP SINGLE directive&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV id="_mcePaste"&gt; FORALL (t = 1:nrows)&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;----^&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;/afs/crc.nd.edu/user/t/tstitt/packages/cp2k/intel/cp2k/makefiles/../src/lib/dbcsr_methods.F(1183): error #7636: This statement or directive is not permitted within the body of an OpenMP SINGLE directive&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt; END FORALL&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;----^&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;compilation aborted&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;...&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;Can anyone suggest a workaround?&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;Thanks.&lt;/DIV&gt;</description>
      <pubDate>Sat, 09 Oct 2010 22:40:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/FORALL-inside-SINGLE-OpenMP-Directive-Error/m-p/749727#M6539</guid>
      <dc:creator>Tim_Stitt</dc:creator>
      <dc:date>2010-10-09T22:40:30Z</dc:date>
    </item>
    <item>
      <title>FORALL inside SINGLE OpenMP Directive Error</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/FORALL-inside-SINGLE-OpenMP-Directive-Error/m-p/749728#M6540</link>
      <description>Interesting, I don't know why SINGLE is not allowed. I can't find anything in the OpenMP 3.0 spec that forbids it. &lt;BR /&gt;&lt;BR /&gt;As a workaround, try using the WORKSHARE directive; FORALL statements/constructs are allowed under WORKSHARE. Note that Intel's WORKSHARE is only executed by a single thread, so the semantics are equivalent to using SINGLE.&lt;BR /&gt;&lt;BR /&gt;I'll find out from the OpenMP developers why we're disallowing FORALL under SINGLE. GNU accepts it:&lt;BR /&gt;&lt;BR /&gt;&lt;P&gt;&amp;gt; cat U77885-OpenMP-single.f90&lt;/P&gt;&lt;P&gt;program U77885&lt;/P&gt;&lt;P&gt;implicit none&lt;/P&gt;&lt;P&gt;integer, parameter :: n=4&lt;/P&gt;&lt;P&gt;real x(n), y(n,n)&lt;/P&gt;&lt;P&gt;integer i&lt;/P&gt;&lt;P&gt;!$omp parallel&lt;/P&gt;&lt;P&gt;!$omp single&lt;/P&gt;&lt;P&gt;forall(i = 1:n) x(i) = i&lt;/P&gt;&lt;P&gt;!$omp end single&lt;/P&gt;&lt;P&gt;!$omp workshare&lt;/P&gt;&lt;P&gt;forall(i = 1:n) y(i, i) = 2.0 * x(i)&lt;/P&gt;&lt;P&gt;!$omp end workshare&lt;/P&gt;&lt;P&gt;!$omp end parallel&lt;/P&gt;&lt;P&gt;print *, 'y(i, i) =',(y(i, i), i=1,n)&lt;/P&gt;&lt;P&gt;end program U77885&lt;/P&gt;&lt;P&gt;&amp;gt; gfortran --version&lt;/P&gt;&lt;P&gt;GNU Fortran (GCC) 4.5.0 20090924 (experimental) [trunk revision 152147]&lt;/P&gt;&lt;P&gt;&amp;gt; gfortran -fopenmp U77885-OpenMP-single.f90&lt;/P&gt;&lt;P&gt;&amp;gt; ./a.out&lt;/P&gt;&lt;P&gt;y(i, i) = 2.0000000 4.0000000 6.0000000 8.0000000&lt;/P&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;BR /&gt;Patrick Kennedy&lt;BR /&gt;Intel Developer Support</description>
      <pubDate>Tue, 12 Oct 2010 20:28:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/FORALL-inside-SINGLE-OpenMP-Directive-Error/m-p/749728#M6540</guid>
      <dc:creator>pbkenned1</dc:creator>
      <dc:date>2010-10-12T20:28:50Z</dc:date>
    </item>
    <item>
      <title>FORALL inside SINGLE OpenMP Directive Error</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/FORALL-inside-SINGLE-OpenMP-Directive-Error/m-p/749729#M6541</link>
      <description>Due to the implementation, as Patrick mentioned, the reported problem involves unexpected nested SINGLE regions. Patrick's suggestion removes the hidden duplication.&lt;BR /&gt;The next ifort release implements do concurrent, which fits some requirements better than forall.</description>
      <pubDate>Tue, 12 Oct 2010 20:59:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/FORALL-inside-SINGLE-OpenMP-Directive-Error/m-p/749729#M6541</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2010-10-12T20:59:09Z</dc:date>
    </item>
    <item>
      <title>FORALL inside SINGLE OpenMP Directive Error</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/FORALL-inside-SINGLE-OpenMP-Directive-Error/m-p/749730#M6542</link>
      <description>Tim,&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;problem involves unexpected &lt;STRONG&gt;&lt;EM&gt;nested&lt;/EM&gt;&lt;/STRONG&gt; SINGLE &lt;BR /&gt;&lt;BR /&gt;Does this imply the FORALL is implicitly&lt;BR /&gt;&lt;BR /&gt; !$OMP SINGLE&lt;BR /&gt; FORALL(...)&lt;BR /&gt; !$OMP END SINGLE&lt;BR /&gt;&lt;BR /&gt;IOW the equivilent to the above !$OMP... being injected into the code stream?&lt;BR /&gt;&lt;BR /&gt;Jim&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Oct 2010 17:09:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/FORALL-inside-SINGLE-OpenMP-Directive-Error/m-p/749730#M6542</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2010-10-13T17:09:14Z</dc:date>
    </item>
    <item>
      <title>FORALL inside SINGLE OpenMP Directive Error</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/FORALL-inside-SINGLE-OpenMP-Directive-Error/m-p/749731#M6543</link>
      <description>Compile the example above with the SINGLE directives removed, for example, with -openmp -S set. You would still see calls to __kmp_single and __kmp_end_single in the expansion of FORALL. I don't know if you consider it equivalent to what you wrote.</description>
      <pubDate>Wed, 13 Oct 2010 17:50:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/FORALL-inside-SINGLE-OpenMP-Directive-Error/m-p/749731#M6543</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2010-10-13T17:50:38Z</dc:date>
    </item>
    <item>
      <title>FORALL inside SINGLE OpenMP Directive Error</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/FORALL-inside-SINGLE-OpenMP-Directive-Error/m-p/749732#M6544</link>
      <description>Yes, that is what I would consider as equivilent.&lt;BR /&gt;&lt;BR /&gt;The OP could use the workshare as mentioned or possibly&lt;BR /&gt;&lt;BR /&gt;INTEGER :: SINGLETHREAD&lt;BR /&gt;&lt;BR /&gt;SINGLETHREAD = -1&lt;BR /&gt;!$OMP PARALLEL SHARED(SINGLETHREAD)&lt;BR /&gt;...&lt;BR /&gt;!$OMP SINGLE&lt;BR /&gt;SINGLETHREAD = OMP_GET_THREAD_NUM()&lt;BR /&gt;!$OMP END SINGLE&lt;BR /&gt;IF(OMP_GET_THREAD_NUM() .EQ. SINGLETHREAD) THEN&lt;BR /&gt; ... (original single code here up to but not including FORALL)&lt;BR /&gt; FORALL(...)&lt;BR /&gt; ... (remainder of single code here)&lt;BR /&gt;ENDIF ! end single section&lt;BR /&gt;...&lt;BR /&gt;!$OMP END PARALLEL&lt;BR /&gt;&lt;BR /&gt;Jim Dempsey&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Oct 2010 20:08:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/FORALL-inside-SINGLE-OpenMP-Directive-Error/m-p/749732#M6544</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2010-10-13T20:08:39Z</dc:date>
    </item>
    <item>
      <title>FORALL inside SINGLE OpenMP Directive Error</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/FORALL-inside-SINGLE-OpenMP-Directive-Error/m-p/749733#M6545</link>
      <description>FORALL will be accepted withina SINGLE directive in an update to the 12.1 compiler. It was a straight bug, pure and simple. I'll post an update here when a compiler with the fix is available.&lt;BR /&gt;&lt;BR /&gt;Tracking number for this defect: DPD200161616&lt;BR /&gt;&lt;BR /&gt;Patrick Kennedy&lt;BR /&gt;Intel Developer Support</description>
      <pubDate>Mon, 17 Oct 2011 13:49:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/FORALL-inside-SINGLE-OpenMP-Directive-Error/m-p/749733#M6545</guid>
      <dc:creator>pbkenned1</dc:creator>
      <dc:date>2011-10-17T13:49:53Z</dc:date>
    </item>
    <item>
      <title>FORALL inside SINGLE OpenMP Directive Error</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/FORALL-inside-SINGLE-OpenMP-Directive-Error/m-p/749734#M6546</link>
      <description>This issue isresolved in update #7 (package l_fcompxe_2011.7.256).&lt;BR /&gt;&lt;BR /&gt;Patrick</description>
      <pubDate>Thu, 27 Oct 2011 21:04:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/FORALL-inside-SINGLE-OpenMP-Directive-Error/m-p/749734#M6546</guid>
      <dc:creator>pbkenned1</dc:creator>
      <dc:date>2011-10-27T21:04:07Z</dc:date>
    </item>
  </channel>
</rss>

