<?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 : reduction clause in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-reduction-clause/m-p/741360#M901</link>
    <description>That it used to not work and now does sounds as if a bug was fixed. It has nothing to do with "support" of pointers, assumed-size or allocatable arrays, since this program doesn't use any of those. So it does not make sense to ask if these are now "supported".&lt;BR /&gt;</description>
    <pubDate>Wed, 06 Sep 2006 03:48:18 GMT</pubDate>
    <dc:creator>Steven_L_Intel1</dc:creator>
    <dc:date>2006-09-06T03:48:18Z</dc:date>
    <item>
      <title>OpenMP : reduction clause</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-reduction-clause/m-p/741356#M897</link>
      <description>Hi, &lt;BR /&gt;&lt;BR /&gt;I stumbled upon a issue while trying to use the reduction clause of OpenMP with an array.&lt;BR /&gt;&lt;BR /&gt;The standard specifies that : "  Fortran pointers, Cray pointers, assumed-size arrays and allocatable     arrays may not appear in a reduction clause  ".&lt;BR /&gt;&lt;BR /&gt;The provided code has the following output : &lt;BR /&gt;$ifort -openmp prog_bon.f90&lt;BR /&gt;prog_bon.f90(13) : (col. 8) remark: OpenMP DEFINED LOOP WAS PARALLELIZED.&lt;BR /&gt;prog_bon.f90(12) : (col. 8) remark: OpenMP DEFINED REGION WAS PARALLELIZED.&lt;BR /&gt;$ ./a.out&lt;BR /&gt; 1 1 1 1 1 1&lt;BR /&gt; 1 1 1 1&lt;BR /&gt;$ ifort -openmp prog_mauvais.f90&lt;BR /&gt;prog_mauvais.f90(25) : (col. 8) remark: OpenMP DEFINED LOOP WAS PARALLELIZED.&lt;BR /&gt;prog_mauvais.f90(24) : (col. 8) remark: OpenMP DEFINED REGION WAS PARALLELIZED.&lt;BR /&gt;$ ./a.out&lt;BR /&gt;Aborted&lt;BR /&gt;$&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;As you can see, during runtime, the application crashes when the compilor have no clue of the size of the array during compile-time. &lt;BR /&gt;That was using ifort 9.1.032 on an Itanium2 / RedHat and pentium-m / ubuntu system. Now, with 9.1.033, it works as I expected it to work, and both have the same ouput (at least, with the pentium-m / ubuntu system).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Does that mean that it is now supported by ifort, and that future releases will continue to support it? Or should I be wary of that?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Samples : &lt;BR /&gt;- code that works :&lt;BR /&gt;program reduc&lt;BR /&gt; &lt;BR /&gt; implicit none&lt;BR /&gt; integer, parameter :: n = 10&lt;BR /&gt; integer, dimension(n) :: tab&lt;BR /&gt; integer :: i&lt;BR /&gt; &lt;BR /&gt; tab = 0&lt;BR /&gt; &lt;BR /&gt; call omp_set_num_threads(16)&lt;BR /&gt;&lt;BR /&gt; !$omp parallel default( shared )&lt;BR /&gt; !$omp do &amp;amp;&lt;BR /&gt; !$omp private( i ) &amp;amp;&lt;BR /&gt; !$omp reduction( + : tab )&lt;BR /&gt; do i = 1, n&lt;BR /&gt; tab(i) = tab(i) + 1&lt;BR /&gt; end do&lt;BR /&gt; !$omp end do&lt;BR /&gt; !$omp end parallel&lt;BR /&gt; &lt;BR /&gt; print *, tab&lt;BR /&gt;end program reduc&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;- code that does not work : &lt;BR /&gt;program reduc&lt;BR /&gt;&lt;BR /&gt; implicit none&lt;BR /&gt; integer, parameter :: n = 10&lt;BR /&gt; integer, dimension(n) :: tab&lt;BR /&gt;&lt;BR /&gt; call omp_set_num_threads(16)&lt;BR /&gt;&lt;BR /&gt; call calc(n,tab)&lt;BR /&gt; print *, tab&lt;BR /&gt;end program reduc&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;subroutine calc(n,tab)&lt;BR /&gt; &lt;BR /&gt; implicit none&lt;BR /&gt; integer, intent(in) :: n&lt;BR /&gt; integer, dimension(n), intent(inout) :: tab&lt;BR /&gt; integer :: i&lt;BR /&gt; &lt;BR /&gt; tab = 0&lt;BR /&gt; &lt;BR /&gt; !$omp parallel default( shared )&lt;BR /&gt; !$omp do &amp;amp;&lt;BR /&gt; !$omp private( i ) &amp;amp;&lt;BR /&gt; !$omp reduction( + : tab )&lt;BR /&gt; do i = 1, n&lt;BR /&gt; tab(i) = tab(i) + 1&lt;BR /&gt; end do&lt;BR /&gt; !$omp end do&lt;BR /&gt; !$omp end parallel&lt;BR /&gt; &lt;BR /&gt;end subroutine calc&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 18 Jul 2006 02:34:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-reduction-clause/m-p/741356#M897</guid>
      <dc:creator>under7</dc:creator>
      <dc:date>2006-07-18T02:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: OpenMP : reduction clause</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-reduction-clause/m-p/741357#M898</link>
      <description>I can confirm that a similar code got run-time error on&lt;BR /&gt;ifort 9.1.032 on itanium2. But it has no problems on ifort 8.1.&lt;BR /&gt;&lt;BR /&gt;It is definitely a bug of ifort 9.1.032. (have not got chance&lt;BR /&gt;to test newer ifort 9.1). The bug happens when &lt;BR /&gt;the array used in "reduction" appears in calling parameters.&lt;BR /&gt;&lt;BR /&gt;Xiaogang&lt;BR /&gt;</description>
      <pubDate>Fri, 01 Sep 2006 23:03:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-reduction-clause/m-p/741357#M898</guid>
      <dc:creator>Xiaogang_W_</dc:creator>
      <dc:date>2006-09-01T23:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: OpenMP : reduction clause</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-reduction-clause/m-p/741358#M899</link>
      <description>&lt;FONT color="#0000ff"&gt;The example shown does not have any of the kinds of arrays the manual says are not supported. "array" is an adjustable array, not assumed-size.&lt;BR /&gt;&lt;/FONT&gt;</description>
      <pubDate>Fri, 01 Sep 2006 23:54:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-reduction-clause/m-p/741358#M899</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2006-09-01T23:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: OpenMP : reduction clause</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-reduction-clause/m-p/741359#M900</link>
      <description>Exactly. So the example code should work. "reduction" on the&lt;BR /&gt;arrays in that code should work. &lt;BR /&gt;But it does not work on ifort 9.0.032 !!!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Xiaogang&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 06 Sep 2006 03:16:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-reduction-clause/m-p/741359#M900</guid>
      <dc:creator>Xiaogang_W_</dc:creator>
      <dc:date>2006-09-06T03:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: OpenMP : reduction clause</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-reduction-clause/m-p/741360#M901</link>
      <description>That it used to not work and now does sounds as if a bug was fixed. It has nothing to do with "support" of pointers, assumed-size or allocatable arrays, since this program doesn't use any of those. So it does not make sense to ask if these are now "supported".&lt;BR /&gt;</description>
      <pubDate>Wed, 06 Sep 2006 03:48:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-reduction-clause/m-p/741360#M901</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2006-09-06T03:48:18Z</dc:date>
    </item>
    <item>
      <title>Re: OpenMP : reduction clause</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-reduction-clause/m-p/741361#M902</link>
      <description>&lt;P&gt;A couple of comments:&lt;/P&gt;
&lt;P&gt;In the working example the value of the parameter n is known at time of loop compilation. n, by the way, is less than the number of processors. The loop may have been parallelized but with the restriction that the number of threads assigned may have been less than those available. In the non-working code the subroutine cannot assume anything about the value of n. So... what happens for both examples when you set n to 1000?&lt;/P&gt;
&lt;P&gt;(I don't have your setup and cannot test here. I have a 4-way IA32 system)&lt;/P&gt;
&lt;P&gt;The example code by the way does not require reduction as a given cell in tab is updated only by one of the available processors.&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2006 05:51:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-reduction-clause/m-p/741361#M902</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2006-09-06T05:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: OpenMP : reduction clause</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-reduction-clause/m-p/741362#M903</link>
      <description>Well, I know that both examples that I submited should have compiled and executed normally (and also that they are totally moronic, that a reduction clause is not needed here), with identical results, since they are both within range of what is allowed by the OpenMP standard.&lt;BR /&gt;&lt;BR /&gt;I just wanted to know if, since it was not supported in ifort 9.1.032, and it was by 9.1.033, it was now and would continue to be supported by &lt;B&gt;future releases&lt;/B&gt; of ifort, or if it was still something that was in testing, thus not fully supported yet by ifort.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I tried with Compaq's f90 (don't know the version), and it simply refused to compile with an array in a reduction clause, whatever type the array may be. I stumbled upon a bug report of the GNU Fortran compiler, reporting it caused an Internal Compiler Error at compile-time. So, I do not find it ludicrous to ask if it could be used safely with ifort.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I submitted this to Intel Premier Support, and their answer was yes, that it was now fully suported by ifort.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 06 Sep 2006 16:11:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-reduction-clause/m-p/741362#M903</guid>
      <dc:creator>under7</dc:creator>
      <dc:date>2006-09-06T16:11:55Z</dc:date>
    </item>
    <item>
      <title>Re: OpenMP : reduction clause</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-reduction-clause/m-p/741363#M904</link>
      <description>What I want to know is what is the "it" for which you want to know the support status? I haven't been able to determine that from your posts so far.&lt;BR /&gt;</description>
      <pubDate>Wed, 06 Sep 2006 21:10:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-reduction-clause/m-p/741363#M904</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2006-09-06T21:10:14Z</dc:date>
    </item>
    <item>
      <title>Re: OpenMP : reduction clause</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-reduction-clause/m-p/741364#M905</link>
      <description>By "it", I meant the sample titled "code that does not work".&lt;BR /&gt;&lt;BR /&gt;EDIT : enlarging the range of that sample, I would like to know if the OpenMP reduction clause is now fully supported by ifort, meaning any setup implying arrays (that are still within the scope of the standard, of course).&lt;BR /&gt;</description>
      <pubDate>Thu, 07 Sep 2006 00:25:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-reduction-clause/m-p/741364#M905</guid>
      <dc:creator>under7</dc:creator>
      <dc:date>2006-09-07T00:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: OpenMP : reduction clause</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-reduction-clause/m-p/741365#M906</link>
      <description>The REDUCTION clause is fully supported and has been for a long time. Your sample program does not violate the OpenMP standard's restrictions on the list variables. It is likely that you encountered a bug that was fixed.&lt;BR /&gt;</description>
      <pubDate>Thu, 07 Sep 2006 01:41:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-reduction-clause/m-p/741365#M906</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2006-09-07T01:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: OpenMP : reduction clause</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-reduction-clause/m-p/741366#M907</link>
      <description>Thank you for the crystal clear answer.&lt;BR /&gt;&lt;BR /&gt;Since the sample was that basic, and confronted by the lack of support from a few other compilers, I assumed that using an array within a reduction clause was still quite new to ifort (that is to say, before 9.1.033), thus not fully reliable.&lt;BR /&gt;</description>
      <pubDate>Thu, 07 Sep 2006 01:57:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-reduction-clause/m-p/741366#M907</guid>
      <dc:creator>under7</dc:creator>
      <dc:date>2006-09-07T01:57:28Z</dc:date>
    </item>
  </channel>
</rss>

