<?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 That's a curious result. At in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-s-cblas-saxpy-outputs-incorrect-results/m-p/1175822#M28917</link>
    <description>&lt;P&gt;That's a curious result. At first glance, everything looks correct. How did you link this case? and which version of&amp;nbsp;mkl do you use?&lt;/P&gt;</description>
    <pubDate>Tue, 08 Oct 2019 03:16:05 GMT</pubDate>
    <dc:creator>Gennady_F_Intel</dc:creator>
    <dc:date>2019-10-08T03:16:05Z</dc:date>
    <item>
      <title>MKL's cblas_saxpy outputs incorrect results</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-s-cblas-saxpy-outputs-incorrect-results/m-p/1175821#M28916</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I need to add two arrays in an efficient way, so I tried MKL's saxpy.&lt;/P&gt;&lt;P&gt;When I use the cblas_saxpy function on two dummy arrays with all values initialized to 1 and 2 respectively, I get totally wrong results. And I couldn't figure out what's wrong with my code.&lt;/P&gt;&lt;P&gt;(I omitted other includes)&lt;/P&gt;
&lt;PRE class="brush:cpp; class-name:dark;"&gt;#include "mkl.h"

#define SIZE 10000

int main()
{

        float* buf_x = (float*) malloc(SIZE * sizeof(float));
        float* buf_y = (float*) malloc(SIZE * sizeof(float));

        for (int i = 0; i&amp;lt;SIZE; i++){

            buf_x&lt;I&gt; = 1.f;

            buf_y&lt;I&gt; = 2.f;

        }

        cblas_saxpy ((MKL_INT)SIZE, 1, buf_x, (MKL_INT)1, buf_y, (MKL_INT)1);

        for (int i = 0; i&amp;lt;SIZE; i++)

            printf("%f, ", buf_y&lt;I&gt;);

        return 0;
}&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;

&lt;P&gt;I get as an output 204 instead of 3.&lt;/P&gt;
&lt;P&gt;Can anybody shed a light on this ?&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2019 16:36:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-s-cblas-saxpy-outputs-incorrect-results/m-p/1175821#M28916</guid>
      <dc:creator>Dee__Nadd</dc:creator>
      <dc:date>2019-10-07T16:36:30Z</dc:date>
    </item>
    <item>
      <title>That's a curious result. At</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-s-cblas-saxpy-outputs-incorrect-results/m-p/1175822#M28917</link>
      <description>&lt;P&gt;That's a curious result. At first glance, everything looks correct. How did you link this case? and which version of&amp;nbsp;mkl do you use?&lt;/P&gt;</description>
      <pubDate>Tue, 08 Oct 2019 03:16:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-s-cblas-saxpy-outputs-incorrect-results/m-p/1175822#M28917</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2019-10-08T03:16:05Z</dc:date>
    </item>
    <item>
      <title>I validated this case with</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-s-cblas-saxpy-outputs-incorrect-results/m-p/1175823#M28918</link>
      <description>&lt;P&gt;I validated this case with the latest MKL 2019 u5.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I see no problems on our side.&lt;/P&gt;&lt;P&gt;compiling as icc -mkl test&lt;/P&gt;&lt;P&gt;MKL_VERBOSE Intel(R) MKL 2019.0 Update 5 Product build 20190808 for Intel(R) 64 architecture Intel(R) Advanced Vector Extensions (Intel(R) AVX) enabled processors, Lnx 2.80GHz lp64 intel_thread&lt;BR /&gt;MKL_VERBOSE SAXPY(10000,0x7ffe8f0a1658,0x23b7080,1,0x23c0cd0,1) 6.48ms CNR:OFF Dyn:1 FastMM:1 TID:0 &amp;nbsp;NThr:20&lt;/P&gt;&lt;P&gt;3.000000, 3.000000, 3.000000, 3.000000, ...................&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2019 09:45:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-s-cblas-saxpy-outputs-incorrect-results/m-p/1175823#M28918</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2019-11-14T09:45:22Z</dc:date>
    </item>
  </channel>
</rss>

