<?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 !DEC$ attributes in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-and-DEC-attributes/m-p/1023373#M108751</link>
    <description>&lt;P&gt;I am using OpenMP and Intel Fortran within Visual Studio 2010 Ultimate. I am calling some functions that are exported from a homemade DLL using the attribute DLLEXPORT and aliases. I use DLLIMPORT for the importation. No problem there.&lt;/P&gt;

&lt;P&gt;The problem comes when I try using an OpenMP sentinel (!$, without omp, as in !$ call omp_set_num_threads(4) for instance) right after those DLLIMPORT statements. The conditional compilation that is supposed to be performed by the compiler when using /Qopenmp does not work, and the statements seem to be ignored. However, if I have any standard Fortran statement between the !DEC$ and !$, no problem anymore. Same if the openMP statement is an actual openMP directive, usig !$omp instead of just !$. To resume:&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;      PROGRAM main

        !$ use omp_lib

        integer :: i

        !$ print*, 'OMP 1'
        !DEC$ ATTRIBUTES DLLIMPORT, ALIAS : 'func1'  :: func1
        !$ print*, 'OMP 2'

        i = 5
        !$ print*, 'OMP 3'

      end program
&lt;/PRE&gt;

&lt;P&gt;outputs: 'OMP 1'&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'OMP 3'&lt;/P&gt;

&lt;P&gt;I have not found any references to this problem anywhere else, or any doc explicitly stating that an openMP sentinel should not directly follow a !DEC$ attributes statement, so I thought that maybe it was a bug that had not been discovered yet.&lt;/P&gt;</description>
    <pubDate>Tue, 14 Oct 2014 00:28:27 GMT</pubDate>
    <dc:creator>Pellegrini__Etienne</dc:creator>
    <dc:date>2014-10-14T00:28:27Z</dc:date>
    <item>
      <title>OpenMP and !DEC$ attributes</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-and-DEC-attributes/m-p/1023373#M108751</link>
      <description>&lt;P&gt;I am using OpenMP and Intel Fortran within Visual Studio 2010 Ultimate. I am calling some functions that are exported from a homemade DLL using the attribute DLLEXPORT and aliases. I use DLLIMPORT for the importation. No problem there.&lt;/P&gt;

&lt;P&gt;The problem comes when I try using an OpenMP sentinel (!$, without omp, as in !$ call omp_set_num_threads(4) for instance) right after those DLLIMPORT statements. The conditional compilation that is supposed to be performed by the compiler when using /Qopenmp does not work, and the statements seem to be ignored. However, if I have any standard Fortran statement between the !DEC$ and !$, no problem anymore. Same if the openMP statement is an actual openMP directive, usig !$omp instead of just !$. To resume:&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;      PROGRAM main

        !$ use omp_lib

        integer :: i

        !$ print*, 'OMP 1'
        !DEC$ ATTRIBUTES DLLIMPORT, ALIAS : 'func1'  :: func1
        !$ print*, 'OMP 2'

        i = 5
        !$ print*, 'OMP 3'

      end program
&lt;/PRE&gt;

&lt;P&gt;outputs: 'OMP 1'&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'OMP 3'&lt;/P&gt;

&lt;P&gt;I have not found any references to this problem anywhere else, or any doc explicitly stating that an openMP sentinel should not directly follow a !DEC$ attributes statement, so I thought that maybe it was a bug that had not been discovered yet.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Oct 2014 00:28:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-and-DEC-attributes/m-p/1023373#M108751</guid>
      <dc:creator>Pellegrini__Etienne</dc:creator>
      <dc:date>2014-10-14T00:28:27Z</dc:date>
    </item>
    <item>
      <title>Looks like an obscure bug</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-and-DEC-attributes/m-p/1023374#M108752</link>
      <description>&lt;P&gt;Looks like an obscure bug with conditional compilation that hasn't been reported previously.&amp;nbsp; I'll discuss with the team and follow up.&lt;/P&gt;

&lt;P&gt;Patrick&lt;/P&gt;</description>
      <pubDate>Tue, 14 Oct 2014 14:25:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-and-DEC-attributes/m-p/1023374#M108752</guid>
      <dc:creator>pbkenned1</dc:creator>
      <dc:date>2014-10-14T14:25:32Z</dc:date>
    </item>
    <item>
      <title>Apparently this is a compiler</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-and-DEC-attributes/m-p/1023375#M108753</link>
      <description>&lt;P&gt;Apparently this is a compiler front end bug, and&amp;nbsp;it has been reported to compiler engineering&amp;nbsp;(internal tracking ID DPD200362090).&amp;nbsp; I'll keep this thread updated with news from the developers.&lt;/P&gt;

&lt;P&gt;Patrick&lt;/P&gt;</description>
      <pubDate>Wed, 15 Oct 2014 19:16:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-and-DEC-attributes/m-p/1023375#M108753</guid>
      <dc:creator>pbkenned1</dc:creator>
      <dc:date>2014-10-15T19:16:00Z</dc:date>
    </item>
    <item>
      <title>Thank you, Patrick!</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-and-DEC-attributes/m-p/1023376#M108754</link>
      <description>&lt;P&gt;Thank you, Patrick!&lt;/P&gt;</description>
      <pubDate>Wed, 15 Oct 2014 19:18:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-and-DEC-attributes/m-p/1023376#M108754</guid>
      <dc:creator>Pellegrini__Etienne</dc:creator>
      <dc:date>2014-10-15T19:18:29Z</dc:date>
    </item>
    <item>
      <title>This issue has been fixed in</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-and-DEC-attributes/m-p/1023377#M108755</link>
      <description>&lt;P&gt;This issue has been fixed in a future version of the compiler.&amp;nbsp; I'll identify the version with the fix when it becomes available.&lt;/P&gt;

&lt;P&gt;Patrick&lt;/P&gt;</description>
      <pubDate>Wed, 22 Oct 2014 16:21:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-and-DEC-attributes/m-p/1023377#M108755</guid>
      <dc:creator>pbkenned1</dc:creator>
      <dc:date>2014-10-22T16:21:50Z</dc:date>
    </item>
    <item>
      <title>This is fixed in the 16.0</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-and-DEC-attributes/m-p/1023378#M108756</link>
      <description>&lt;P&gt;This is fixed in the 16.0 compiler, so I am closing this ticket now.&lt;/P&gt;

&lt;P&gt;C:\ISN_Forums\U533490&amp;gt;ifort -Qopenmp&amp;nbsp; foo.f90&lt;BR /&gt;
	Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 16.0.0.110 Build 20150815&lt;BR /&gt;
	Copyright (C) 1985-2015 Intel Corporation.&amp;nbsp; All rights reserved.&lt;/P&gt;

&lt;P&gt;Microsoft (R) Incremental Linker Version 12.00.21005.1&lt;BR /&gt;
	Copyright (C) Microsoft Corporation.&amp;nbsp; All rights reserved.&lt;/P&gt;

&lt;P&gt;-out:foo.exe&lt;BR /&gt;
	-subsystem:console&lt;BR /&gt;
	-defaultlib:libiomp5md.lib&lt;BR /&gt;
	-nodefaultlib:vcomp.lib&lt;BR /&gt;
	-nodefaultlib:vcompd.lib&lt;BR /&gt;
	foo.obj&lt;/P&gt;

&lt;P&gt;C:\ISN_Forums\U533490&amp;gt;foo.exe&lt;BR /&gt;
	&amp;nbsp;OMP 1&lt;BR /&gt;
	&amp;nbsp;OMP 2&lt;BR /&gt;
	&amp;nbsp;OMP 3&lt;/P&gt;

&lt;P&gt;C:\ISN_Forums\U533490&amp;gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2015 20:41:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-and-DEC-attributes/m-p/1023378#M108756</guid>
      <dc:creator>pbkenned1</dc:creator>
      <dc:date>2015-10-28T20:41:23Z</dc:date>
    </item>
  </channel>
</rss>

