<?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 cblas_cdotu_sub and cblas_cdoc_sub in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/cblas-cdotu-sub-and-cblas-cdoc-sub/m-p/959377#M15752</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have noticed that the cblas functions cblas_cdotu_sub and cblas_cdotc_sub are returning 0 for the scalar product instead of the correct value. In earlier versions of MKL, the bug was also present for double precision functions (cblas_zdotu_sub and cblas_ztodc_sub). In the evaluation version for Linux I downloaded these last days, the bug is present only for single precision.&lt;/P&gt;

&lt;P&gt;Best regards.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 25 Mar 2014 09:11:32 GMT</pubDate>
    <dc:creator>marc_d_</dc:creator>
    <dc:date>2014-03-25T09:11:32Z</dc:date>
    <item>
      <title>cblas_cdotu_sub and cblas_cdoc_sub</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/cblas-cdotu-sub-and-cblas-cdoc-sub/m-p/959377#M15752</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have noticed that the cblas functions cblas_cdotu_sub and cblas_cdotc_sub are returning 0 for the scalar product instead of the correct value. In earlier versions of MKL, the bug was also present for double precision functions (cblas_zdotu_sub and cblas_ztodc_sub). In the evaluation version for Linux I downloaded these last days, the bug is present only for single precision.&lt;/P&gt;

&lt;P&gt;Best regards.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Mar 2014 09:11:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/cblas-cdotu-sub-and-cblas-cdoc-sub/m-p/959377#M15752</guid>
      <dc:creator>marc_d_</dc:creator>
      <dc:date>2014-03-25T09:11:32Z</dc:date>
    </item>
    <item>
      <title>I see no errors when I run</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/cblas-cdotu-sub-and-cblas-cdoc-sub/m-p/959378#M15753</link>
      <description>&lt;P&gt;I see no errors when I run the two examples provided with MKL: cblas_cdotc_subx.c and cblas_cdotu_subx.c, with ICC 12.1.4 and ICC 14.0.2, on OpenSuse 12.3 x64.&lt;/P&gt;

&lt;P&gt;Please provide references and/or test cases where you saw the errors that you reported.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Mar 2014 16:47:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/cblas-cdotu-sub-and-cblas-cdoc-sub/m-p/959378#M15753</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2014-03-25T16:47:00Z</dc:date>
    </item>
    <item>
      <title>When I compile and run the</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/cblas-cdotu-sub-and-cblas-cdoc-sub/m-p/959379#M15754</link>
      <description>&lt;P&gt;When I compile and run the following C++ code :&lt;/P&gt;

&lt;P&gt;#include &amp;lt;iostream&amp;gt;&lt;BR /&gt;
	#include &amp;lt;complex&amp;gt;&lt;/P&gt;

&lt;P&gt;#include "mkl_cblas.h"&lt;/P&gt;

&lt;P&gt;using namespace std;&lt;/P&gt;

&lt;P&gt;int main(int argc, char** argv)&lt;BR /&gt;
	{&lt;BR /&gt;
	&amp;nbsp; typedef float T;&lt;/P&gt;

&lt;P&gt;&amp;nbsp; complex&amp;lt;T&amp;gt;* x, *y;&lt;BR /&gt;
	&amp;nbsp; complex&amp;lt;T&amp;gt; res;&lt;BR /&gt;
	&amp;nbsp; int n, incx, incy;&lt;/P&gt;

&lt;P&gt;&amp;nbsp; n = 2;&lt;BR /&gt;
	&amp;nbsp; incx = 1;&lt;BR /&gt;
	&amp;nbsp; incy = 1;&lt;/P&gt;

&lt;P&gt;&amp;nbsp; x = new complex&amp;lt;T&amp;gt;[2];&lt;BR /&gt;
	&amp;nbsp; y = new complex&amp;lt;T&amp;gt;[2];&lt;/P&gt;

&lt;P&gt;&amp;nbsp; x[0] = complex&amp;lt;T&amp;gt;(0.43, 0.6);&lt;BR /&gt;
	&amp;nbsp; x[1] = complex&amp;lt;T&amp;gt;(0.5, 0.7);&lt;BR /&gt;
	&amp;nbsp; y[0] = complex&amp;lt;T&amp;gt;(0.8, 0.9);&lt;BR /&gt;
	&amp;nbsp; y[1] = complex&amp;lt;T&amp;gt;(0.9, 0.4);&lt;/P&gt;

&lt;P&gt;&amp;nbsp; cblas_cdotu_sub(n, x, incx, y, incy, &amp;amp;res);&lt;/P&gt;

&lt;P&gt;&amp;nbsp; cout &amp;lt;&amp;lt; "resultat = " &amp;lt;&amp;lt; res &amp;lt;&amp;lt; endl;&lt;/P&gt;

&lt;P&gt;&amp;nbsp; return 0;&lt;BR /&gt;
	}&lt;/P&gt;

&lt;P&gt;I get (0, 0) as a result. Whereas if I set T as a double and use cblas_zdotu_sub I get the correct result.&lt;/P&gt;

&lt;P&gt;I am using gcc 4.6.3 to compile the program with Ubuntu 12.04.4 LTS.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Mar 2014 17:26:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/cblas-cdotu-sub-and-cblas-cdoc-sub/m-p/959379#M15754</guid>
      <dc:creator>marc_d_</dc:creator>
      <dc:date>2014-03-25T17:26:59Z</dc:date>
    </item>
    <item>
      <title>I ran the above program that</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/cblas-cdotu-sub-and-cblas-cdoc-sub/m-p/959380#M15755</link>
      <description>&lt;P&gt;I ran the above program that you posted using g++ 4.7.2 and MKL 11.1 (32-bit and 64-bit) on OpenSuse 12.3. No problems.&lt;/P&gt;

&lt;P&gt;[bash]&lt;/P&gt;

&lt;P&gt;$ . mklvars.sh intel64&lt;/P&gt;

&lt;P&gt;$ g++ marc.cpp -lmkl_rt -lpthread -lm&lt;/P&gt;

&lt;P&gt;$ ./a.out&lt;/P&gt;

&lt;P&gt;resultat = (-0.026,1.697)&lt;/P&gt;

&lt;P&gt;[/bash]&lt;/P&gt;</description>
      <pubDate>Wed, 26 Mar 2014 00:58:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/cblas-cdotu-sub-and-cblas-cdoc-sub/m-p/959380#M15755</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2014-03-26T00:58:00Z</dc:date>
    </item>
    <item>
      <title>I try the example code above</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/cblas-cdotu-sub-and-cblas-cdoc-sub/m-p/959381#M15756</link>
      <description>&lt;P&gt;I try the example code above with GCC 4.4.6 and didn't see any errors. Having said that, I think an array of std::complex&amp;lt;float&amp;gt; may not have complex numbers at the adjacent memory locations, which is a requirement for the cblas_cdotu_sub function. To make sure that this is not the issue here, can you please try to run the following code. Here, I modified your example to use native float data types instead of std::complex&amp;lt;float&amp;gt; :&lt;/P&gt;

&lt;P&gt;#include &amp;lt;iostream&amp;gt;&lt;BR /&gt;
	#include &amp;lt;complex&amp;gt;&lt;/P&gt;

&lt;P&gt;#include "mkl_cblas.h"&lt;/P&gt;

&lt;P&gt;using namespace std;&lt;/P&gt;

&lt;P&gt;int main(int argc, char** argv)&lt;BR /&gt;
	{&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; typedef float T;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; float *x, *y;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; float res[2];&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; int n, incx, incy;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; n = 2;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; incx = 1;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; incy = 1;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; x = new float[4];&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; y = new float[4];&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; x[0] = 0.43; x[1] = 0.6;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; x[2] = 0.5; x[3] = 0.7;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; y[0] = 0.8; y[1] = 0.9;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; y[2] = 0.9; y[3] = 0.4;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cblas_cdotu_sub(n, x, incx, y, incy, &amp;amp;res[0]);&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout &amp;lt;&amp;lt; "resultat = (" &amp;lt;&amp;lt; res[0] &amp;lt;&amp;lt; "," &amp;lt;&amp;lt; res[1] &amp;lt;&amp;lt; ")" &amp;lt;&amp;lt; endl;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return 0;&lt;BR /&gt;
	}&lt;/P&gt;

&lt;P&gt;If you see correct results with the above code, then this is most likely related to how compiler handels std::complex&amp;lt;float&amp;gt;.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 26 Mar 2014 01:22:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/cblas-cdotu-sub-and-cblas-cdoc-sub/m-p/959381#M15756</guid>
      <dc:creator>Murat_G_Intel</dc:creator>
      <dc:date>2014-03-26T01:22:45Z</dc:date>
    </item>
    <item>
      <title>I remember several years ago</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/cblas-cdotu-sub-and-cblas-cdoc-sub/m-p/959382#M15757</link>
      <description>&lt;P&gt;I remember several years ago c99 complex was recommended.&lt;/P&gt;

&lt;P&gt;Meyers and plum wrote an article in 2003 about combining. C99. And c++98 but I am concerned about changes in c++11.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Mar 2014 02:31:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/cblas-cdotu-sub-and-cblas-cdoc-sub/m-p/959382#M15757</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2014-03-26T02:31:00Z</dc:date>
    </item>
  </channel>
</rss>

