<?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: Bug in GEMV ? in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Bug-in-GEMV/m-p/892347#M10526</link>
    <description>I don't have the same compilers installed, as I have little interest in 32-bit compilation on 64-bit OS, but this example seems to work OK here. Interesting combination of legacy non-standard intrinsic with f90.&lt;BR /&gt;If you have a problem with the beta compilers offered at the top of the Fortran forum, which should include MKL, you should file a report on premier.intel.com.&lt;BR /&gt;</description>
    <pubDate>Sat, 06 Sep 2008 03:20:35 GMT</pubDate>
    <dc:creator>TimP</dc:creator>
    <dc:date>2008-09-06T03:20:35Z</dc:date>
    <item>
      <title>Bug in GEMV ?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Bug-in-GEMV/m-p/892346#M10525</link>
      <description>&lt;P&gt;&lt;FONT face="Arial"&gt;The following simple program, which uses MKL's GEMV for complex array sections, produce erroneous results.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial"&gt;The program is made of one module (containing one complex array LX), and two subroutines (including the main program). The program links mkl_blas95.lib (which has been created following the MKL documentation). The file mkl_blas.f90 is included in the project.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial"&gt;I am using VS 2005 - Intel Fortran 10.1 and MKL 10.1 Beta 2. The code is compiled as a 32-bit executable and runs on 64-bit XP.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial"&gt;Here is the module:&lt;/FONT&gt;&lt;/P&gt;&lt;FONT face="Arial"&gt;&lt;B&gt;&lt;FONT color="#0000ff" size="2"&gt;
&lt;P&gt;MODULE&lt;/P&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; MOD&lt;BR /&gt;&lt;/FONT&gt;&lt;B&gt;&lt;FONT color="#0000ff" size="2"&gt;COMPLEX(8)&lt;/FONT&gt;&lt;/B&gt;&lt;FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;,&lt;/FONT&gt;&lt;B&gt;&lt;FONT color="#0000ff" size="2"&gt;ALLOCATABLE&lt;/FONT&gt;&lt;/B&gt;&lt;FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; :: LX(:,:)&lt;BR /&gt;&lt;/FONT&gt;&lt;B&gt;&lt;FONT color="#0000ff" size="2"&gt;END MODULE&lt;/FONT&gt;&lt;/B&gt;&lt;FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; MOD&lt;/FONT&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Here is the subroutine (which accesses the module, and calls GEMV):&lt;/P&gt;&lt;B&gt;&lt;FONT color="#0000ff" size="2"&gt;
&lt;P&gt;SUBROUTINE&lt;/P&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; SUB(L,X,Y,N,M)&lt;BR /&gt;&lt;/FONT&gt;&lt;B&gt;&lt;FONT color="#0000ff" size="2"&gt;USE&lt;/FONT&gt;&lt;/B&gt;&lt;FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; MOD&lt;BR /&gt;&lt;/FONT&gt;&lt;B&gt;&lt;FONT color="#0000ff" size="2"&gt;USE&lt;/FONT&gt;&lt;/B&gt;&lt;FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; MKL95_BLAS&lt;BR /&gt;&lt;/FONT&gt;&lt;B&gt;&lt;FONT color="#0000ff" size="2"&gt;IMPLICIT NONE&lt;BR /&gt;INTEGER(4)&lt;/FONT&gt;&lt;/B&gt;&lt;FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; N,M&lt;BR /&gt;&lt;/FONT&gt;&lt;B&gt;&lt;FONT color="#0000ff" size="2"&gt;COMPLEX(8)&lt;/FONT&gt;&lt;/B&gt;&lt;FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;,&lt;/FONT&gt;&lt;B&gt;&lt;FONT color="#0000ff" size="2"&gt;INTENT&lt;/FONT&gt;&lt;/B&gt;&lt;FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;(IN) :: X(N,M)&lt;BR /&gt;&lt;/FONT&gt;&lt;B&gt;&lt;FONT color="#0000ff" size="2"&gt;COMPLEX(8)&lt;/FONT&gt;&lt;/B&gt;&lt;FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;,&lt;/FONT&gt;&lt;B&gt;&lt;FONT color="#0000ff" size="2"&gt;INTENT&lt;/FONT&gt;&lt;/B&gt;&lt;FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;(OUT) :: Y(N,M)&lt;BR /&gt;&lt;/FONT&gt;&lt;B&gt;&lt;FONT color="#0000ff" size="2"&gt;COMPLEX(8)&lt;/FONT&gt;&lt;/B&gt;&lt;FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;,&lt;/FONT&gt;&lt;B&gt;&lt;FONT color="#0000ff" size="2"&gt;INTENT&lt;/FONT&gt;&lt;/B&gt;&lt;FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;(IN) :: L(N,N,M)&lt;BR /&gt;&lt;/FONT&gt;&lt;B&gt;&lt;FONT color="#0000ff" size="2"&gt;CALL&lt;/FONT&gt;&lt;/B&gt;&lt;FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; GEMV(L(1:N,1:N,1),X(1:N,1),LX(1:N,1))&lt;BR /&gt;Y = LX&lt;BR /&gt;&lt;/FONT&gt;&lt;B&gt;&lt;FONT color="#0000ff" size="2"&gt;END SUBROUTINE&lt;/FONT&gt;&lt;/B&gt;&lt;FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; SUB&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;Here is the main program:&lt;/P&gt;&lt;B&gt;&lt;FONT color="#0000ff" size="2"&gt;
&lt;P&gt;PROGRAM&lt;/P&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; TEST&lt;BR /&gt;&lt;/FONT&gt;&lt;B&gt;&lt;FONT color="#0000ff" size="2"&gt;USE&lt;/FONT&gt;&lt;/B&gt;&lt;FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; MOD&lt;BR /&gt;&lt;/FONT&gt;&lt;B&gt;&lt;FONT color="#0000ff" size="2"&gt;IMPLICIT NONE&lt;BR /&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;FONT&gt;&lt;B&gt;COMPLEX(8)&lt;/B&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;,&lt;/FONT&gt;&lt;B&gt;&lt;FONT color="#0000ff" size="2"&gt;ALLOCATABLE&lt;/FONT&gt;&lt;/B&gt;&lt;FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; :: L(:,:,:),X(:,:),Y(:,:)&lt;BR /&gt;&lt;/FONT&gt;&lt;B&gt;&lt;FONT color="#0000ff" size="2"&gt;INTEGER(4)&lt;/FONT&gt;&lt;/B&gt;&lt;FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; N,M&lt;BR /&gt;N=2&lt;BR /&gt;M=3&lt;BR /&gt;&lt;/FONT&gt;&lt;B&gt;&lt;FONT color="#0000ff" size="2"&gt;ALLOCATE&lt;/FONT&gt;&lt;/B&gt;&lt;FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;(L(N,N,M),X(N,M),Y(N,M),LX(N,M))&lt;BR /&gt;L = &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;DCMPLX&lt;/FONT&gt;&lt;FONT size="2"&gt;(1.0D+0,0.0D+0)&lt;BR /&gt;X = &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;DCMPLX&lt;/FONT&gt;&lt;FONT size="2"&gt;(1.0D+0,0.0D+0)&lt;BR /&gt;Y = &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;DCMPLX&lt;/FONT&gt;&lt;FONT size="2"&gt;(0.0D+0,0.0D+0)&lt;BR /&gt;&lt;/FONT&gt;&lt;B&gt;&lt;FONT color="#0000ff" size="2"&gt;CALL&lt;/FONT&gt;&lt;/B&gt;&lt;FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; SUB(L,X,Y,N,M)&lt;BR /&gt;&lt;/FONT&gt;&lt;B&gt;&lt;FONT color="#0000ff" size="2"&gt;WRITE&lt;/FONT&gt;&lt;/B&gt;&lt;FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;(*,*) Y&lt;BR /&gt;&lt;/FONT&gt;&lt;B&gt;&lt;FONT color="#0000ff" size="2"&gt;END&lt;/FONT&gt;&lt;/B&gt;&lt;FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; &lt;/FONT&gt;&lt;B&gt;&lt;FONT color="#0000ff" size="2"&gt;PROGRAM&lt;/FONT&gt;&lt;/B&gt;&lt;FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; TEST&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;The output of TEST is of the 6.277E+66 kind...&lt;/P&gt;
&lt;P&gt;Now, if I declare and initializeLX in SUB the program works as intended. Similarly, the program works as is if I use ZGEMV instead of GEMV (with the necessary modifications to SUB).&lt;/P&gt;
&lt;P&gt;Any explanation? I am sure that somethin
gs escapes my understanding - but could this be a bug as well?&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT size="3"&gt;Olivier&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;</description>
      <pubDate>Thu, 04 Sep 2008 21:39:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Bug-in-GEMV/m-p/892346#M10525</guid>
      <dc:creator>OP1</dc:creator>
      <dc:date>2008-09-04T21:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in GEMV ?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Bug-in-GEMV/m-p/892347#M10526</link>
      <description>I don't have the same compilers installed, as I have little interest in 32-bit compilation on 64-bit OS, but this example seems to work OK here. Interesting combination of legacy non-standard intrinsic with f90.&lt;BR /&gt;If you have a problem with the beta compilers offered at the top of the Fortran forum, which should include MKL, you should file a report on premier.intel.com.&lt;BR /&gt;</description>
      <pubDate>Sat, 06 Sep 2008 03:20:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Bug-in-GEMV/m-p/892347#M10526</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2008-09-06T03:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in GEMV ?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Bug-in-GEMV/m-p/892348#M10527</link>
      <description>&lt;P&gt;&lt;FONT face="Arial"&gt;Hi Tim18,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial"&gt;I don't think it's a matter of 32-bit code running on 64-bit machine. I just indicated this for the sake of completeness. I believe there must be something fishy going on with the compiler or GEMV in this very particular case (since it works with other constructs). The problem is with the access in SUB to the module variable LX.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial"&gt;For instance, if I modify the last lines of SUB as follows:&lt;/FONT&gt;&lt;/P&gt;&lt;B&gt;&lt;FONT color="#0000ff" size="2"&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;CALL&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;FONT face="Courier New"&gt; GEMV(L(1:N,1:N,1),X(1:N,1),LX(1:N,1))&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;Y = LX&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial"&gt;transformed into&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color="#0000ff"&gt;&lt;STRONG&gt;CALL&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;FONT face="Courier New"&gt; GEMV(L(1:N,1:N,1),X(1:N,1),Y(1:N,1))&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;&lt;FONT face="Arial"&gt;then the code works flawlessly (the module variables is not accessed anymore). And, as I said, the subroutine ZGEMV works with the code as is (except it has more parameters, of course) - in other words, ZGEMV has no issues accessing properly the desired section of the complex module variable LX, whereas GEMV's behavior is troublesome.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;&lt;FONT face="Arial"&gt;If anybody has an idea about what's going on here, this would be great (especially if somebody can reproduce this behavior). The sample code above is very representative of what my real code does. Right now everything works fine with the ZGEMV subroutine - so this is what I use. But I would appreciate being able to use GEMV... it's cleaner... faster to code... and it's supposed to work.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;&lt;FONT face="Arial"&gt;Tim18, what do you mean when you say it's "a combination of legacy non-standard intrinsic with F90?"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;&lt;FONT face="Arial"&gt;Thanks,&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;&lt;FONT face="Arial"&gt;Olivier&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Sep 2008 14:45:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Bug-in-GEMV/m-p/892348#M10527</guid>
      <dc:creator>OP1</dc:creator>
      <dc:date>2008-09-08T14:45:58Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in GEMV ?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Bug-in-GEMV/m-p/892349#M10528</link>
      <description>&lt;P&gt;dcmplx is non-standard Fortran, such as would have been used 20 years ago. There have been a few discussions about the lack of a generic f77 styleequivalent. I guess one can rely on dcmplx(x,y) to work the same as cmplx(x,y,kind(1d0)), if it works at all. In your style, it would be cmplx(x,y,8).&lt;/P&gt;
&lt;P&gt;Your use of kinds 4 and 8of course is non-portable, although it will work with most compilers for the same platforms.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Sep 2008 15:38:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Bug-in-GEMV/m-p/892349#M10528</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2008-09-08T15:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in GEMV ?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Bug-in-GEMV/m-p/892350#M10529</link>
      <description>&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;Oliver.&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;Id like to add my five cents  did you try to initialize array LX before calculation?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;--Gennady&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Sep 2008 06:12:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Bug-in-GEMV/m-p/892350#M10529</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2008-09-09T06:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in GEMV ?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Bug-in-GEMV/m-p/892351#M10530</link>
      <description>&lt;P&gt;It's really, according to GEMV description,y = Ax + y.&lt;/P&gt;
&lt;P&gt;ALLOCATE statement allocates memory only. It does not nullify elements.&lt;/P&gt;
&lt;P&gt;Often we have zero elements after ALLOCATE, but in common case undefined values.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Vladimir&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Sep 2008 06:22:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Bug-in-GEMV/m-p/892351#M10530</guid>
      <dc:creator>Vladimir_Koldakov__I</dc:creator>
      <dc:date>2008-09-09T06:22:29Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in GEMV ?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Bug-in-GEMV/m-p/892352#M10531</link>
      <description>&lt;P&gt;&lt;FONT face="Arial"&gt;Thanks Gennady and Vladimir... you both were right... the solution to this *problem*is that the default beta value in GEMV is 1... and therefore I should have initialized LX... Arrggh... I hate hidden default values :)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial"&gt;Thanks again!!&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial"&gt;Olivier&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Sep 2008 12:07:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Bug-in-GEMV/m-p/892352#M10531</guid>
      <dc:creator>OP1</dc:creator>
      <dc:date>2008-09-09T12:07:14Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in GEMV ?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Bug-in-GEMV/m-p/892353#M10532</link>
      <description>&lt;P&gt;Oliver,&lt;/P&gt;
&lt;P&gt;Yes, I see,default values:alpha=1, beta=0are more reasonable.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Vladimir&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Sep 2008 03:47:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Bug-in-GEMV/m-p/892353#M10532</guid>
      <dc:creator>Vladimir_Koldakov__I</dc:creator>
      <dc:date>2008-09-11T03:47:32Z</dc:date>
    </item>
  </channel>
</rss>

