<?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: MATMUL, allocatable arrays, parallelization in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/MATMUL-allocatable-arrays-parallelization/m-p/743161#M2052</link>
    <description>Please send a test case to Intel Premier Support so that it can be investigated.</description>
    <pubDate>Wed, 07 Feb 2007 22:11:40 GMT</pubDate>
    <dc:creator>Steven_L_Intel1</dc:creator>
    <dc:date>2007-02-07T22:11:40Z</dc:date>
    <item>
      <title>MATMUL, allocatable arrays, parallelization</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/MATMUL-allocatable-arrays-parallelization/m-p/743160#M2051</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;we are facing a problem with a call to MATMUL. The setup is similar to the following:&lt;/P&gt;
&lt;P&gt;REAL*8, ALLOCATABLE, DIMENSION (:,:) :: v&lt;/P&gt;
&lt;P&gt;REAL*8, ALLOCATABLE, DIMENSION (:) :: rs,temp&lt;/P&gt;
&lt;P&gt;ALLOCATE(v(n,m), temp(n), rs(m+1))&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;DO i=1,m&lt;/P&gt;
&lt;P&gt; temp = MATMUL(v(:,1:i), rs(1:i))&lt;/P&gt;
&lt;P&gt;ENDDO&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;If the above code snippet is compiled with -i8 -O3 -xW -parallel -heap-arrays, the line with MATMUL is parallelized, but the result is wrong. It is correct if the single line is broken up into a DO-loop in the form&lt;/P&gt;
&lt;P&gt;temp = temp + v(:,j)*rs(j)&lt;/P&gt;
&lt;P&gt;It is also correct, if -parallel is omitted. And, ifanother twoallocatable arrays are introduced and the critical code is replaced according to&lt;/P&gt;
&lt;P&gt;ALLOCATE (v2(n,i),rs2(i))&lt;/P&gt;
&lt;P&gt;temp = MATMUL(v2,rs2)&lt;/P&gt;
&lt;P&gt;DEALLOCATE(v2,rs2)&lt;/P&gt;
&lt;P&gt;everthing works fine - incl. parallelization.&lt;/P&gt;
&lt;P&gt;I also included some debug output to check arrays just before and after the MATMUL opperation. These show that up to the MATMUL call everything is as it should be; however, directly after MATMUL the temp arrays are different. So, there seems to be a problem with the array sections, MATMUL, and parallelization. Has anybody encountered a problem like this?&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;Hermann&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2007 19:46:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/MATMUL-allocatable-arrays-parallelization/m-p/743160#M2051</guid>
      <dc:creator>hermannl</dc:creator>
      <dc:date>2007-02-07T19:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: MATMUL, allocatable arrays, parallelization</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/MATMUL-allocatable-arrays-parallelization/m-p/743161#M2052</link>
      <description>Please send a test case to Intel Premier Support so that it can be investigated.</description>
      <pubDate>Wed, 07 Feb 2007 22:11:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/MATMUL-allocatable-arrays-parallelization/m-p/743161#M2052</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2007-02-07T22:11:40Z</dc:date>
    </item>
  </channel>
</rss>

