<?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 feast works by the default in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Extended-eigensolver-problem/m-p/1069497#M22178</link>
    <description>&lt;P&gt;feast works by the default with one-based indexing, therefore, the following modification should help. please check it.&lt;/P&gt;

&lt;P&gt;iv[0] = 1; iv[1] = 2; iv[2] = 3; iv[3] = 4;//CSR format&lt;BR /&gt;
	jv[0] = 1; jv[1] = 2; jv[2] = 3;&lt;/P&gt;

&lt;P&gt;the error code == -4 in that case is the wrong output, actually it should be -104. this issue has been already addressed and will be fixed into the nearest 11.3 update 2 version of mkl.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 12 Feb 2016 10:06:22 GMT</pubDate>
    <dc:creator>Gennady_F_Intel</dc:creator>
    <dc:date>2016-02-12T10:06:22Z</dc:date>
    <item>
      <title>Extended eigensolver problem</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Extended-eigensolver-problem/m-p/1069496#M22177</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;

&lt;P&gt;I am using MKL extended eigensolver (version 2015) for my eigenvalue problems. I tested it for a simple diagonal matrix {1, 2, 3}. However, I could not get the eigenvalues/eigenvectors using dfeast_scsrev. The returned info is "-4", seemingly to indicate that the matrix is not positive definite according to &lt;A href="https://software.intel.com/en-us/node/470388#GUID-E1DB444D-B362-4DBF-A1DF-DA68F7FB7019" target="_blank"&gt;https://software.intel.com/en-us/node/470388#GUID-E1DB444D-B362-4DBF-A1DF-DA68F7FB7019&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;I was not able to figure the issue with this simple problem. Can anyone help to take a look? The code was posted below.&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;

&lt;P&gt;Hainan&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;#include &amp;lt;mkl.h&amp;gt;&lt;/P&gt;

&lt;P&gt;bool test()&lt;BR /&gt;
	{&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;int n =3;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;char uplo = 'U';&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;int *iv, *jv;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;double *data;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;data = new double [3];&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;iv = new int [4];&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;jv = new int [3];&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;data[0] = 1; data[1] = 2; data[2] = 3;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;iv[0] = 0; iv[1] = 1; iv[2] = 2; iv[3] = 3;//CSR format&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;jv[0] = 0; jv[1] = 1; jv[2] = 2;&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;//https://software.intel.com/en-us/node/470408&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;//&amp;nbsp;&amp;nbsp; &amp;nbsp;dfeast_scsrev(const char* uplo , const MKL_INT* n , const double* sa , const MKL_INT* isa , const MKL_INT* jsa , MKL_INT* fpm , double* epsout , MKL_INT* loop ,&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;//&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;const double* emin , const double* emax , MKL_INT* m0 , double* e , double* x , MKL_INT* mode , double* res , MKL_INT* info);&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;double epsout = 0.0;&amp;nbsp;&amp;nbsp; &amp;nbsp;//On output, contains the relative error on the trace: |tracei - tracei-1| /max(|emin|, |emax|)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;MKL_INT loop = 0;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;//On output, contains the number of refinement loop executed. Ignored on input.&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;double emin = -1000;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;//The lower bounds of the interval to be searched for eigenvalues; emin &amp;lt; emax.&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;double emax = 1000;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;//The upper bounds of the interval to be searched for eigenvalues; emin &amp;lt; emax.&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;MKL_INT m0 = 3;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;//Total number of eigenvalues to be computed&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;double *eigVal = new double[m0];&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;double *eigVec = new double[m0*n];&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;MKL_INT m = m0;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;//The total number of eigenvalues found in the interval [emin, emax]: 0 &amp;lt;= m &amp;lt;= m0.&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;double *res = new double[m0];&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;MKL_INT info = 0;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;//On output, if info=0, the execution is successful. If info != 0, see Output Eigensolver info Details.&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;//https://software.intel.com/en-us/node/470388#GUID-E1DB444D-B362-4DBF-A1DF-DA68F7FB7019&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;MKL_INT fpm[128];&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;//see &lt;A href="https://software.intel.com/en-us/node/470386" target="_blank"&gt;https://software.intel.com/en-us/node/470386&lt;/A&gt;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;feastinit (fpm);&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;//Initialize Extended Eigensolver input parameters with default values. see &lt;A href="https://software.intel.com/en-us/node/521737" target="_blank"&gt;https://software.intel.com/en-us/node/521737&lt;/A&gt;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;//fpm[0] = 1;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;//Extended Eigensolver routines print runtime status to the screen.&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;fpm[3] = 6;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;//Error trace double precision stopping criteria&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;dfeast_scsrev(&amp;amp;uplo, &amp;amp;n, data, iv, jv, fpm, &amp;amp;epsout, &amp;amp;loop, &amp;amp;emin, &amp;amp;emax, &amp;amp;m0, eigVal, eigVec, &amp;amp;m, res, &amp;amp;info);&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;delete data;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;delete iv;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;delete jv;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;delete eigVal;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;delete eigVec;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;delete res;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;return true;&lt;/P&gt;

&lt;P&gt;}&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2016 00:16:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Extended-eigensolver-problem/m-p/1069496#M22177</guid>
      <dc:creator>Hainan_W_</dc:creator>
      <dc:date>2016-02-12T00:16:31Z</dc:date>
    </item>
    <item>
      <title>feast works by the default</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Extended-eigensolver-problem/m-p/1069497#M22178</link>
      <description>&lt;P&gt;feast works by the default with one-based indexing, therefore, the following modification should help. please check it.&lt;/P&gt;

&lt;P&gt;iv[0] = 1; iv[1] = 2; iv[2] = 3; iv[3] = 4;//CSR format&lt;BR /&gt;
	jv[0] = 1; jv[1] = 2; jv[2] = 3;&lt;/P&gt;

&lt;P&gt;the error code == -4 in that case is the wrong output, actually it should be -104. this issue has been already addressed and will be fixed into the nearest 11.3 update 2 version of mkl.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2016 10:06:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Extended-eigensolver-problem/m-p/1069497#M22178</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2016-02-12T10:06:22Z</dc:date>
    </item>
    <item>
      <title>Hi Gennady,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Extended-eigensolver-problem/m-p/1069498#M22179</link>
      <description>&lt;P&gt;Hi Gennady,&lt;/P&gt;

&lt;P&gt;Thank you for looking into this problem. It indeed works after changing the index as you suggested. The resulting eigenvalues and eigenvectors are also close enough to theoretical values. Then, I also tested another symmetric matrix =&lt;/P&gt;

&lt;P&gt;0 1 1&lt;/P&gt;

&lt;P&gt;1 0 1&lt;/P&gt;

&lt;P&gt;1 1 0&lt;/P&gt;

&lt;P&gt;Its eigenvalues are -1, -1, 2 and the eigenvectors are {-1, 1, 0}, {-1, 0, 1}, {1, 1, 1}&lt;/P&gt;

&lt;P&gt;(http://tutorial.math.lamar.edu/Classes/DE/LA_Eigen.aspx)&lt;/P&gt;

&lt;P&gt;The input matrix in code is:&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data[0] = 1; data[1] = 1; data[2] = 1;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;iv[0] = 1; iv[1] = 3; iv[2] = 4; iv[3] = 4;//CSR format&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;jv[0] = 2; jv[1] = 3; jv[2] = 3;&lt;/P&gt;

&lt;P&gt;Now the feast solver gave correct eigenvalues but the corresponding eigenvectors look wired:&lt;/P&gt;

&lt;P&gt;{-0.38573160677214430&lt;BR /&gt;
	-0.43035835023181784&lt;BR /&gt;
	0.81608995700396181}&lt;/P&gt;

&lt;P&gt;{-0.71963726571353026&lt;BR /&gt;
	0.69387200336403154&lt;BR /&gt;
	0.025765262349498819}&lt;/P&gt;

&lt;P&gt;{-0.57735026918962573&lt;BR /&gt;
	-0.57735026918962573&lt;BR /&gt;
	-0.57735026918962551}&lt;/P&gt;

&lt;P&gt;&amp;nbsp;
	&lt;/P&gt;&lt;P&gt;Do you have any idea what the issue is?&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;

&lt;P&gt;Hainan&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2016 20:34:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Extended-eigensolver-problem/m-p/1069498#M22179</guid>
      <dc:creator>Hainan_W_</dc:creator>
      <dc:date>2016-02-12T20:34:58Z</dc:date>
    </item>
    <item>
      <title>Hi Hainan,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Extended-eigensolver-problem/m-p/1069499#M22180</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Hainan,&lt;/P&gt;

&lt;P&gt;I&amp;nbsp;understand your concern but there is no issue here. Eigenvectors are not unique.&lt;BR /&gt;
	Firstly, eigenvectors may vary by a factor as it happened in case of eigenvalue 2:&lt;/P&gt;

&lt;P&gt;{-0.57735026918962573, -0.57735026918962573, -0.57735026918962551} = -0.577350269189625 * {1,1,1}&lt;/P&gt;

&lt;P&gt;Secondly,&amp;nbsp;if the eigenvalue has&amp;nbsp;&lt;STRONG&gt;geometric multiplicity&amp;nbsp;m&amp;nbsp;&lt;/STRONG&gt;then any m linearly independent vectors&amp;nbsp;in&amp;nbsp;an eigenspace correspondent to this eigenvalue can be chosen as eigenvectors.&amp;nbsp;In your case, the geometric multiplicity of eigenvalue 1 is 2 and both sets {&amp;nbsp;{-1, 1, 0}, {-1, 0, 1}} and{{-0.38573160677214430, -0.43035835023181784, 0.81608995700396181},{-0.71963726571353026, 0.69387200336403154,0.025765262349498819}} form a basis for the same eigenspace. It is easy to check that they are actually&amp;nbsp;eigenvectors by verifying that Ax&amp;nbsp;+ 1*x = 0.&lt;/P&gt;

&lt;P&gt;Best regards,&lt;/P&gt;

&lt;P&gt;Irina&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2016 05:08:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Extended-eigensolver-problem/m-p/1069499#M22180</guid>
      <dc:creator>Irina_S_Intel</dc:creator>
      <dc:date>2016-02-15T05:08:19Z</dc:date>
    </item>
    <item>
      <title>Hi Irina,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Extended-eigensolver-problem/m-p/1069500#M22181</link>
      <description>&lt;P&gt;Hi Irina,&lt;/P&gt;

&lt;P&gt;Thank you for the reply! You are correct. I got it.&lt;/P&gt;

&lt;P&gt;Now another question I have is: is there any way to solve for the largest couple of eigenvalues (by specifying an integer) for a matrix using mkl&amp;nbsp; eigensolver (feast)? I seems the standard way is to specify a range of eigenvalues for the eigensolver (feast). But in my problem, I am most interested in eigenvalues with large magnitude (positive definite matrix). Moreover, it is hard to guess the range or magnitude of my eigenvalues. Therefore, specifying a range is inconvenient for me. Is there a better way to use eigensolver for my problem?&lt;/P&gt;

&lt;P&gt;Thanks again!&lt;/P&gt;

&lt;P&gt;Hainan&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Irina S. (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Hi&amp;nbsp;Hainan,&lt;/P&gt;

&lt;P&gt;I&amp;nbsp;understand your concern but there is no issue here. Eigenvectors are not unique.&lt;BR /&gt;
	Firstly, eigenvectors may vary by a factor as it happened in case of eigenvalue 2:&lt;/P&gt;

&lt;P&gt;{-0.57735026918962573, -0.57735026918962573, -0.57735026918962551} = -0.577350269189625 * {1,1,1}&lt;/P&gt;

&lt;P&gt;Secondly,&amp;nbsp;if the eigenvalue has&amp;nbsp;&lt;STRONG&gt;geometric multiplicity&amp;nbsp;m&amp;nbsp;&lt;/STRONG&gt;then any m linearly independent vectors&amp;nbsp;in&amp;nbsp;an eigenspace correspondent to this eigenvalue can be chosen as eigenvectors.&amp;nbsp;In your case, the geometric multiplicity of eigenvalue 1 is 2 and both sets {&amp;nbsp;{-1, 1, 0}, {-1, 0, 1}} and{{-0.38573160677214430, -0.43035835023181784, 0.81608995700396181},{-0.71963726571353026, 0.69387200336403154,0.025765262349498819}} form a basis for the same eigenspace. It is easy to check that they are actually&amp;nbsp;eigenvectors by verifying that Ax&amp;nbsp;+ 1*x = 0.&lt;/P&gt;

&lt;P&gt;Best regards,&lt;/P&gt;

&lt;P&gt;Irina&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Feb 2016 06:41:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Extended-eigensolver-problem/m-p/1069500#M22181</guid>
      <dc:creator>Hainan_W_</dc:creator>
      <dc:date>2016-02-16T06:41:00Z</dc:date>
    </item>
    <item>
      <title>Hi Hainan,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Extended-eigensolver-problem/m-p/1069501#M22182</link>
      <description>&lt;P&gt;Hi Hainan,&lt;/P&gt;

&lt;P&gt;At the moment Extended Eigensolver doesn't support this operation. However, there are two ways how&amp;nbsp;you can find k max or min eigenvalues using MKL functionality. First is to convert your matrix to dense storage format and use Lapack routines (&lt;A href="https://software.intel.com/en-us/node/521045#E20540C0-34FD-4CD2-B803-B6096460B4F2"&gt;https://software.intel.com/en-us/node/521045#E20540C0-34FD-4CD2-B803-B6096460B4F2&lt;/A&gt;). Second is to run mkl eigensolver feast on sufficiently large interval that for sure covers the largest eigenvalue. Algorithm will return info = &lt;SPAN style="font: 13px/14.56px Arial, Tahoma, Helvetica, sans-serif; text-align: left; color: rgb(102, 102, 102); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; float: none; display: inline !important; white-space: normal; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: rgb(242, 242, 242); -webkit-text-stroke-width: 0px;"&gt;3&lt;/SPAN&gt;&amp;nbsp;if this interval contains more than requested number of eigenvalues. Thus you can iteratively&amp;nbsp;move left edge of an interval until it contains exactly k largest eigenvalues.&lt;/P&gt;

&lt;P&gt;Best regards,&lt;/P&gt;

&lt;P&gt;Irina&lt;/P&gt;</description>
      <pubDate>Tue, 16 Feb 2016 10:18:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Extended-eigensolver-problem/m-p/1069501#M22182</guid>
      <dc:creator>Irina_S_Intel</dc:creator>
      <dc:date>2016-02-16T10:18:57Z</dc:date>
    </item>
  </channel>
</rss>

