<?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: OpenMP support in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-support/m-p/1504365#M167219</link>
    <description>&lt;P&gt;Thanks &lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/52256"&gt;@Ron_Green&lt;/a&gt;, I'll see what I can do about a reproducer, might be a while as I'm busy with other stuff and this is deep inside some commercial code and doesn't always trip an access violation.&amp;nbsp; As for 5.0 TR4, I would hope that Intel will at some point support OpenMP 5.1 fully or the latest 5.2 spec, in which case this code should be valid.&amp;nbsp; As for other vendors, this isn't an issue for us, as we only support x64 Windows and Linux, and use OneAPI only, but GNU Fortran "strives" to be compatible with OpenMP 4.5 (&lt;A href="https://gcc.gnu.org/onlinedocs/gfortran/OpenMP.html" target="_blank"&gt;https://gcc.gnu.org/onlinedocs/gfortran/OpenMP.html&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;As a suggestion, it would be good if the compiler produced diagnostics when the user was using non-standard (unsupported) features in OpenMP.&lt;/P&gt;&lt;P&gt;For the time being, I have made the offending regions serial in debug builds; we haven't noticed any unexpected results in release builds.&lt;/P&gt;</description>
    <pubDate>Thu, 13 Jul 2023 08:27:03 GMT</pubDate>
    <dc:creator>Mark_Lewy</dc:creator>
    <dc:date>2023-07-13T08:27:03Z</dc:date>
    <item>
      <title>OpenMP support</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-support/m-p/1502237#M167102</link>
      <description>&lt;P&gt;&lt;A href="https://www.intel.com/content/www/us/en/docs/fortran-compiler/developer-guide-reference/2023-1/openmp-support.html" target="_blank"&gt;https://www.intel.com/content/www/us/en/docs/fortran-compiler/developer-guide-reference/2023-1/openmp-support.html&lt;/A&gt; claims Intel Fortran in OneAPI 2023.1 supports OpenMP 5.0 TR4 with some parts of OpenMP 5.1.&lt;/P&gt;&lt;P&gt;From the normative references in 5.0 TR4:&lt;/P&gt;&lt;P&gt;This OpenMP API specification refers to ISO/IEC 1539-1:2004 as Fortran 2003. The following&lt;BR /&gt;features are not supported:&lt;BR /&gt;– IEEE Arithmetic issues covered in Fortran 2003 Section 14&lt;BR /&gt;– Parameterized derived types&lt;BR /&gt;– The PASS attribute&lt;BR /&gt;– Procedures bound to a type as operators&lt;BR /&gt;– Overriding a type-bound procedure&lt;BR /&gt;– Polymorphic entities&lt;BR /&gt;– SELECT TYPE construct&lt;BR /&gt;– Deferred bindings and abstract types&lt;BR /&gt;– Controlling IEEE underflow&lt;BR /&gt;– Another IEEE class value&lt;/P&gt;&lt;P&gt;From the normative references in 5.1:&lt;/P&gt;&lt;P&gt;This OpenMP API specification refers to ISO/IEC 1539-1:2018 as Fortran 2018. While future&lt;BR /&gt;versions of the OpenMP specification are expected to address the following features, currently&lt;BR /&gt;their use may result in unspecified behavior.&lt;BR /&gt;– Declared type of a polymorphic allocatable component in structure constructor&lt;BR /&gt;– SELECT RANK construct&lt;BR /&gt;– IEEE comparison predicate in intrinsic relational operators&lt;BR /&gt;– Finalization of an allocatable subobject in intrinsic assignment&lt;BR /&gt;– Locality of variables in a DO CONCURRENT construct&lt;BR /&gt;– IMPORT statement extensions&lt;BR /&gt;– Assumed-rank dummy argument&lt;BR /&gt;– Assumed-type dummy argument&lt;BR /&gt;– Interoperable procedure enhancements&lt;BR /&gt;– ASYNCHRONOUS attribute enhancement&lt;/P&gt;&lt;P&gt;What does OneAPI 2023.1 actually support, in terms of Fortran standards?&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2023 08:03:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-support/m-p/1502237#M167102</guid>
      <dc:creator>Mark_Lewy</dc:creator>
      <dc:date>2023-07-06T08:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: OpenMP support</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-support/m-p/1502289#M167105</link>
      <description>&lt;P&gt;&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/86988"&gt;@Mark_Lewy&lt;/a&gt;,&amp;nbsp;have you seen &lt;A href="https://www.intel.com/content/www/us/en/developer/articles/technical/fortran-language-and-openmp-features-in-ifx.html" target="_blank" rel="noopener"&gt;this article&lt;/A&gt; with OpenMP info for ifx?&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2023 10:43:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-support/m-p/1502289#M167105</guid>
      <dc:creator>Barbara_P_Intel</dc:creator>
      <dc:date>2023-07-06T10:43:03Z</dc:date>
    </item>
    <item>
      <title>Re: OpenMP support</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-support/m-p/1502303#M167106</link>
      <description>&lt;P&gt;&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/44501"&gt;@Barbara_P_Intel&lt;/a&gt;I had a look at the article, but it doesn't answer the question I posed originally, which is what Fortran standard does the Intel OneAPI 2023.1 OpenMP implementation target and what exceptions (if any) are there?&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2023 12:06:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-support/m-p/1502303#M167106</guid>
      <dc:creator>Mark_Lewy</dc:creator>
      <dc:date>2023-07-06T12:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: OpenMP support</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-support/m-p/1502504#M167111</link>
      <description>&lt;P&gt;&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/86988"&gt;@Mark_Lewy&lt;/a&gt;&amp;nbsp; we follow the OMP Standard, and have the same restrictions as you cited above for F2003 and F2018.&amp;nbsp; We do not go beyond the OMP spec for additional features or extending support.&amp;nbsp; For example, you cannot offload coarray objects.&amp;nbsp; Other examples, intrinsics:&amp;nbsp; you cannot offload many of the Fortran Runtime library functions.&amp;nbsp; IO is a prime example.&amp;nbsp; Date/time functions.&amp;nbsp; File operations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does any other vendor or open source Fortran compiler have a table of Fortran features from 2018 and if those are allowed in OpenMP regions?&amp;nbsp; We do not have such a list.&amp;nbsp; If you have an example of what you would like to see from us, let us know and we can work on creating such a table for our OpenMP implementation.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2023 23:08:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-support/m-p/1502504#M167111</guid>
      <dc:creator>Ron_Green</dc:creator>
      <dc:date>2023-07-06T23:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: OpenMP support</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-support/m-p/1502599#M167113</link>
      <description>&lt;P&gt;&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/52256"&gt;@Ron_Green&lt;/a&gt;Understood.&amp;nbsp; What's not clear to me is whether the current version of OpenMP in OneAPI is following 5.0 TR4 and hence Fortran 2003 or 5.1 and hence Fortran 2018.&amp;nbsp; Our code uses some Fortran 2008 and some of the unsupported features of Fortran 2003 in OpenMP regions, so I want to confirm that any odd behaviour we may observe is because we are not following the standard (whatever that is).&amp;nbsp; For example, we have some OpenMP regions that fail with an access violation in&amp;nbsp; omp_set_lock() in debug builds.&lt;/P&gt;&lt;LI-CODE lang="fortran"&gt;                do ilink = 1, n_links
                    link_ =&amp;gt; iw2d_1D_data%get_ld_link(model_index, ilink)
                    call link_%slot_data%ver_conn%process_flow_into_twod(input_dt)
                end do&lt;/LI-CODE&gt;&lt;P&gt;link_ is declared as class(iw2d_1D_object), pointer :: link_, so is this an unsupported polymorphic entity according to 5.0 TR4?&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jul 2023 07:36:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-support/m-p/1502599#M167113</guid>
      <dc:creator>Mark_Lewy</dc:creator>
      <dc:date>2023-07-07T07:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: OpenMP support</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-support/m-p/1504152#M167212</link>
      <description>&lt;P&gt;&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/86988"&gt;@Mark_Lewy&lt;/a&gt;&amp;nbsp;we had a look at this in our team meeting today.&lt;/P&gt;
&lt;P&gt;Line 2 - is something we do not support currently.&amp;nbsp; A reproducer would help us evaluate the difficulty needed to support this, and whether we should adhere to 5.0 TR4 or extend our implementation to support this usage.&amp;nbsp; Can you create a reproducer for us, or is it too much work?&amp;nbsp; The question is, since it may not be allowed by 5.0 TR4, even if we accept it someday, will other vendors do the same?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2023 17:45:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-support/m-p/1504152#M167212</guid>
      <dc:creator>Ron_Green</dc:creator>
      <dc:date>2023-07-12T17:45:11Z</dc:date>
    </item>
    <item>
      <title>Re: OpenMP support</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-support/m-p/1504365#M167219</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/52256"&gt;@Ron_Green&lt;/a&gt;, I'll see what I can do about a reproducer, might be a while as I'm busy with other stuff and this is deep inside some commercial code and doesn't always trip an access violation.&amp;nbsp; As for 5.0 TR4, I would hope that Intel will at some point support OpenMP 5.1 fully or the latest 5.2 spec, in which case this code should be valid.&amp;nbsp; As for other vendors, this isn't an issue for us, as we only support x64 Windows and Linux, and use OneAPI only, but GNU Fortran "strives" to be compatible with OpenMP 4.5 (&lt;A href="https://gcc.gnu.org/onlinedocs/gfortran/OpenMP.html" target="_blank"&gt;https://gcc.gnu.org/onlinedocs/gfortran/OpenMP.html&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;As a suggestion, it would be good if the compiler produced diagnostics when the user was using non-standard (unsupported) features in OpenMP.&lt;/P&gt;&lt;P&gt;For the time being, I have made the offending regions serial in debug builds; we haven't noticed any unexpected results in release builds.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 08:27:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-support/m-p/1504365#M167219</guid>
      <dc:creator>Mark_Lewy</dc:creator>
      <dc:date>2023-07-13T08:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: OpenMP support</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-support/m-p/1504418#M167222</link>
      <description>&lt;P&gt;FWIW, does it work to replace =&amp;gt; with ASSOCIATE?&lt;/P&gt;&lt;LI-CODE lang="fortran"&gt;do ilink = 1, n_links
  associate (link_ =&amp;gt; iw2d_1D_data%get_ld_link(model_index, ilink))
    call link_%slot_data%ver_conn%process_flow_into_twod(input_dt)
  end associate
end do&lt;/LI-CODE&gt;&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 13:00:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-support/m-p/1504418#M167222</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2023-07-13T13:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: OpenMP support</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-support/m-p/1504420#M167223</link>
      <description>&lt;P&gt;&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/63968"&gt;@jimdempseyatthecove&lt;/a&gt;Good point - I have had issues with OpenMP loops and ASSOCIATE in the past, where the associate names were treated as SHARED OpenMP variables in debug builds.&amp;nbsp; I'll try experimenting again and report back here.&amp;nbsp; One other possible option would be to factor out the loop body into a separate SUBROUTINE.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 13:12:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-support/m-p/1504420#M167223</guid>
      <dc:creator>Mark_Lewy</dc:creator>
      <dc:date>2023-07-13T13:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: OpenMP support</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-support/m-p/1504436#M167224</link>
      <description>&lt;P&gt;&amp;gt;&amp;gt;&lt;SPAN&gt;&amp;nbsp;&lt;EM&gt;I have had issues with OpenMP loops and ASSOCIATE in the past, where the associate names were treated as SHARED OpenMP variables in debug builds.&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;An issue I've had with&amp;nbsp;&lt;SPAN&gt;OpenMP loops and ASSOCIATE in the past was when the ASSOCIATE name/variable was not declared outside of the parallel region. While the associate name replaces the outer scope/region name, the lack of an outer scope name generated an error.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I haven't noticed a shared issue (or implicit SAVE issue).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Another work around is to use a contained procedure:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;subroutine ...
  ...
  do ilink = 1, n_links
    call do_link(iw2d_1D_data%get_ld_link(model_index, ilink))
  end do
  ...
  return
contains
 subroutine do_link(link)
  class(iw2d_1D_object) :: link
  call link%slot_data%ver_conn%process_flow_into_twod(input_dt)
 end subroutine do_link
end subroutine ...&lt;/LI-CODE&gt;&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 14:06:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-support/m-p/1504436#M167224</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2023-07-13T14:06:35Z</dc:date>
    </item>
  </channel>
</rss>

