<?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: sgetrf corrupts the stack? in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/sgetrf-corrupts-the-stack/m-p/865780#M7959</link>
    <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/334681"&gt;Gennady Fedorov (Intel)&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;&lt;BR /&gt;
&lt;P&gt;Olof,&lt;BR /&gt;At the first glance, the cause of the problem dealt with ipiv: &lt;BR /&gt;please look at description of sgetrf: Ipiv == array, dimensional at least max(1,min(m.n)) and etc.&lt;BR /&gt;Therefore, replace int ipiv by int ipiv&lt;N&gt; and try again.&lt;BR /&gt;Please let us know if any further problems.&lt;BR /&gt;--Gennady&lt;/N&gt;&lt;/P&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;Thank you! The stack is now safe and sound=)&lt;BR /&gt;</description>
    <pubDate>Fri, 16 Jan 2009 07:31:55 GMT</pubDate>
    <dc:creator>sugarpie</dc:creator>
    <dc:date>2009-01-16T07:31:55Z</dc:date>
    <item>
      <title>sgetrf corrupts the stack?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/sgetrf-corrupts-the-stack/m-p/865778#M7957</link>
      <description>I'm having some issues with sgetrf , when invoked Foo (see code below) I get an exception upon completing the method call to Foo:&lt;BR /&gt;&lt;BR /&gt;Run-Time Check Failure #2 - Stack around the variable 'ipiv' was corrupted.&lt;BR /&gt;&lt;BR /&gt;The exception is thrown when the method returns, that is after the delete [] wpi call. If the call to sgetrf is removed the method executes and returns without corrupting the stack.&lt;BR /&gt;&lt;BR /&gt;I'm using MKL 10.1.0.018 and Visual Studio 2008.&lt;BR /&gt;&lt;BR /&gt;int _tmain(int argc, char *argv[])&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;const int M = 5;&lt;BR /&gt;const int K = 4;&lt;BR /&gt;const int N = 3;&lt;BR /&gt;&lt;BR /&gt;float* p = new float[K*N];&lt;BR /&gt;float* w = new float[K*N];&lt;BR /&gt;float* wp = new float[K*N];&lt;BR /&gt;&lt;BR /&gt;memset((void*)wp,0,(size_t)K*N*sizeof(float));&lt;BR /&gt;// ...&lt;BR /&gt;Foo(p,w,wp,N,N,K);&lt;BR /&gt;// ...&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;void Foo(const float* p,float* w,float* wp,int M,int N,int K){&lt;BR /&gt;int ipiv = 0;&lt;BR /&gt;int info = 0;&lt;BR /&gt;float work = 0;&lt;BR /&gt;int lwork = 0;&lt;BR /&gt;float* wpi = new float[N*N];&lt;BR /&gt;&lt;BR /&gt;memset((void*)wpi,0,(size_t)N*N*sizeof(float));&lt;BR /&gt;&lt;BR /&gt;cblas_sgemm(CblasRowMajor,CblasTrans,CblasNoTrans,N,N,K,1.0f,p,M,w,N,1.0f,wpi,N);&lt;BR /&gt;// if this called is removed, the stack does not become corrupt&lt;BR /&gt;sgetrf(&amp;amp;N,&amp;amp;N,wpi,&amp;amp;N,&amp;amp;ipiv,&amp;amp;info);&lt;BR /&gt;// ...&lt;BR /&gt;delete [] wpi;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Thanks in advance!&lt;BR /&gt;// olof&lt;BR /&gt;</description>
      <pubDate>Thu, 15 Jan 2009 15:49:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/sgetrf-corrupts-the-stack/m-p/865778#M7957</guid>
      <dc:creator>sugarpie</dc:creator>
      <dc:date>2009-01-15T15:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: sgetrf corrupts the stack?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/sgetrf-corrupts-the-stack/m-p/865779#M7958</link>
      <description>&lt;BR /&gt;
&lt;P&gt;Olof,&lt;BR /&gt;At the first glance, the cause of the problem dealt with ipiv: &lt;BR /&gt;please look at description of sgetrf: Ipiv == array, dimensional at least max(1,min(m.n)) and etc.&lt;BR /&gt;Therefore, replace int ipiv by int ipiv&lt;N&gt; and try again.&lt;BR /&gt;Please let us know if any further problems.&lt;BR /&gt;--Gennady&lt;/N&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jan 2009 19:55:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/sgetrf-corrupts-the-stack/m-p/865779#M7958</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2009-01-15T19:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: sgetrf corrupts the stack?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/sgetrf-corrupts-the-stack/m-p/865780#M7959</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/334681"&gt;Gennady Fedorov (Intel)&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;&lt;BR /&gt;
&lt;P&gt;Olof,&lt;BR /&gt;At the first glance, the cause of the problem dealt with ipiv: &lt;BR /&gt;please look at description of sgetrf: Ipiv == array, dimensional at least max(1,min(m.n)) and etc.&lt;BR /&gt;Therefore, replace int ipiv by int ipiv&lt;N&gt; and try again.&lt;BR /&gt;Please let us know if any further problems.&lt;BR /&gt;--Gennady&lt;/N&gt;&lt;/P&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;Thank you! The stack is now safe and sound=)&lt;BR /&gt;</description>
      <pubDate>Fri, 16 Jan 2009 07:31:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/sgetrf-corrupts-the-stack/m-p/865780#M7959</guid>
      <dc:creator>sugarpie</dc:creator>
      <dc:date>2009-01-16T07:31:55Z</dc:date>
    </item>
  </channel>
</rss>

