<?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 The thing that make in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Unitialized-issue-in-cblas-dsyrk/m-p/1027603#M19978</link>
    <description>&lt;P&gt;The thing that make suspicious is that I have TONS of MKL call with many different matrix sizes. But this is the only one where valgrind complains.&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;My exprience if your run valgrind on code compiled with -g options you get less false positives.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Dec 2014 15:15:06 GMT</pubDate>
    <dc:creator>EAnde4</dc:creator>
    <dc:date>2014-12-18T15:15:06Z</dc:date>
    <item>
      <title>Unitialized issue in cblas_dsyrk</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Unitialized-issue-in-cblas-dsyrk/m-p/1027597#M19972</link>
      <description>&lt;P&gt;I have created a very small test program that illustrates an an issue in syrk. In fact when I run valgrind on my program I get.&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;==44033==&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;==44033== Conditional jump or move depends on uninitialised value(s)&lt;BR /&gt;
	==44033== &amp;nbsp; &amp;nbsp;at 0x401CFD: main (testsyrk.c:40)&lt;BR /&gt;
	==44033==&lt;BR /&gt;
	Check 990&lt;BR /&gt;
	==44033==&lt;BR /&gt;
	==44033== HEAP SUMMARY:&lt;BR /&gt;
	==44033== &amp;nbsp; &amp;nbsp; in use at exit: 39,184 bytes in 4 blocks&lt;BR /&gt;
	==44033== &amp;nbsp; total heap usage: 4 allocs, 0 frees, 39,184 bytes allocated&lt;/P&gt;

&lt;P&gt;My program is so simple and I will claim the uninitialised value comes from cblas_dsyrk.&lt;/P&gt;

&lt;P&gt;The follow instructions reproduce the issue:&lt;/P&gt;

&lt;P&gt;icc -g -o testsyrk testsyrk.c -I$MKLROOT/include &amp;nbsp;-Wl,--start-group $MKLROOT/lib/intel64/libmkl_intel_lp64.a $MKLROOT/lib/intel64/libmkl_core.a $MKLROOT/lib/intel64/libmkl_sequential.a -Wl,--end-group -lpthread -lm&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;valgrind ./testsyrk&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I use the latest Intel 15.0.1.&lt;/P&gt;

&lt;P&gt;Here is my program&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;stdlib.h&amp;gt;

#include "mkl_cblas.h"
#include "mkl_lapack.h"

int main()
{
  double *source,*target;
  int    i,j,
         z=0,
         d=44,w=14;

  source = calloc(d*w,sizeof(double));
  target = calloc(d*d,sizeof(double));

  for(j=0; j&amp;lt;w; ++j)
    for(i=0; i&amp;lt;d; ++i)
      source[d*j+i] = 1.0;

  for(j=0; j&amp;lt;d; ++j)
    for(i=0; i&amp;lt;=j; ++i)
      if ( target[j*d+i]&amp;gt;0.0 )
        z += 1;
 
  cblas_dsyrk(CblasColMajor,
              CblasUpper,
              CblasNoTrans,
              d,w,
              1.0,source,d,
              0.0,target,d);

  for(j=0; j&amp;lt;d; ++j)
    for(i=0; i&amp;lt;=j; ++i)
    {
      #if 0
      fprintf(stderr,"%d %d\n",i,j);
      #endif

      if ( target[j*d+i]&amp;gt;0.0 )
        z += 1;
    }
 
  printf("Check %d\n",z);

  return ( 0 );
}
&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Dec 2014 19:20:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Unitialized-issue-in-cblas-dsyrk/m-p/1027597#M19972</guid>
      <dc:creator>EAnde4</dc:creator>
      <dc:date>2014-12-17T19:20:43Z</dc:date>
    </item>
    <item>
      <title>mosek,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Unitialized-issue-in-cblas-dsyrk/m-p/1027598#M19973</link>
      <description>&lt;P&gt;mosek,&lt;/P&gt;

&lt;P&gt;before we will check the problem on our side - a couple of questions:&lt;/P&gt;

&lt;P&gt;Have you seen the run-time problem with&amp;nbsp;&lt;SPAN style="font-size: 12px; line-height: 14.3999996185303px;"&gt;cblas_dsyrk? &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 14.3999996185303px;"&gt;and the second one -- have you tried Intel(R) Inspector tool for check this problem? &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 14.3999996185303px;"&gt;Personally, I met several cases when valgrind reported the false positives....&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 14.3999996185303px;"&gt;--Gennady&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Dec 2014 05:15:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Unitialized-issue-in-cblas-dsyrk/m-p/1027598#M19973</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2014-12-18T05:15:38Z</dc:date>
    </item>
    <item>
      <title>I do not own Inspector for</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Unitialized-issue-in-cblas-dsyrk/m-p/1027599#M19974</link>
      <description>&lt;P&gt;I do not own Inspector for Linux.&lt;/P&gt;

&lt;P&gt;No. Run time does not seem to be affected. But as you know that might be pure luck. We suspect you add an unitialized (lucky) zero to the output. I&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;n any case my customers complains if they find valgrind issues with our software. They simply loose confidence in it.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Otherwise I agree valgrind is not perfect but that is usually when we use the optimized memset etc. from Intel C.&lt;/P&gt;

&lt;P&gt;So I do&lt;/P&gt;

&lt;P&gt;WW' = U&lt;/P&gt;

&lt;P&gt;of course where U has 44 rows and W has 14 columns. Using printf+valgrind &amp;nbsp;it seems the error is at row 0 position 30. Maybe that is a border case for the internal partitioning.&lt;/P&gt;

&lt;P&gt;Btw I spend a whole day working on locating this and then creating the small example. Maybe this tells a bit about the importance about this for us.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Dec 2014 06:13:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Unitialized-issue-in-cblas-dsyrk/m-p/1027599#M19974</guid>
      <dc:creator>EAnde4</dc:creator>
      <dc:date>2014-12-18T06:13:36Z</dc:date>
    </item>
    <item>
      <title>I concur with Gennady's</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Unitialized-issue-in-cblas-dsyrk/m-p/1027600#M19975</link>
      <description>&lt;P&gt;I concur with Gennady's comment that Valgrind produces lots of false positives w.r.t. uninitialized values when applied to programs compiled with the Intel compilers.&lt;/P&gt;

&lt;P&gt;There may be a problem with MKL-CBLAS-dsyrk in your application, but the example code does not display any problem other than the shortcoming of Valgrind.&lt;/P&gt;

&lt;P&gt;I tested the program by (i) dumping the "target" matrix to a file using fwrite, (ii) recompiling the test program with gcc and libgslcblas, and (iii) comparing the dump files from (i) and (ii). The files were identical.&lt;/P&gt;

&lt;P&gt;I also tested the same program (compiled with icc -mkl -g) with the Intel Inspector. Other than a small memory leak (variable allocated within MKL but not freed), there were no errors -- in particular, no uninitialized variables were detected. A similar message was given by Inspector when applied to the Gcc-compiled version.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Dec 2014 14:09:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Unitialized-issue-in-cblas-dsyrk/m-p/1027600#M19975</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2014-12-18T14:09:00Z</dc:date>
    </item>
    <item>
      <title>I agree it produces the</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Unitialized-issue-in-cblas-dsyrk/m-p/1027601#M19976</link>
      <description>&lt;P&gt;I agree it produces the correct result. But I still wish valgrind would not complain about it.&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;I guess I have more faith or less&amp;nbsp;&lt;/SPAN&gt;experience&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;&amp;nbsp;in valgrind than you guys.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Dec 2014 14:18:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Unitialized-issue-in-cblas-dsyrk/m-p/1027601#M19976</guid>
      <dc:creator>EAnde4</dc:creator>
      <dc:date>2014-12-18T14:18:18Z</dc:date>
    </item>
    <item>
      <title>I wish that Valgrind would</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Unitialized-issue-in-cblas-dsyrk/m-p/1027602#M19977</link>
      <description>&lt;P&gt;I wish that Valgrind would work nicely with programs built with the Intel compilers, too. Are you aware that Valgrind has a provision for "suppresion list"s?&amp;nbsp;&lt;/P&gt;

&lt;P&gt;With complicated projects I sometimes use a different compiler to catch program errors and switch back to Intel for production runs.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Dec 2014 14:29:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Unitialized-issue-in-cblas-dsyrk/m-p/1027602#M19977</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2014-12-18T14:29:35Z</dc:date>
    </item>
    <item>
      <title>The thing that make</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Unitialized-issue-in-cblas-dsyrk/m-p/1027603#M19978</link>
      <description>&lt;P&gt;The thing that make suspicious is that I have TONS of MKL call with many different matrix sizes. But this is the only one where valgrind complains.&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;My exprience if your run valgrind on code compiled with -g options you get less false positives.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Dec 2014 15:15:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Unitialized-issue-in-cblas-dsyrk/m-p/1027603#M19978</guid>
      <dc:creator>EAnde4</dc:creator>
      <dc:date>2014-12-18T15:15:06Z</dc:date>
    </item>
    <item>
      <title>Quote:mosekmosek.com wrote:My</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Unitialized-issue-in-cblas-dsyrk/m-p/1027604#M19979</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;mosekmosek.com wrote:&lt;BR /&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;My exprience if your run valgrind on code compiled with -g options you get less false positives.&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Not only is this well-known but it is also understandable. Unfortunately, if the compiler optimization phase has bugs, this property of Valgrind makes it less useful for pinpointing those bugs. In such circumstances I have found myself wondering whether I am debugging my code, the compiler, Valgrind or the MKL library!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Dec 2014 15:57:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Unitialized-issue-in-cblas-dsyrk/m-p/1027604#M19979</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2014-12-18T15:57:00Z</dc:date>
    </item>
  </channel>
</rss>

