<?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 Logical .and. should still be in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-Directives/m-p/1158188#M142182</link>
    <description>&lt;P&gt;Logical .and. should still be working.&amp;nbsp; I wrote a small program to confirm that to myself.&lt;/P&gt;

&lt;P&gt;Now.&amp;nbsp; I was able to reproduce your problem by leaving in the "&amp;lt;strong&amp;gt;" and "&amp;lt;/strong&amp;gt;" markup tags.&amp;nbsp;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Originally, I'd assumed that they were inserted by this forum tool, but it looks like they are actually in your source code.&lt;/P&gt;

&lt;P&gt;Remove them, and try your program again.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; --Lorri&lt;/P&gt;</description>
    <pubDate>Fri, 23 Mar 2018 15:54:14 GMT</pubDate>
    <dc:creator>Lorri_M_Intel</dc:creator>
    <dc:date>2018-03-23T15:54:14Z</dc:date>
    <item>
      <title>OpenMP-Directives</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-Directives/m-p/1158187#M142181</link>
      <description>&lt;P&gt;The following OpenMP directives in Intel Visual Fortran worked fine in version 2016 (16.0.4.246) but causes an error in 2017 (17.0.6.270)&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;                     !$omp parallel do default(none) if (parallel &lt;STRONG&gt;.and.&lt;/STRONG&gt; nbsubnet&amp;gt;1) &amp;amp;&lt;/PRE&gt;

&lt;P&gt;The error in version 2017 is:&lt;/P&gt;

&lt;P&gt;error #5082: Syntax error, found '.AND.' when expecting one of: :&lt;/P&gt;

&lt;P&gt;It would appear that the 2017 version of Intel's Fortran compiler no longer accepts .and. and yet the list of what it expects is empty. I have not tried this in the 2018 version. I believe the logic .and. should be accepted.&lt;/P&gt;

&lt;P&gt;Thank you,&lt;/P&gt;

&lt;P&gt;Lester&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2018 18:42:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-Directives/m-p/1158187#M142181</guid>
      <dc:creator>Lester_L_</dc:creator>
      <dc:date>2018-03-22T18:42:14Z</dc:date>
    </item>
    <item>
      <title>Logical .and. should still be</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-Directives/m-p/1158188#M142182</link>
      <description>&lt;P&gt;Logical .and. should still be working.&amp;nbsp; I wrote a small program to confirm that to myself.&lt;/P&gt;

&lt;P&gt;Now.&amp;nbsp; I was able to reproduce your problem by leaving in the "&amp;lt;strong&amp;gt;" and "&amp;lt;/strong&amp;gt;" markup tags.&amp;nbsp;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Originally, I'd assumed that they were inserted by this forum tool, but it looks like they are actually in your source code.&lt;/P&gt;

&lt;P&gt;Remove them, and try your program again.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; --Lorri&lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2018 15:54:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-Directives/m-p/1158188#M142182</guid>
      <dc:creator>Lorri_M_Intel</dc:creator>
      <dc:date>2018-03-23T15:54:14Z</dc:date>
    </item>
    <item>
      <title>The markup tags were probably</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-Directives/m-p/1158189#M142183</link>
      <description>&lt;P&gt;The markup tags were probably introduced when lines of code were selected and copied from a "rich text" display such as code sections in this forum, and pasted in a program text editor.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2018 16:09:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-Directives/m-p/1158189#M142183</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2018-03-23T16:09:49Z</dc:date>
    </item>
    <item>
      <title>My source code does not have</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-Directives/m-p/1158190#M142184</link>
      <description>&lt;P&gt;My source code does &lt;STRONG&gt;not &lt;/STRONG&gt;have html markups. I tried to highlight the problem and the html for bold was not interpreted correctly.&amp;nbsp;&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em;"&gt;This is the source code below.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;!$omp parallel do default(none) if (parallel .and. nbsubnet&amp;gt;1) &amp;amp;&lt;BR /&gt;
	...&lt;/P&gt;

&lt;P&gt;To clarify - the source code compiles properly in version 2016 but not in version 2017. The&amp;nbsp;&lt;STRONG&gt;.and.&lt;/STRONG&gt; is considered an error in IVF 2017.&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em;"&gt;Lorri, did I understand you were able to reproduce this problem in IVF 2017?&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em;"&gt;Will this problem be corrected?&lt;BR /&gt;
	Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2018 17:06:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-Directives/m-p/1158190#M142184</guid>
      <dc:creator>Lester_L_</dc:creator>
      <dc:date>2018-03-23T17:06:15Z</dc:date>
    </item>
    <item>
      <title>Is "parallel" a logical?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-Directives/m-p/1158191#M142185</link>
      <description>&lt;P&gt;Is "parallel" a logical?&lt;/P&gt;

&lt;P&gt;If yes...&lt;/P&gt;

&lt;P&gt;What happens with if(parallel .and. (nsubnet&amp;gt;1))&lt;/P&gt;

&lt;P&gt;Also, is the &amp;amp; the last character on the line?&lt;BR /&gt;
	And, what are the continuation line (If possible, paste the entire directive)&lt;/P&gt;

&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2018 17:37:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-Directives/m-p/1158191#M142185</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2018-03-23T17:37:56Z</dc:date>
    </item>
    <item>
      <title>I said I was able to</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-Directives/m-p/1158192#M142186</link>
      <description>&lt;P&gt;I said I was able to reproduce the problem if the markups were there:&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;logical parallel
integer nb
!$omp parallel do default(none) if (parallel &amp;lt;strong&amp;gt; .and. &amp;lt;/strong&amp;gt; nb &amp;gt; 1)
&amp;nbsp;&amp;nbsp; do i=1, 10
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print *, "hello!"
&amp;nbsp;&amp;nbsp; end do
!$omp end parallel do
end&lt;/PRE&gt;

&lt;PRE class="brush:;"&gt;d:\iusers\lwmenard\tests&amp;gt;ifort -Qopenmp -c x.f90 -nologo
x.f90(3): error #5082: Syntax error, found '.AND.' when expecting one of: ( &amp;lt;IDENTIFIER&amp;gt; &amp;lt;CHAR_CON_KIND_PARAM&amp;gt; &amp;lt;CHAR_NAM_KIND_PARAM&amp;gt; &amp;lt;CHARACTER_CONSTANT&amp;gt; &amp;lt;INTEGER_CONSTANT&amp;gt; ...
!$omp parallel do default(none) if (parallel &amp;lt;strong&amp;gt; .and. &amp;lt;/strong&amp;gt; nb &amp;gt; 1)
------------------------------------------------------^&lt;/PRE&gt;

&lt;P&gt;Without the markups,&amp;nbsp;this program&amp;nbsp;was OK, even with a 17.0 compiler.&lt;/P&gt;

&lt;P&gt;If you're seeing something different, please post more of the program so that it can be reproduced.&amp;nbsp;&amp;nbsp;&amp;nbsp; Also, which version of 2017 are you using?&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Regards --&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; --Lorri&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2018 17:40:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-Directives/m-p/1158192#M142186</guid>
      <dc:creator>Lorri_M_Intel</dc:creator>
      <dc:date>2018-03-23T17:40:46Z</dc:date>
    </item>
    <item>
      <title>Thank you for your comments</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-Directives/m-p/1158193#M142187</link>
      <description>&lt;P&gt;Thank you for your comments and suggestions.&lt;BR /&gt;
	1) I reiterate - there is NO bold in the source code. The code works fine for version 15 and 16. It fails for version 17.0.4 and 17.0.6&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em;"&gt;2) Lorri, the variable "parallel" is logical. I tried&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px;"&gt;if(parallel .and. (nsubnet&amp;gt;1) and it changes nothing.&amp;nbsp;&lt;BR /&gt;
	3) The rest of the parallel directive contains these types of lines:&lt;/SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; !$omp parallel do default(none) if (parallel .and. nbsubnet&amp;gt;0) &amp;amp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN style="font-size: 1em;"&gt;&amp;nbsp; &amp;nbsp;!$omp shared(vector0, ivector, ...) &amp;amp;&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;!$omp shared(vector1, vector2, ...) &amp;amp;&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;!$omp shared(vector3, vector4, ...) &amp;amp;&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;!$omp private(i,j,l,m) &amp;amp;&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;!$omp reduction(+:counter_eval) &amp;amp;&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;!$omp schedule(static,chunk_subs)&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; do k=0,nbsubnet&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px;"&gt;4) The source code of this module is over 3000 lines long with many parallel directives and use modules. I tried making a toy example to narrow down the problem but I cannot reproduce it in the toy example.&lt;BR /&gt;
	5) Two types parallel directives are giving error messages:&lt;/SPAN&gt;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; !$omp parallel do default(none) if (parallel .and. nbsubnet&amp;gt;0) &amp;amp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; !$omp parallel do default(none) if (parallel) &amp;amp;&lt;BR /&gt;
	&lt;SPAN style="font-size: 12px;"&gt;Therefore it is not the &lt;STRONG&gt;.and.&lt;/STRONG&gt; as I originally thought. But for the second type of statement, it is not consistently giving the error message.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px;"&gt;6) I tried changing the variable name parallel to:&lt;/SPAN&gt;&lt;/P&gt;

&lt;UL&gt;
	&lt;LI&gt;parallela or parallel1 and it gave some weird message complaining about a misplaced "a" or "1"&lt;/LI&gt;
	&lt;LI&gt;parrallel (double r's) and it worked fine.&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;I believe in version 17 that the key word "parallel" is not always being interpreted as a variable but as the parallel directive. As I previously mentioned, unfortunately I cannot reproduce this in a toy example. Also, these error messages are not for all the parallel directives but just some of them. I do not see a pattern which would indicate the source of the problem.&lt;/P&gt;

&lt;P&gt;The best solution I think of is to rename the logical variable "parallel" to avoid confusing the compiler. I have not been able to test this project in version 18 yet as I have to upgrade MSVS.&lt;/P&gt;

&lt;P&gt;Any other comments are welcome.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Mar 2018 21:04:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-Directives/m-p/1158193#M142187</guid>
      <dc:creator>Lester_L_</dc:creator>
      <dc:date>2018-03-28T21:04:40Z</dc:date>
    </item>
    <item>
      <title>is the fixed form or free</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-Directives/m-p/1158194#M142188</link>
      <description>&lt;P&gt;is the fixed form or free form? In fixed form the &amp;amp; is not valid code I think&lt;/P&gt;</description>
      <pubDate>Thu, 29 Mar 2018 05:51:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-Directives/m-p/1158194#M142188</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2018-03-29T05:51:47Z</dc:date>
    </item>
    <item>
      <title>The source code is free form.</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-Directives/m-p/1158195#M142189</link>
      <description>&lt;P&gt;The source code is free form. This code compiles correctly&amp;nbsp;&lt;SPAN style="font-size: 1em;"&gt;with Fortran versions 15,16.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Mar 2018 11:45:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-Directives/m-p/1158195#M142189</guid>
      <dc:creator>Lester_L_</dc:creator>
      <dc:date>2018-03-29T11:45:30Z</dc:date>
    </item>
    <item>
      <title>This works:</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-Directives/m-p/1158196#M142190</link>
      <description>&lt;P&gt;This works:&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;    program OpenMPContinuation
    use omp_lib
    implicit none

    logical :: parallel = .TRUE.
    logical :: fix_hack
    integer, parameter :: nbsubnet = 100
    real :: vector0(nbsubnet),vector1(nbsubnet),vector2(nbsubnet),vector3(nbsubnet),vector4(nbsubnet)
    
    integer :: ivector, counter_eval, chunk_subs
    integer :: i,j,k,l,m
    ivector = 100
    chunk_subs = 10
    fix_hack = parallel .and. (nbsubnet.gt.0)
!$omp parallel do default(none) if (fix_hack) &amp;amp;
!$             shared(vector0, ivector) &amp;amp;
!$             shared(vector1, vector2) &amp;amp;
!$             shared(vector3, vector4) &amp;amp;
!$             private(i,j,l,m) &amp;amp;
!$             reduction(+:counter_eval) &amp;amp;
!$             schedule(static,chunk_subs)
            do k=0,nbsubnet
                print *,k
    end do
    
    end program OpenMPContinuation
&lt;/PRE&gt;

&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Thu, 29 Mar 2018 15:53:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-Directives/m-p/1158196#M142190</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2018-03-29T15:53:46Z</dc:date>
    </item>
    <item>
      <title>Thank you Jim. I'll change</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-Directives/m-p/1158197#M142191</link>
      <description>&lt;P&gt;Thank you Jim. I'll change the variable name from &lt;SPAN style="font-size: 13.008px;"&gt;"parallel"&amp;nbsp;&lt;/SPAN&gt;to something else.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 20:25:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-Directives/m-p/1158197#M142191</guid>
      <dc:creator>Lester_L_</dc:creator>
      <dc:date>2018-04-03T20:25:19Z</dc:date>
    </item>
  </channel>
</rss>

