<?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 fortran pointer assignment as omp atomic in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/fortran-pointer-assignment-as-omp-atomic/m-p/939101#M89520</link>
    <description>&lt;P&gt;Hi out there,&lt;/P&gt;
&lt;P&gt;I would like lock-free join two linked list in Fortran+OpenMP.&lt;BR /&gt;Therefore I need to change a pointer atomically. This should not be any problem in C/C++, but in Fortran I do not manage to :(&lt;/P&gt;
&lt;P&gt;The following code is rejected by the Intel Compiler with the error:&lt;BR /&gt;error #7646: A store statement is expected in an OpenMP* ATOMIC construct. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; !$omp atomic&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; last_job%next =&amp;gt; tmp_first_job&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; !$omp end atomic&lt;/P&gt;
&lt;P&gt;Is there any work-around?&lt;BR /&gt;Will there be support of the "=&amp;gt;" operation in future?&lt;/P&gt;
&lt;P&gt;regards,&lt;BR /&gt;Jens Henrik&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 09 Feb 2013 19:53:36 GMT</pubDate>
    <dc:creator>jhgoebbert</dc:creator>
    <dc:date>2013-02-09T19:53:36Z</dc:date>
    <item>
      <title>fortran pointer assignment as omp atomic</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/fortran-pointer-assignment-as-omp-atomic/m-p/939101#M89520</link>
      <description>&lt;P&gt;Hi out there,&lt;/P&gt;
&lt;P&gt;I would like lock-free join two linked list in Fortran+OpenMP.&lt;BR /&gt;Therefore I need to change a pointer atomically. This should not be any problem in C/C++, but in Fortran I do not manage to :(&lt;/P&gt;
&lt;P&gt;The following code is rejected by the Intel Compiler with the error:&lt;BR /&gt;error #7646: A store statement is expected in an OpenMP* ATOMIC construct. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; !$omp atomic&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; last_job%next =&amp;gt; tmp_first_job&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; !$omp end atomic&lt;/P&gt;
&lt;P&gt;Is there any work-around?&lt;BR /&gt;Will there be support of the "=&amp;gt;" operation in future?&lt;/P&gt;
&lt;P&gt;regards,&lt;BR /&gt;Jens Henrik&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Feb 2013 19:53:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/fortran-pointer-assignment-as-omp-atomic/m-p/939101#M89520</guid>
      <dc:creator>jhgoebbert</dc:creator>
      <dc:date>2013-02-09T19:53:36Z</dc:date>
    </item>
    <item>
      <title>just an additional remark:</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/fortran-pointer-assignment-as-omp-atomic/m-p/939102#M89521</link>
      <description>&lt;P&gt;just an additional remark:&lt;/P&gt;
&lt;P&gt;I cannot use the following as an alternative, because ifort gives the error:&lt;BR /&gt;error #7656: Subobjects are not allowed in this OpenMP* clause; a named variable must be specified.&amp;nbsp;&amp;nbsp; [NEXT] &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; last_job%next =&amp;gt; tmp_first_job&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; !$omp flush (last_job%next)&lt;/P&gt;
&lt;P&gt;but just using !$omp flush(last_job) will probably only flush the pointer to the structure of "last_job" and not of the "next" pointer inside the structure.&lt;/P&gt;
&lt;P&gt;Any idea ?&lt;BR /&gt;regards,&lt;BR /&gt;Jens Henrik&lt;/P&gt;</description>
      <pubDate>Sat, 09 Feb 2013 20:24:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/fortran-pointer-assignment-as-omp-atomic/m-p/939102#M89521</guid>
      <dc:creator>jhgoebbert</dc:creator>
      <dc:date>2013-02-09T20:24:28Z</dc:date>
    </item>
    <item>
      <title>Please provide a small copy</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/fortran-pointer-assignment-as-omp-atomic/m-p/939103#M89522</link>
      <description>&lt;P&gt;Please provide a small copy of your linked list code. What you have in your first example is not indicative of a functionally correct, thread-safe, linked list management piece of code. This would typically require an !$OMP CRITICAL section or use of a CAS or DCAS type of implimentation.&lt;/P&gt;
&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Mon, 11 Feb 2013 15:26:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/fortran-pointer-assignment-as-omp-atomic/m-p/939103#M89522</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2013-02-11T15:26:44Z</dc:date>
    </item>
    <item>
      <title>Assuming that atomic applies</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/fortran-pointer-assignment-as-omp-atomic/m-p/939104#M89523</link>
      <description>&lt;P&gt;Assuming that atomic applies only to simple data items, it might work with a c_ptr, but I wouldn't recommend it.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Feb 2013 15:55:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/fortran-pointer-assignment-as-omp-atomic/m-p/939104#M89523</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2013-02-11T15:55:21Z</dc:date>
    </item>
    <item>
      <title>The documented requirements</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/fortran-pointer-assignment-as-omp-atomic/m-p/939105#M89524</link>
      <description>&lt;P&gt;The documented requirements for OMP$ ATOMIC say that "all assignments must be intrinsic assignments". Pointer assignment doesn't comply.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Feb 2013 16:00:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/fortran-pointer-assignment-as-omp-atomic/m-p/939105#M89524</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2013-02-11T16:00:08Z</dc:date>
    </item>
  </channel>
</rss>

