<?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 Hello,  in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/About-linear-solver-dgetrs/m-p/920823#M12952</link>
    <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;dgetrs solver the &amp;nbsp;LU-factored square matrix. It needs first call dgetrf to factor the matrix, then call the function.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
	Chao&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Nov 2013 01:17:35 GMT</pubDate>
    <dc:creator>Chao_Y_Intel</dc:creator>
    <dc:date>2013-11-27T01:17:35Z</dc:date>
    <item>
      <title>About linear solver dgetrs</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/About-linear-solver-dgetrs/m-p/920822#M12951</link>
      <description>&lt;P&gt;Dear MKL developers and users,&lt;/P&gt;

&lt;P&gt;I am learning and coding with MKL&amp;nbsp;linear solver. I went to some tutorials online such as the tutorials for&amp;nbsp;eigensolvers. I am using MSVS 2010 and intel cluster studio. So I think using MKL linear solver dgetrs in a c++ program would like this:&lt;/P&gt;

&lt;P&gt;[cpp]&lt;/P&gt;

&lt;P&gt;#include &amp;lt;mkl.h&amp;gt;&lt;BR /&gt;
	#include &amp;lt;iostream&amp;gt;&lt;/P&gt;

&lt;P&gt;int _tmain(int argc, _TCHAR* argv[])&lt;BR /&gt;
	{&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;char trans='N';&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int n = 3, nrhs = 1, lda = 3, info = 0, ldb = 3;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int *ipiv = new int[3]();&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;double a[] = {1.,0.,0.,0.,1.,0.,0.,0.,1.};&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;double b[] = {3.,4.,5.};&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;dgetrs( &amp;amp;trans, &amp;amp;n, &amp;amp;nrhs, a, &amp;amp;lda, ipiv, b, &amp;amp;ldb, &amp;amp;info );&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;std::cout &amp;lt;&amp;lt; b[0] &amp;lt;&amp;lt; " " &amp;lt;&amp;lt; b[1] &amp;lt;&amp;lt; " " &amp;lt;&amp;lt; b[2] &amp;lt;&amp;lt; " " &amp;lt;&amp;lt; b[3] &amp;lt;&amp;lt; std::endl;&lt;/P&gt;

&lt;P&gt;}&lt;/P&gt;

&lt;P&gt;[/cpp]&lt;/P&gt;

&lt;P&gt;But the linear solver doesn't work correctly. Since matrix "a" is&amp;nbsp;&lt;SPAN dir="auto"&gt;Identity matrix (row/column major doesn't matter here), I should be able to get 3, 4, 5 as the solution. However, I got two errors:&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN dir="auto"&gt;1. After executed, the numbers in b are&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;[0]&amp;nbsp;&amp;nbsp; &amp;nbsp;-9.2559631349317831e+061&amp;nbsp;&amp;nbsp; &amp;nbsp;double&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;[1]&amp;nbsp;&amp;nbsp; &amp;nbsp;3.0000000000000000&amp;nbsp;&amp;nbsp; &amp;nbsp;double&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;[2]&amp;nbsp;&amp;nbsp; &amp;nbsp;4.0000000000000000&amp;nbsp;&amp;nbsp; &amp;nbsp;double&lt;/P&gt;

&lt;P&gt;2. On exit, there is a run-time error:&amp;nbsp;Run-Time Check Failure #2 - Stack around the variable 'b' was corrupted.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;How do I fix these errors?&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2013 00:39:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/About-linear-solver-dgetrs/m-p/920822#M12951</guid>
      <dc:creator>FortCpp</dc:creator>
      <dc:date>2013-11-27T00:39:56Z</dc:date>
    </item>
    <item>
      <title>Hello, </title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/About-linear-solver-dgetrs/m-p/920823#M12952</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;dgetrs solver the &amp;nbsp;LU-factored square matrix. It needs first call dgetrf to factor the matrix, then call the function.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
	Chao&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2013 01:17:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/About-linear-solver-dgetrs/m-p/920823#M12952</guid>
      <dc:creator>Chao_Y_Intel</dc:creator>
      <dc:date>2013-11-27T01:17:35Z</dc:date>
    </item>
    <item>
      <title>Hi Chao,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/About-linear-solver-dgetrs/m-p/920824#M12953</link>
      <description>&lt;P&gt;Hi Chao,&lt;/P&gt;

&lt;P&gt;Thanks for the response, dgetrs&amp;nbsp;solved both of them.&lt;/P&gt;

&lt;P&gt;Two more questions: 1. does&amp;nbsp;dsytry and dsytrs work in the same way (dsytry goes before dsytrs.)? Does dsytrs take an upper/lower triangle matrix as input or a full matrix? (I tried a bit. But I still cannot make it right.)&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2013 01:45:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/About-linear-solver-dgetrs/m-p/920824#M12953</guid>
      <dc:creator>FortCpp</dc:creator>
      <dc:date>2013-11-27T01:45:00Z</dc:date>
    </item>
    <item>
      <title>Hello,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/About-linear-solver-dgetrs/m-p/920825#M12954</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;dsytrf and dsytrs work in the same way: dsytrf goes before dsytrs.&lt;/P&gt;

&lt;P&gt;dsytrf/dsytrs take ither the upper or the lower triangular part of the matrix A, depends on the 'uplo' settings, not the full matrix.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
	Chao&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2013 08:50:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/About-linear-solver-dgetrs/m-p/920825#M12954</guid>
      <dc:creator>Chao_Y_Intel</dc:creator>
      <dc:date>2013-11-27T08:50:50Z</dc:date>
    </item>
    <item>
      <title>Thanks Chao. I'll try it.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/About-linear-solver-dgetrs/m-p/920826#M12955</link>
      <description>&lt;P&gt;Thanks Chao. I'll try it.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Nov 2013 00:30:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/About-linear-solver-dgetrs/m-p/920826#M12955</guid>
      <dc:creator>FortCpp</dc:creator>
      <dc:date>2013-11-28T00:30:15Z</dc:date>
    </item>
  </channel>
</rss>

