<?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 Re: Syntax error when using &amp;quot;NOWAIT&amp;quot; !!! in Intel® Moderncode for Parallel Architectures</title>
    <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Syntax-error-when-using-quot-NOWAIT-quot/m-p/886213#M3522</link>
    <description>&lt;DIV style="margin:0px;"&gt;Hi!&lt;BR /&gt;&lt;BR /&gt;I your code you simply placed NOWAIT where it is not allowed to be placed.&lt;BR /&gt;&lt;BR /&gt;You can add NOWAIT to the work-sharing constructs to indicate that a barrier is not needed. For parallel regions, however, NOWAITis forbidden as a parallel execution always involves a barrier that cannot be removed.&lt;BR /&gt;&lt;BR /&gt;As you're using "parallel do" you essentially get a compound parallel region that only contains a single work-sharing construct. &lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt; -michael&lt;BR /&gt;&lt;/DIV&gt;
&lt;BR /&gt;</description>
    <pubDate>Thu, 27 Aug 2009 10:12:15 GMT</pubDate>
    <dc:creator>Michael_K_Intel2</dc:creator>
    <dc:date>2009-08-27T10:12:15Z</dc:date>
    <item>
      <title>Syntax error when using "NOWAIT" !!!</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Syntax-error-when-using-quot-NOWAIT-quot/m-p/886210#M3519</link>
      <description>Dear All,&lt;BR /&gt;&lt;BR /&gt;I try to use OpenMP "NOWAIT" directive, in the following code source. But I have this error message :&lt;BR /&gt;&lt;BR /&gt;Error 1	Error: Syntax error, found 'NOWAIT' when expecting one of: &lt;END-OF-STATEMENT&gt; ; C:\...\prod.f90 142&lt;BR /&gt;Error 2	Compilation Aborted (code 1)	C:\...\prod.f90	 1&lt;BR /&gt;&lt;BR /&gt;I don't understand what is the problem!&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;&lt;BR /&gt;Didace&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;subroutine prod(a,n)&lt;BR /&gt;&lt;BR /&gt;use const_m&lt;BR /&gt;use omp_lib&lt;BR /&gt;&lt;BR /&gt;implicit none&lt;BR /&gt;&lt;BR /&gt;integer, intent(in) :: n&lt;BR /&gt;&lt;BR /&gt;integer :: i, j&lt;BR /&gt;&lt;BR /&gt;complex*16, dimension(n,n), intent(inout) :: a&lt;BR /&gt;&lt;BR /&gt;complex*16, dimension(:), allocatable :: v&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;allocate(v(n))&lt;BR /&gt;&lt;BR /&gt;do i=1,n&lt;BR /&gt;&lt;BR /&gt;!$OMP PARALLEL DO DEFAULT(SHARED) SCHEDULE(DYNAMIC,n/OMP_GET_MAX_THREADS()) PRIVATE(j)&lt;BR /&gt;&lt;BR /&gt; do j=i1,n&lt;BR /&gt;&lt;BR /&gt; v(j) = a(i,j)&lt;BR /&gt;&lt;BR /&gt; enddo&lt;BR /&gt;&lt;BR /&gt;!$OMP END PARALLEL DO NOWAIT&lt;BR /&gt;&lt;BR /&gt;enddo&lt;BR /&gt;&lt;BR /&gt;deallocate(v)&lt;BR /&gt;&lt;BR /&gt;end subroutine prod&lt;/END-OF-STATEMENT&gt;</description>
      <pubDate>Wed, 26 Aug 2009 19:48:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Syntax-error-when-using-quot-NOWAIT-quot/m-p/886210#M3519</guid>
      <dc:creator>ekeom</dc:creator>
      <dc:date>2009-08-26T19:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error when using "NOWAIT" !!!</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Syntax-error-when-using-quot-NOWAIT-quot/m-p/886211#M3520</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
I think it should be something, like:&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;!$OMP PARALLEL DO DEFAULT(SHARED) SCHEDULE(DYNAMIC,n/OMP_GET_MAX_THREADS()) PRIVATE(j) NOWAIT&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;and without the line:&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;!$OMP END PARALLEL DO NOWAIT&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;On the other hand, if that's exactly the program, you were writing, such a construction does not make much sense (or even would not work), as you have to finish all threads before deallocating v.&lt;BR /&gt;Nowait makes sense if you have a few loops executed one after the another and they are not strictly connected, something like (I'll use C, as I'm more skilled with it):&lt;BR /&gt;&lt;BR /&gt;#pragma omp parallel&lt;BR /&gt;{&lt;BR /&gt; #pragma omp for nowait&lt;BR /&gt; for (i = 0; i &amp;lt; N; i++)&lt;BR /&gt; ...&lt;BR /&gt; #pragma omp for&lt;BR /&gt; for (j = 0; j &amp;lt; N; j++)&lt;BR /&gt; ...&lt;BR /&gt;} /* end of the parallel block */  &lt;BR /&gt;&lt;BR /&gt;I hope this will help. Regards.&lt;BR /&gt;</description>
      <pubDate>Wed, 26 Aug 2009 20:03:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Syntax-error-when-using-quot-NOWAIT-quot/m-p/886211#M3520</guid>
      <dc:creator>Bartlomiej</dc:creator>
      <dc:date>2009-08-26T20:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error when using "NOWAIT" !!!</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Syntax-error-when-using-quot-NOWAIT-quot/m-p/886212#M3521</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
I show examples of what I believe is working NOWAIT at &lt;BR /&gt;&lt;A href="http://sites.google.com/site/tprincesite/levine-callahan-dongarra-vectors"&gt;http://sites.google.com/site/tprincesite/levine-callahan-dongarra-vectors&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;Referring to openmp.org and other reputable examples, NOWAIT is always issued prior to the end of a PARALLEL.&lt;BR /&gt;I use it only in Fortran; I didn't find it reliable in C or C++, and I think it gains more with the combination of gfortran and libiomp than with other combinations on Intel CPUs.&lt;BR /&gt;Depending on the ifort version, Intel Thread Checker may complain about any/all use of NOWAIT.&lt;BR /&gt;I don't think you can draw any conclusions from a case like you have written, where an optimizing compiler could change the outer loop to &lt;BR /&gt;do i=n,n&lt;BR /&gt;&lt;BR /&gt;and DYNAMIC could defeat any effort to maintain NUMA locality.&lt;BR /&gt;</description>
      <pubDate>Wed, 26 Aug 2009 21:44:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Syntax-error-when-using-quot-NOWAIT-quot/m-p/886212#M3521</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2009-08-26T21:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error when using "NOWAIT" !!!</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Syntax-error-when-using-quot-NOWAIT-quot/m-p/886213#M3522</link>
      <description>&lt;DIV style="margin:0px;"&gt;Hi!&lt;BR /&gt;&lt;BR /&gt;I your code you simply placed NOWAIT where it is not allowed to be placed.&lt;BR /&gt;&lt;BR /&gt;You can add NOWAIT to the work-sharing constructs to indicate that a barrier is not needed. For parallel regions, however, NOWAITis forbidden as a parallel execution always involves a barrier that cannot be removed.&lt;BR /&gt;&lt;BR /&gt;As you're using "parallel do" you essentially get a compound parallel region that only contains a single work-sharing construct. &lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt; -michael&lt;BR /&gt;&lt;/DIV&gt;
&lt;BR /&gt;</description>
      <pubDate>Thu, 27 Aug 2009 10:12:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Syntax-error-when-using-quot-NOWAIT-quot/m-p/886213#M3522</guid>
      <dc:creator>Michael_K_Intel2</dc:creator>
      <dc:date>2009-08-27T10:12:15Z</dc:date>
    </item>
  </channel>
</rss>

