<?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 Extended Eigensolver Routines: Strange eigenvectors in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Extended-Eigensolver-Routines-Strange-eigenvectors/m-p/1005219#M18832</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am currently trying to solve the eigenproblem &lt;STRONG&gt;Av&lt;/STRONG&gt; = λ&lt;STRONG&gt;v&lt;/STRONG&gt; where A is a complex hermitian matrix using the MKL feast implementation. For testing purposes I constructed the following example (using C++):&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;#include &amp;lt;mkl.h&amp;gt;
#include &amp;lt;iostream&amp;gt;
#include &amp;lt;vector&amp;gt;
#include &amp;lt;complex&amp;gt;

int main() {
	using namespace std;

	int fpm[128]{ };
	::feastinit(fpm);
	
/* A = 
0	2-i	1
2+i	0	0
1	0	0
*/

	vector&amp;lt;complex&amp;lt;double&amp;gt;&amp;gt; entries = { complex&amp;lt;double&amp;gt;(2, -1), 1, complex&amp;lt;double&amp;gt;(2, +1), 1 };
	vector&amp;lt;int&amp;gt; cols = { 2, 3, 1, 1 };
	vector&amp;lt;int&amp;gt; rows = { 1, 3, 4, 5 };

	char uplo = 'F';
	double eps = 0;
	int loop = 0;
	double emin = -4;
	double emax = 4;
	int m0 = 3;
	vector&amp;lt;complex&amp;lt;double&amp;gt;&amp;gt; eigenvectors(m0 * m0);
	vector&amp;lt;double&amp;gt; eigenvalues(m0);
	vector&amp;lt;double&amp;gt; res(m0);
	int mode = 0;
	int info = 0;
	
	zfeast_hcsrev(&amp;amp;uplo, &amp;amp;m0, reinterpret_cast&amp;lt;MKL_Complex16*&amp;gt;(&amp;amp;entries[0]), &amp;amp;rows[0], &amp;amp;cols[0],
				  fpm, &amp;amp;eps, &amp;amp;loop, &amp;amp;emin, &amp;amp;emax, &amp;amp;m0, &amp;amp;eigenvalues[0], reinterpret_cast&amp;lt;MKL_Complex16*&amp;gt;(&amp;amp;eigenvectors[0]), &amp;amp;mode, &amp;amp;res[0], &amp;amp;info);

}&lt;/PRE&gt;

&lt;P&gt;The eigenvalues of the matrix are 0 and ±square root 6 ≈ ±2.44948.&lt;/P&gt;

&lt;P&gt;MKL produces this exact eigenvalues. However, the eigenvectos are strange. For example, the corresponding eigenvector for +sqrt(6) is (already normalized):&lt;/P&gt;

&lt;P&gt;1/sqrt(2), 1/sqrt(2) + i/(2*sqrt(3)), 1/(2*sqrt(3))&lt;/P&gt;

&lt;P&gt;or alternatively&lt;/P&gt;

&lt;P&gt;0.707106, 0.577350 + i*0.28867, 0.28867&lt;/P&gt;

&lt;P&gt;However, MKL produces:&lt;/P&gt;

&lt;P&gt;0.48890728596802574+i*0.51085190195141617&lt;BR /&gt;
	0.19063671173166902+i*0.61670439499553087&lt;BR /&gt;
	0.19959556369177356+i*0.20855441565187854&lt;/P&gt;

&lt;P&gt;What's the matter with these? What am I doing wrong?&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Sat, 29 Nov 2014 12:55:31 GMT</pubDate>
    <dc:creator>Not_Y_</dc:creator>
    <dc:date>2014-11-29T12:55:31Z</dc:date>
    <item>
      <title>Extended Eigensolver Routines: Strange eigenvectors</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Extended-Eigensolver-Routines-Strange-eigenvectors/m-p/1005219#M18832</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am currently trying to solve the eigenproblem &lt;STRONG&gt;Av&lt;/STRONG&gt; = λ&lt;STRONG&gt;v&lt;/STRONG&gt; where A is a complex hermitian matrix using the MKL feast implementation. For testing purposes I constructed the following example (using C++):&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;#include &amp;lt;mkl.h&amp;gt;
#include &amp;lt;iostream&amp;gt;
#include &amp;lt;vector&amp;gt;
#include &amp;lt;complex&amp;gt;

int main() {
	using namespace std;

	int fpm[128]{ };
	::feastinit(fpm);
	
/* A = 
0	2-i	1
2+i	0	0
1	0	0
*/

	vector&amp;lt;complex&amp;lt;double&amp;gt;&amp;gt; entries = { complex&amp;lt;double&amp;gt;(2, -1), 1, complex&amp;lt;double&amp;gt;(2, +1), 1 };
	vector&amp;lt;int&amp;gt; cols = { 2, 3, 1, 1 };
	vector&amp;lt;int&amp;gt; rows = { 1, 3, 4, 5 };

	char uplo = 'F';
	double eps = 0;
	int loop = 0;
	double emin = -4;
	double emax = 4;
	int m0 = 3;
	vector&amp;lt;complex&amp;lt;double&amp;gt;&amp;gt; eigenvectors(m0 * m0);
	vector&amp;lt;double&amp;gt; eigenvalues(m0);
	vector&amp;lt;double&amp;gt; res(m0);
	int mode = 0;
	int info = 0;
	
	zfeast_hcsrev(&amp;amp;uplo, &amp;amp;m0, reinterpret_cast&amp;lt;MKL_Complex16*&amp;gt;(&amp;amp;entries[0]), &amp;amp;rows[0], &amp;amp;cols[0],
				  fpm, &amp;amp;eps, &amp;amp;loop, &amp;amp;emin, &amp;amp;emax, &amp;amp;m0, &amp;amp;eigenvalues[0], reinterpret_cast&amp;lt;MKL_Complex16*&amp;gt;(&amp;amp;eigenvectors[0]), &amp;amp;mode, &amp;amp;res[0], &amp;amp;info);

}&lt;/PRE&gt;

&lt;P&gt;The eigenvalues of the matrix are 0 and ±square root 6 ≈ ±2.44948.&lt;/P&gt;

&lt;P&gt;MKL produces this exact eigenvalues. However, the eigenvectos are strange. For example, the corresponding eigenvector for +sqrt(6) is (already normalized):&lt;/P&gt;

&lt;P&gt;1/sqrt(2), 1/sqrt(2) + i/(2*sqrt(3)), 1/(2*sqrt(3))&lt;/P&gt;

&lt;P&gt;or alternatively&lt;/P&gt;

&lt;P&gt;0.707106, 0.577350 + i*0.28867, 0.28867&lt;/P&gt;

&lt;P&gt;However, MKL produces:&lt;/P&gt;

&lt;P&gt;0.48890728596802574+i*0.51085190195141617&lt;BR /&gt;
	0.19063671173166902+i*0.61670439499553087&lt;BR /&gt;
	0.19959556369177356+i*0.20855441565187854&lt;/P&gt;

&lt;P&gt;What's the matter with these? What am I doing wrong?&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Sat, 29 Nov 2014 12:55:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Extended-Eigensolver-Routines-Strange-eigenvectors/m-p/1005219#M18832</guid>
      <dc:creator>Not_Y_</dc:creator>
      <dc:date>2014-11-29T12:55:31Z</dc:date>
    </item>
  </channel>
</rss>

