<?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 How are Qopenmp and reentrancy related? in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-are-Qopenmp-and-reentrancy-related/m-p/915272#M84130</link>
    <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
if an application has OpenMP statements, does it need the "reentrancy" option also?&lt;BR /&gt;
How are these options related?&lt;BR /&gt;
&lt;BR /&gt;
Markus&lt;BR /&gt;
&lt;BR /&gt;</description>
    <pubDate>Sat, 01 Mar 2008 17:53:54 GMT</pubDate>
    <dc:creator>markus</dc:creator>
    <dc:date>2008-03-01T17:53:54Z</dc:date>
    <item>
      <title>How are Qopenmp and reentrancy related?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-are-Qopenmp-and-reentrancy-related/m-p/915272#M84130</link>
      <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
if an application has OpenMP statements, does it need the "reentrancy" option also?&lt;BR /&gt;
How are these options related?&lt;BR /&gt;
&lt;BR /&gt;
Markus&lt;BR /&gt;
&lt;BR /&gt;</description>
      <pubDate>Sat, 01 Mar 2008 17:53:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/How-are-Qopenmp-and-reentrancy-related/m-p/915272#M84130</guid>
      <dc:creator>markus</dc:creator>
      <dc:date>2008-03-01T17:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: How are Qopenmp and reentrancy related?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-are-Qopenmp-and-reentrancy-related/m-p/915273#M84131</link>
      <description>Subroutines and run-time library functions called in parallel regions must be reentrant. /Qopenmp sets the appropriate options implicitly.&lt;BR /&gt;Evident differences from serial compilation are the avoidance of local SAVE variables and the requirement for multi-thread libraries. ifort gives local arrays a default SAVE status, unless one of the options Qopenmp, or Qauto is set.&lt;BR /&gt;Incidentally, VS2005 and 2008 no longer include libraries which aren't compatible with OpenMP. &lt;BR /&gt;</description>
      <pubDate>Sat, 01 Mar 2008 19:13:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/How-are-Qopenmp-and-reentrancy-related/m-p/915273#M84131</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2008-03-01T19:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: How are Qopenmp and reentrancy related?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-are-Qopenmp-and-reentrancy-related/m-p/915274#M84132</link>
      <description>The "reentrancy" option affects the run-time library only. It gets set by default if you say /Qopenmp. As Tim says, /Qopenmp also has the effect of /recursive.&lt;BR /&gt;</description>
      <pubDate>Sat, 01 Mar 2008 19:26:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/How-are-Qopenmp-and-reentrancy-related/m-p/915274#M84132</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2008-03-01T19:26:22Z</dc:date>
    </item>
    <item>
      <title>Re: How are Qopenmp and reentrancy related?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-are-Qopenmp-and-reentrancy-related/m-p/915275#M84133</link>
      <description>&lt;P&gt;FWIW&lt;/P&gt;
&lt;P&gt;For local arrays, you may find it necessary to explicitly state your intentions&lt;/P&gt;
&lt;P&gt;subroutine foo()&lt;BR /&gt;real,automatic:: A(3)&lt;BR /&gt;...&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;As Steve stated, the default array storage is SAVE&lt;/P&gt;
&lt;P&gt;Jim Dempsey&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 02 Mar 2008 13:51:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/How-are-Qopenmp-and-reentrancy-related/m-p/915275#M84133</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2008-03-02T13:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: How are Qopenmp and reentrancy related?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-are-Qopenmp-and-reentrancy-related/m-p/915276#M84134</link>
      <description>... but not if you say /Qopenmp. If you use /Qopenmp the compiler will apply appropriate defaults - it is not necessary to use the AUTOMATIC attribute (which is an extension.) &lt;BR /&gt;&lt;BR /&gt;More important is to understand which variables need to be shared among threads (and protected with synchronization) and which do not. Use of OpenMP constructs such as reductions can help improve performance.&lt;BR /&gt;</description>
      <pubDate>Sun, 02 Mar 2008 14:01:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/How-are-Qopenmp-and-reentrancy-related/m-p/915276#M84134</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2008-03-02T14:01:51Z</dc:date>
    </item>
    <item>
      <title>Re: How are Qopenmp and reentrancy related?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-are-Qopenmp-and-reentrancy-related/m-p/915277#M84135</link>
      <description>Thanks for your fast responses.&lt;BR /&gt;
&lt;BR /&gt;
I have my local vars "automatic" as default, so I definitely know those which are not.&lt;BR /&gt;
&lt;BR /&gt;
But I have found I &lt;B&gt;must&lt;/B&gt; set /reentrancy explicitely otherwise my OpenMP-program fails with &lt;I&gt;"forrtl: severe (152): unresolved contention for Intel Fortran RTL global resource"&lt;/I&gt;.&lt;BR /&gt;
&lt;BR /&gt;
Alternatively it helps to call &lt;I&gt;iret=for_set_reentrancy(for_k_reentrancy_threaded)&lt;/I&gt;&lt;B&gt;.&lt;/B&gt; I did this just one line before the parallel region. &lt;BR /&gt;
&lt;BR /&gt;
Seems /Qopenmp does not include /reentrancy. &lt;BR /&gt;
&lt;BR /&gt;
Since /reentrancy is a RTL setting, it is rather confusing that this
option is located under "Code Generation" in Visual Studio 2003 and the
help text is also speaking of "code generation". The console help (ifort /help) is correct. GUIs are nice, but...&lt;BR /&gt;
&lt;BR /&gt;
Markus&lt;BR /&gt;</description>
      <pubDate>Mon, 03 Mar 2008 13:43:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/How-are-Qopenmp-and-reentrancy-related/m-p/915277#M84135</guid>
      <dc:creator>markus</dc:creator>
      <dc:date>2008-03-03T13:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: How are Qopenmp and reentrancy related?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-are-Qopenmp-and-reentrancy-related/m-p/915278#M84136</link>
      <description>There's two (at least!) issues at work. First is to choose whether the libraries being used are thread-safe or not. It would appear that you have to explicitly choose the multithreaded library (this is the /threads command line switch). Then there is generated code that tells the run-time library whether or not to enable thread reentrancy - this is /reentrancy. I know this is confusing.&lt;BR /&gt;&lt;BR /&gt;/Qopenmp does imply /reentrancy:threaded (by my tests), but apparently not the multithreaded libraries. I'll discuss this with the development team to see if this should change. Note that with VS2005, the default is multithread static libraries anyway as there are no single-threaded libraries.&lt;BR /&gt;&lt;BR /&gt;You should not have to call for_set_reentrancy directly, as far as I know.&lt;BR /&gt;</description>
      <pubDate>Mon, 03 Mar 2008 14:12:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/How-are-Qopenmp-and-reentrancy-related/m-p/915278#M84136</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2008-03-03T14:12:08Z</dc:date>
    </item>
  </channel>
</rss>

