<?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: Misplaced OpenMP directive in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Misplaced-OpenMP-directive/m-p/896604#M79759</link>
    <description>&lt;P&gt;Tim&lt;/P&gt;
&lt;P&gt;Olivier used a single statement !$OMP PARALLEL DO therefore he needs to end with !$OMP END PARALLEL DO&lt;/P&gt;
&lt;P&gt;He did not program to style you mentioned in your post (!$OMP PARALLEL, then !$OMP DO, then code, then !$OMP END DO, then !$OMP END PARALLEL)&lt;/P&gt;
&lt;P&gt;Jim Dempsey&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Aug 2008 21:29:41 GMT</pubDate>
    <dc:creator>jimdempseyatthecove</dc:creator>
    <dc:date>2008-08-27T21:29:41Z</dc:date>
    <item>
      <title>Misplaced OpenMP directive</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Misplaced-OpenMP-directive/m-p/896600#M79755</link>
      <description>&lt;P&gt;&lt;FONT face="Arial"&gt;I am puzzled by the compiler error I get with the following part of my subroutine:&lt;/FONT&gt;&lt;/P&gt;&lt;FONT face="Arial" color="#008000" size="2"&gt;
&lt;P&gt;...&lt;BR /&gt;&lt;FONT color="#008000" size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;!$0MP PARALLEL DO DEFAULT(SHARED) PRIVATE(I_NL_SUBSET)&lt;/P&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;B&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT face="Arial"&gt;DO&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;FONT face="Arial"&gt; I_NL_SUBSET=1,N_NL_SUBSETS&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;B&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT face="Arial"&gt;IF&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;FONT&gt;&lt;/FONT&gt;&lt;FONT face="Arial"&gt;&lt;FONT size="2"&gt; (NL_SUBSETS_FLAGS(I_NL_SUBSET)) &lt;/FONT&gt;&lt;B&gt;&lt;FONT color="#0000ff" size="2"&gt;THEN&lt;BR /&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;B&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT face="Arial"&gt;CALL&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;FONT face="Arial"&gt; SUB_NL_FCN(I_NL_SUBSET,NL_SUBSETS,X_TIME,FNL_TIME,STATE_TIME, &amp;amp;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT face="Arial"&gt;N_NL_SUBSETS,N_TIME,N_TIME_PLUS_PADDING,N_NL_DOFS,SUB_ERROR)&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;B&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT face="Arial"&gt;ENDIF&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;FONT&gt;&lt;/FONT&gt;&lt;B&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT face="Arial"&gt;ENDDO&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;FONT&gt;&lt;/FONT&gt;&lt;FONT face="Arial" color="#008000" size="2"&gt;!$OMP END PARALLEL DO&lt;BR /&gt;...&lt;/FONT&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial" color="#008000"&gt;&lt;FONT color="#000000"&gt;The error message I get is: "&lt;FONT color="#ffa500"&gt;Error: Misplaced part of an OpenMP parallel directive&lt;/FONT&gt;", and it points to the END PARALLEL DO directive.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial" color="#008000"&gt;&lt;FONT color="#000000"&gt;SUB_NL_FCN and SUB_ERRORare declared as EXTERNAL(they are dummy arguments). NL_SUBSET is of a type declared in a module. All other variables areof either REAL(8), INTEGER(4) type, some are arrays, all are dummy arguments passed to the subroutine which contains the parallel region above.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial" color="#008000"&gt;&lt;FONT color="#000000"&gt;What is wrong here?&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial" color="#008000"&gt;&lt;FONT color="#000000"&gt;Thanks,&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial" color="#008000"&gt;&lt;FONT color="#000000"&gt;Olivier&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Aug 2008 18:14:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Misplaced-OpenMP-directive/m-p/896600#M79755</guid>
      <dc:creator>OP1</dc:creator>
      <dc:date>2008-08-27T18:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: Misplaced OpenMP directive</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Misplaced-OpenMP-directive/m-p/896601#M79756</link>
      <description>&lt;P&gt;Olivier,&lt;/P&gt;
&lt;P&gt;Try commenting out the two !$OMP statements _without_ touching any of the interviening code.&lt;BR /&gt;(Just place a C***Debug*** to the left of each statement/directive)&lt;/P&gt;
&lt;P&gt;Then compile and check for errors&lt;/P&gt;
&lt;P&gt;The purpose is to test to see if you have a problem with your continuation line. If you do have a problem with your continuation line then some other error will appear (e.g. bad IF statement)&lt;/P&gt;
&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Wed, 27 Aug 2008 21:02:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Misplaced-OpenMP-directive/m-p/896601#M79756</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2008-08-27T21:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: Misplaced OpenMP directive</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Misplaced-OpenMP-directive/m-p/896602#M79757</link>
      <description>&lt;P&gt;I forgot to mention&lt;/P&gt;
&lt;P&gt;In the sample code above the CALL statement is on the left margin. I assume this is not the case in your actual code.&lt;/P&gt;
&lt;P&gt;However, if your call statement is located at the left margine then it is not a CALL statement... it is a Comment.&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Aug 2008 21:04:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Misplaced-OpenMP-directive/m-p/896602#M79757</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2008-08-27T21:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: Misplaced OpenMP directive</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Misplaced-OpenMP-directive/m-p/896603#M79758</link>
      <description>&lt;P&gt;The END PARALLEL DO is superfluous here. If you want an END PARALLEL, you need&lt;/P&gt;
&lt;P&gt;!$OMP PARALLEL&lt;/P&gt;
&lt;P&gt;!$OMP DO&lt;/P&gt;
&lt;P&gt;DO&lt;/P&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;P&gt;ENDDO&lt;/P&gt;
&lt;P&gt;!$OMP END PARALLEL&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;It's syntactically legal to have CALL starting in column 1 only if you use free form syntax compiler option. However, it's even more important to use a reasonable indentation scheme when using free format, if only to avoid sending yourself and others in chase of red herrings.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Aug 2008 21:14:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Misplaced-OpenMP-directive/m-p/896603#M79758</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2008-08-27T21:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: Misplaced OpenMP directive</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Misplaced-OpenMP-directive/m-p/896604#M79759</link>
      <description>&lt;P&gt;Tim&lt;/P&gt;
&lt;P&gt;Olivier used a single statement !$OMP PARALLEL DO therefore he needs to end with !$OMP END PARALLEL DO&lt;/P&gt;
&lt;P&gt;He did not program to style you mentioned in your post (!$OMP PARALLEL, then !$OMP DO, then code, then !$OMP END DO, then !$OMP END PARALLEL)&lt;/P&gt;
&lt;P&gt;Jim Dempsey&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Aug 2008 21:29:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Misplaced-OpenMP-directive/m-p/896604#M79759</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2008-08-27T21:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: Misplaced OpenMP directive</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Misplaced-OpenMP-directive/m-p/896605#M79760</link>
      <description>&lt;P&gt;&lt;FONT face="Arial"&gt;Thanks for your help... Actually... I found the mistake I made... nothing to be proud of... after all these years programming in Fortran...&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial"&gt;... it's kind of the worse mistake you can make for your own ego...&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial"&gt;... I realized that I wrote !$OMP with a 0 (zero) instead of the letter O...&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial"&gt;Now, maybe the Fortran compiler could check the syntax of the OpenMP directives, to catch this kind of (really) silly mistake? Dr. Fortran, what do you think?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial"&gt;Justone of these days... so much time wasted for so little...&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial"&gt;Olivier&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Aug 2008 22:38:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Misplaced-OpenMP-directive/m-p/896605#M79760</guid>
      <dc:creator>OP1</dc:creator>
      <dc:date>2008-08-27T22:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: Misplaced OpenMP directive</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Misplaced-OpenMP-directive/m-p/896606#M79761</link>
      <description>&lt;P&gt;Many years ago as an undergraduate, I spelled FORMAT with a 0, to get the apparently meaningless error message "this is not a Fortran statement". Just tried IVF with the same mistake - the compiler messages are not that more informative:&lt;/P&gt;
&lt;P&gt;Error1 Error: Missing mandatory separating blank&lt;/P&gt;
&lt;P&gt;Error2 Error: Syntax error, found IDENTIFIER 'X' when expecting one of: .EQV. .NEQV. .XOR. .OR. .AND. .LT. &amp;lt; .LE. &amp;lt;= .EQ. == .NE. /= .GT. &amp;gt;&lt;/P&gt;
&lt;P&gt;Error3 Error: Syntax error, found END-OF-STATEMENT when expecting one of: =&amp;gt; = .&lt;/P&gt;
&lt;P&gt;Apart from the lack of colouring in MSVS which shows that "F0RMAT" is not a keyword, I still think it would take a while to work out why the statement won't compile. It seems that 30 years of compiler development still can't account for our stupid mistakes;-)&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Aug 2008 00:46:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Misplaced-OpenMP-directive/m-p/896606#M79761</guid>
      <dc:creator>DavidWhite</dc:creator>
      <dc:date>2008-08-28T00:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: Misplaced OpenMP directive</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Misplaced-OpenMP-directive/m-p/896607#M79762</link>
      <description>The compiler DOES check syntax of OMP directive - but if you misspell the directive introducer, it looks like a comment and is not parsed. This is the downside of directives designed to look like comments.&lt;BR /&gt;</description>
      <pubDate>Thu, 28 Aug 2008 14:20:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Misplaced-OpenMP-directive/m-p/896607#M79762</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2008-08-28T14:20:23Z</dc:date>
    </item>
  </channel>
</rss>

