<?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 pls, set                  in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Memory-error-in-complex-eigensolver/m-p/981387#M17474</link>
    <description>&lt;P&gt;pls&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;, set &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;double * lambda = new double&lt;N&gt;;&lt;/N&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;instead of &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;double * lambda = new double&lt;M&gt;;&lt;/M&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;see from documentation for &amp;nbsp;&lt;SPAN class="kwd" style="font-family: 'Courier New', Courier, monospace; color: rgb(51, 51, 51); font-size: 13.600000381469727px; line-height: 20px;"&gt;dstebz&lt;/SPAN&gt;&lt;SPAN class="delim" style="font-family: 'Courier New', Courier, monospace; color: rgb(51, 51, 51); font-size: 13.600000381469727px; line-height: 20px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;DL&gt;
	&lt;DT class="dlterm" style="margin-left: 0em; margin-top: 0em; margin-bottom: 0em; width: 100px; color: rgb(51, 51, 51); font-family: Verdana, Arial, sans-serif; font-size: 13.600000381469727px; font-weight: normal; line-height: normal;"&gt;&lt;SPAN class="parmname" style="font-style: italic; font-family: 'Courier New', Courier, monospace;"&gt;w&lt;/SPAN&gt;&lt;/DT&gt;
	&lt;DD style="font-size: 13.600000381469727px; margin-left: 0px; position: relative; top: -13pt; left: 110px; width: 704.75px; line-height: 14pt; margin-top: 0em; margin-bottom: -10pt; color: rgb(51, 51, 51); font-family: Verdana, Arial, sans-serif;"&gt;
		&lt;P style="font-size: inherit; line-height: 20px; margin-top: 0em; margin-bottom: 0em;"&gt;&lt;SPAN class="keyword" style="font-family: 'Courier New', Courier, monospace;"&gt;REAL&lt;/SPAN&gt;&amp;nbsp;for&amp;nbsp;&lt;SPAN class="option" style="font-family: 'Courier New', Courier, monospace;"&gt;sstebz&lt;/SPAN&gt;&lt;/P&gt;

		&lt;P style="font-size: inherit; line-height: 20px; margin-top: 0em; margin-bottom: 0em;"&gt;&lt;SPAN class="keyword" style="font-family: 'Courier New', Courier, monospace;"&gt;DOUBLE PRECISION&lt;/SPAN&gt;&amp;nbsp;for&amp;nbsp;&lt;SPAN class="option" style="font-family: 'Courier New', Courier, monospace;"&gt;dstebz&lt;/SPAN&gt;.&lt;/P&gt;

		&lt;P style="font-size: inherit; line-height: 20px; margin-top: 0em; margin-bottom: 0em;"&gt;Array,&amp;nbsp;&lt;SPAN class="keyword" style="font-family: 'Courier New', Courier, monospace;"&gt;DIMENSION&lt;/SPAN&gt;&amp;nbsp;&lt;STRONG&gt;at least max(1,&amp;nbsp;&lt;VAR&gt;n&lt;/VAR&gt;)&lt;/STRONG&gt;. The computed eigenvalues, stored in&amp;nbsp;&lt;SAMP class="codeph" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;VAR&gt;w&lt;/VAR&gt;(1)&lt;/SAMP&gt;&amp;nbsp;to&amp;nbsp;&lt;VAR&gt;w&lt;/VAR&gt;(&lt;VAR&gt;m&lt;/VAR&gt;).&lt;/P&gt;
	&lt;/DD&gt;
&lt;/DL&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;here is output of your example after this correction:&lt;/P&gt;

&lt;P&gt;ALL DONE&lt;/P&gt;

&lt;P&gt;Cleanup&lt;BR /&gt;
	Return&lt;/P&gt;

&lt;P&gt;***************************************&lt;BR /&gt;
	* &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Eigenvalues report &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; *&lt;BR /&gt;
	***************************************&lt;BR /&gt;
	0 &amp;nbsp; &amp;nbsp; &amp;nbsp; -2.70582&lt;BR /&gt;
	583 &amp;nbsp; &amp;nbsp; 0&lt;BR /&gt;
	Press any key to continue . . .&lt;/P&gt;

&lt;P&gt;regards, Gennady&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 28 Nov 2013 05:28:00 GMT</pubDate>
    <dc:creator>Gennady_F_Intel</dc:creator>
    <dc:date>2013-11-28T05:28:00Z</dc:date>
    <item>
      <title>Memory error in complex eigensolver (</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Memory-error-in-complex-eigensolver/m-p/981384#M17471</link>
      <description>&lt;P&gt;SUMMARY:&lt;/P&gt;
&lt;P&gt;===================&lt;/P&gt;
&lt;P&gt;Deleting objects after successful calls to lapack_zhptrd, lapack_dstebz, lapack_zstein, and lapack_upmtr crashes with an error in free().&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;DESCRIPTION&lt;/P&gt;
&lt;P&gt;============================&lt;/P&gt;
&lt;P&gt;I'm writing an eigenvalue equation solver for complex hermitian matrices. Code is attached. It uses the sequence&amp;nbsp;lapack_zhptrd, lapack_dstebz, lapack_zstein, and lapack_upmtr to&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) generate the symmetric matrix T = Q^H A Q, with a unitary matrix Q. (lapack_zhptrd)&lt;/P&gt;
&lt;P&gt;2.) Get m smallest eigenvalues for T (lapack_dstebz)&lt;/P&gt;
&lt;P&gt;3.) Get m corresponding eigenvectors VT for T (lapack_zstein)&lt;/P&gt;
&lt;P&gt;4.) Apply Q VT to get the m eigenvectors for A&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Using the code below, it runs for dim(A) = N = 2000, M = 583 eigenvalues. increasing M to 584 results in a segfault. i tracked it down to the point where&amp;nbsp;the temporary array tau gets cleaned up. this throws an exception in malloc.c as far as i understand.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Can anyone help?&lt;/P&gt;
&lt;P&gt;CODE:&lt;/P&gt;
&lt;P&gt;===================&lt;/P&gt;
&lt;P&gt;file eigensolver.cpp&lt;/P&gt;
&lt;P&gt;#include &amp;lt;iostream&amp;gt;&lt;BR /&gt;#include &amp;lt;cmath&amp;gt;&lt;BR /&gt;#include &amp;lt;complex&amp;gt;&lt;BR /&gt;#include "mkl_lapacke.h"&lt;BR /&gt;//&lt;BR /&gt;int eigensystem(MKL_Complex16 * A, double* lambda, MKL_Complex16* B, MKL_INT n, MKL_INT m);&lt;BR /&gt;//&lt;BR /&gt;int main() {&lt;/P&gt;
&lt;P&gt;// Dimension&lt;BR /&gt; MKL_INT N = 2000;&lt;BR /&gt; // Number of solutions sought.&lt;BR /&gt; MKL_INT M = 584;&lt;/P&gt;
&lt;P&gt;std::complex&amp;lt;double&amp;gt; * A = new std::complex&amp;lt;double&amp;gt;[N*(N+1)/2];&lt;BR /&gt; MKL_Complex16 * B = new MKL_Complex16[N*N];&lt;BR /&gt; double * lambda = new double&lt;M&gt;;&lt;BR /&gt; // Dummy parameters.&lt;BR /&gt; double const onsite = -0.5;&lt;BR /&gt; double const re_offsite = 0.2;&lt;BR /&gt; double const im_offsite = 0.1;&lt;/M&gt;&lt;/P&gt;
&lt;P&gt;for (int i = 0; i &amp;lt; N/2; ++i) {&lt;BR /&gt; A[N*i] = onsite;&lt;BR /&gt; A[N*i+1] = std::complex&amp;lt;double&amp;gt;(re_offsite, im_offsite);&lt;BR /&gt; A[N*i+3] = std::complex&amp;lt;double&amp;gt;(2.0 * re_offsite, -3.0*im_offsite);&lt;BR /&gt; }&lt;/P&gt;
&lt;P&gt;eigensystem((MKL_Complex16*)A, lambda, B, N, M);&lt;/P&gt;
&lt;P&gt;std::cout &amp;lt;&amp;lt; "\n***************************************\n";&lt;BR /&gt; std::cout &amp;lt;&amp;lt; "* Eigenvalues report *\n";&lt;BR /&gt; std::cout &amp;lt;&amp;lt; "***************************************\n";&lt;BR /&gt; std::cout &amp;lt;&amp;lt; 0 &amp;lt;&amp;lt; "\t" &amp;lt;&amp;lt; lambda[0] &amp;lt;&amp;lt; std::endl;&lt;BR /&gt; std::cout &amp;lt;&amp;lt; M-1 &amp;lt;&amp;lt; "\t" &amp;lt;&amp;lt; lambda[M-1] &amp;lt;&amp;lt; std::endl;&lt;BR /&gt; //for (int i = 0; i &amp;lt; M; ++i) {&lt;BR /&gt; //std::cout &amp;lt;&amp;lt; i &amp;lt;&amp;lt; "\t" &amp;lt;&amp;lt; lambda&lt;I&gt; &amp;lt;&amp;lt; std::endl;&lt;BR /&gt; //}&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;// Cleanup&lt;/P&gt;
&lt;P&gt;delete [] A;&lt;BR /&gt; delete [] B;&lt;BR /&gt; delete [] lambda;&lt;/P&gt;
&lt;P&gt;A = NULL;&lt;BR /&gt; B = NULL;&lt;BR /&gt; lambda = NULL;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;int eigensystem(MKL_Complex16 * A, double * eValues, MKL_Complex16 * eVectors, MKL_INT n, MKL_INT const number_of_eigenvalues )&lt;BR /&gt;{&lt;/P&gt;
&lt;P&gt;// Take a copy of A.&lt;BR /&gt; MKL_Complex16 * ap(A);&lt;/P&gt;
&lt;P&gt;// Will contain error codes returned from MKL routines.&lt;BR /&gt; int info = 0;&lt;/P&gt;
&lt;P&gt;// ----------------------------------------------------&lt;BR /&gt; // Convert matrix to symmetric tridiagonal form.&lt;BR /&gt; // T = Qt*A*Q.&lt;BR /&gt; //&lt;BR /&gt; // Setup working containers.&lt;BR /&gt; MKL_Complex16 * tau = new MKL_Complex16&lt;N&gt;;&lt;BR /&gt; // Will contain the diagonal part of the symmetrized matrix.&lt;BR /&gt; double * d = new double&lt;N&gt;;&lt;BR /&gt; // Will contain the off-diagonal part of the symmetrized matrix.&lt;BR /&gt; double * e = new double&lt;N&gt;;&lt;/N&gt;&lt;/N&gt;&lt;/N&gt;&lt;/P&gt;
&lt;P&gt;// Call LAPACK symmetrization routine.&lt;BR /&gt; info = LAPACKE_zhptrd( LAPACK_COL_MAJOR,&lt;BR /&gt; 'U',&lt;BR /&gt; n,&lt;BR /&gt; ap,&lt;BR /&gt; d,&lt;BR /&gt; e,&lt;BR /&gt; tau&lt;BR /&gt; );&lt;/P&gt;
&lt;P&gt;// Check results.&lt;/P&gt;
&lt;P&gt;if (info != 0) {&lt;BR /&gt; std::cout &amp;lt;&amp;lt; "\n*******************************\n ZHPTRD =&amp;gt; info = " &amp;lt;&amp;lt; info &amp;lt;&amp;lt; "\n*******************************\n\n";&lt;BR /&gt; }&lt;BR /&gt; // ----------------------------------------------------&lt;BR /&gt; // Get eigenvalues.&lt;BR /&gt; //&lt;BR /&gt; // Input parameters.&lt;BR /&gt; char range = 'I'; // Select eigenvalues by indices.&lt;BR /&gt; char order = 'E'; // Order all eigenvalues in ascending order.&lt;BR /&gt; double const vl = 0.0; // Lower limit on selected eigenvalues.&lt;BR /&gt; double const vu = 0.0; // Upper limit on selected eigenvalues.&lt;BR /&gt; MKL_INT const il = 1; // Index of first selected eigenvalue.&lt;BR /&gt; MKL_INT const iu = number_of_eigenvalues; // Index of last selected eigenvalue.&lt;BR /&gt; double const abstol = 1e-8; // Absolute tolerance.&lt;/P&gt;
&lt;P&gt;// Resize eigenvalues container.&lt;/P&gt;
&lt;P&gt;// Output parameters.&lt;BR /&gt; MKL_INT * m = new MKL_INT; // Number of eigenvalues found.&lt;BR /&gt; MKL_INT * nsplit = new MKL_INT; // Number of diagonal blocks.&lt;BR /&gt; MKL_INT * iblock = new MKL_INT&lt;N&gt;; // Block numbers of eigenvalues.&lt;BR /&gt; MKL_INT * isplit = new MKL_INT&lt;N&gt;; // Split information.&lt;/N&gt;&lt;/N&gt;&lt;/P&gt;
&lt;P&gt;// Call LAPACK eigenvalues routine.&lt;BR /&gt; info = LAPACKE_dstebz(&lt;BR /&gt; range,&lt;BR /&gt; order,&lt;BR /&gt; n,&lt;BR /&gt; vl,&lt;BR /&gt; vu,&lt;BR /&gt; il,&lt;BR /&gt; iu,&lt;BR /&gt; abstol,&lt;BR /&gt; (const double*) d,&lt;BR /&gt; (const double*) e,&lt;BR /&gt; m,&lt;BR /&gt; nsplit,&lt;BR /&gt; eValues,&lt;BR /&gt; iblock,&lt;BR /&gt; isplit);&lt;/P&gt;
&lt;P&gt;// Check results.&lt;BR /&gt; if (info != 0) {&lt;BR /&gt; //throw MathException(LOCATION,"DSTEBZ failed.");&lt;BR /&gt; std::cout &amp;lt;&amp;lt; "\n*******************************\n DSTEBZ =&amp;gt; info = " &amp;lt;&amp;lt; info &amp;lt;&amp;lt; "\n*******************************\n\n";&lt;BR /&gt; }&lt;BR /&gt; if (*m != number_of_eigenvalues) {&lt;BR /&gt; //throw MathException(LOCATION,"Found fewer eigenvalues than sought.");&lt;BR /&gt; std::clog &amp;lt;&amp;lt; "\nFound m = " &amp;lt;&amp;lt; *m &amp;lt;&amp;lt; " eigenvalues, sought " &amp;lt;&amp;lt; number_of_eigenvalues &amp;lt;&amp;lt; "." &amp;lt;&amp;lt;std::endl;&lt;BR /&gt; }&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt; // -----------------------------------------------------&lt;BR /&gt; // Get eigenvectors of symmetric matrix T = Qt*A*Q.&lt;BR /&gt; //&lt;BR /&gt; // Input parameters.&lt;BR /&gt; MKL_INT * ifailv = new MKL_INT[*m];&lt;/P&gt;
&lt;P&gt;// Since we did not call the eigenvalue routine stebz with range = 'B', we have to set all&lt;BR /&gt; // iblock&lt;I&gt; = 1 and isplit[0] = n.&lt;BR /&gt; for (int i = 0; i &amp;lt; n; ++i) {&lt;BR /&gt; iblock&lt;I&gt; = 1;&lt;BR /&gt; }&lt;BR /&gt; isplit[0] = n;&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;// Call LAPACK eigenvector routine.&lt;BR /&gt; info = LAPACKE_zstein(LAPACK_COL_MAJOR,&lt;BR /&gt; n,&lt;BR /&gt; (const double*) d,&lt;BR /&gt; (const double*) e,&lt;BR /&gt; *m,&lt;BR /&gt; (const double*) eValues,&lt;BR /&gt; (const MKL_INT*) iblock,&lt;BR /&gt; (const MKL_INT*) isplit,&lt;BR /&gt; eVectors,&lt;BR /&gt; n,&lt;BR /&gt; ifailv);&lt;/P&gt;
&lt;P&gt;// Check results.&lt;BR /&gt; if (info != 0) {&lt;BR /&gt; std::cout &amp;lt;&amp;lt; "\n*******************************\n ZSTEIN =&amp;gt; info = " &amp;lt;&amp;lt; info &amp;lt;&amp;lt; "\n*******************************\n\n";&lt;BR /&gt; if (info &amp;gt; 0) {&lt;BR /&gt; for (int i = 0; i &amp;lt; info; ++i) {&lt;BR /&gt; std::cout &amp;lt;&amp;lt; "Eigenvector #"&amp;lt;&amp;lt; ifailv&lt;I&gt; &amp;lt;&amp;lt; "failed to converge." &amp;lt;&amp;lt; std::endl;&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; }&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt; // ------------------------------------------------------------------------&lt;BR /&gt; // Back transformation V -&amp;gt; Q*V to get eigenvalues of original matrix.&lt;BR /&gt; // Multiply from left with Q.&lt;BR /&gt; //&lt;BR /&gt; info = LAPACKE_zupmtr(LAPACK_COL_MAJOR,&lt;BR /&gt; 'L',&lt;BR /&gt; 'U',&lt;BR /&gt; 'N',&lt;BR /&gt; n, // !!! This must be the number of ROWS in the matrix!!!&lt;BR /&gt; *m, // !!! This must be the number of COLUMNS in the matrix!!!&lt;BR /&gt; (const MKL_Complex16*) ap,&lt;BR /&gt; (const MKL_Complex16*) tau,&lt;BR /&gt; eVectors,&lt;BR /&gt; n&lt;BR /&gt; );&lt;/P&gt;
&lt;P&gt;// Check results.&lt;BR /&gt; if (info != 0) {&lt;BR /&gt; std::cout &amp;lt;&amp;lt; "\n*******************************\n ZUPMTR =&amp;gt; info = " &amp;lt;&amp;lt; info &amp;lt;&amp;lt; "\n*******************************\n\n";&lt;BR /&gt; }&lt;/P&gt;
&lt;P&gt;std::cout&amp;lt;&amp;lt; "\n\nALL DONE\n" &amp;lt;&amp;lt; std::endl;&lt;BR /&gt; // All done.&lt;BR /&gt; //&lt;BR /&gt; // Clean-up&lt;BR /&gt; std::clog &amp;lt;&amp;lt; "Cleanup" &amp;lt;&amp;lt; std::endl;&lt;/P&gt;
&lt;P&gt;delete [] iblock;&lt;BR /&gt; delete [] isplit;&lt;BR /&gt; delete [] nsplit;&lt;BR /&gt; delete [] tau;&lt;BR /&gt; delete [] d;&lt;BR /&gt; delete [] e;&lt;BR /&gt; delete m;&lt;BR /&gt; delete [] ifailv;&lt;/P&gt;
&lt;P&gt;iblock = NULL;&lt;BR /&gt; isplit = NULL;&lt;BR /&gt; nsplit = NULL;&lt;BR /&gt; tau = NULL;&lt;BR /&gt; d = NULL;&lt;BR /&gt; e = NULL;&lt;BR /&gt; m = NULL;&lt;BR /&gt; ifailv = NULL;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt; std::clog &amp;lt;&amp;lt; "Return" &amp;lt;&amp;lt; std::endl;&lt;BR /&gt; // Return.&lt;BR /&gt; return info;&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;SYSTEM&lt;/P&gt;
&lt;P&gt;=========================&lt;/P&gt;
&lt;P&gt;ubuntu 12.04 LTS, Kernel 3.2.0.55, gcc 4.6.4, intel mkl v 11.1 update 1, shipped with Intel Fortran Composer XE 2013 sp1.0.80&lt;/P&gt;
&lt;P&gt;$&amp;gt; ulimit -a&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;core file size (blocks, -c) 0&lt;BR /&gt;data seg size (kbytes, -d) unlimited&lt;BR /&gt;scheduling priority (-e) 0&lt;BR /&gt;file size (blocks, -f) unlimited&lt;BR /&gt;pending signals (-i) 157796&lt;BR /&gt;max locked memory (kbytes, -l) 64&lt;BR /&gt;max memory size (kbytes, -m) unlimited&lt;BR /&gt;open files (-n) 1024&lt;BR /&gt;pipe size (512 bytes, -p) 8&lt;BR /&gt;POSIX message queues (bytes, -q) 819200&lt;BR /&gt;real-time priority (-r) 0&lt;BR /&gt;stack size (kbytes, -s) 65536&lt;BR /&gt;cpu time (seconds, -t) unlimited&lt;BR /&gt;max user processes (-u) 157796&lt;BR /&gt;virtual memory (kbytes, -v) unlimited&lt;BR /&gt;file locks (-x) unlimited&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Compile and link line&lt;/P&gt;
&lt;P&gt;======================&lt;/P&gt;
&lt;P&gt;g++ -ggdb eigensolver.cpp -I/opt/intel/mkl/include -L/opt/intel/mkl/lib/intel64 -lmkl_intel_lp64 -lmkl_core -lmkl_intel_thread -lmkl_sequential -L/opt/intel/lib -liomp5 -lpthread -lm -o eigensolver&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;STDERR output&lt;/P&gt;
&lt;P&gt;=====================&lt;/P&gt;
&lt;P&gt;$&amp;gt; ./eigensolver&lt;/P&gt;
&lt;P&gt;*** glibc detected *** ./eigensolver: munmap_chunk(): invalid pointer: 0x000000000083d260 ***&lt;BR /&gt;======= Backtrace: =========&lt;BR /&gt;/lib/x86_64-linux-gnu/libc.so.6(+0x7eb96)[0x7f8d38955b96]&lt;BR /&gt;./eigensolver[0x4013b8]&lt;BR /&gt;./eigensolver[0x400db3]&lt;BR /&gt;/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x7f8d388f876d]&lt;BR /&gt;./eigensolver[0x400b39]&lt;BR /&gt;======= Memory map: ========&lt;BR /&gt;00400000-00402000 r-xp 00000000 00:14 3420923 /home/cf/git/quantumsource/c++/eigensolver&lt;BR /&gt;00601000-00602000 r--p 00001000 00:14 3420923 /home/cf/git/quantumsource/c++/eigensolver&lt;BR /&gt;00602000-00603000 rw-p 00002000 00:14 3420923 /home/cf/git/quantumsource/c++/eigensolver&lt;BR /&gt;0083c000-008a5000 rw-p 00000000 00:00 0 [heap]&lt;BR /&gt;7f8d18000000-7f8d18090000 rw-p 00000000 00:00 0 &lt;BR /&gt;7f8d18090000-7f8d1c000000 ---p 00000000 00:00 0 &lt;BR /&gt;7f8d20000000-7f8d2007b000 rw-p 00000000 00:00 0 &lt;BR /&gt;7f8d2007b000-7f8d24000000 ---p 00000000 00:00 0 &lt;BR /&gt;7f8d24000000-7f8d2408c000 rw-p 00000000 00:00 0 &lt;BR /&gt;7f8d2408c000-7f8d28000000 ---p 00000000 00:00 0 &lt;BR /&gt;7f8d28000000-7f8d28021000 rw-p 00000000 00:00 0 &lt;BR /&gt;7f8d28021000-7f8d2c000000 ---p 00000000 00:00 0 &lt;BR /&gt;7f8d2ef5d000-7f8d2f377000 rw-p 00000000 00:00 0 &lt;BR /&gt;7f8d2f377000-7f8d2f378000 ---p 00000000 00:00 0 &lt;BR /&gt;7f8d2f378000-7f8d2f778000 rw-p 00000000 00:00 0 &lt;BR /&gt;7f8d2f778000-7f8d2f779000 ---p 00000000 00:00 0 &lt;BR /&gt;7f8d2f779000-7f8d2fb79000 rw-p 00000000 00:00 0 &lt;BR /&gt;7f8d2fb79000-7f8d2fb7a000 ---p 00000000 00:00 0 &lt;BR /&gt;7f8d2fb7a000-7f8d2ff7a000 rw-p 00000000 00:00 0 &lt;BR /&gt;7f8d2ff7a000-7f8d319f9000 r-xp 00000000 08:05 2499559 /opt/intel/composer_xe_2013_sp1.0.080/mkl/lib/intel64/libmkl_avx.so&lt;BR /&gt;7f8d319f9000-7f8d31bf8000 ---p 01a7f000 08:05 2499559 /opt/intel/composer_xe_2013_sp1.0.080/mkl/lib/intel64/libmkl_avx.so&lt;BR /&gt;7f8d31bf8000-7f8d31c08000 r--p 01a7e000 08:05 2499559 /opt/intel/composer_xe_2013_sp1.0.080/mkl/lib/intel64/libmkl_avx.so&lt;BR /&gt;7f8d31c08000-7f8d31c10000 rw-p 01a8e000 08:05 2499559 /opt/intel/composer_xe_2013_sp1.0.080/mkl/lib/intel64/libmkl_avx.so&lt;BR /&gt;7f8d31c10000-7f8d37fa4000 rw-p 00000000 00:00 0 &lt;BR /&gt;7f8d37fa4000-7f8d3809f000 r-xp 00000000 08:05 4460092 /lib/x86_64-linux-gnu/libm-2.15.so&lt;BR /&gt;7f8d3809f000-7f8d3829e000 ---p 000fb000 08:05 4460092 /lib/x86_64-linux-gnu/libm-2.15.so&lt;BR /&gt;7f8d3829e000-7f8d3829f000 r--p 000fa000 08:05 4460092 /lib/x86_64-linux-gnu/libm-2.15.so&lt;BR /&gt;7f8d3829f000-7f8d382a0000 rw-p 000fb000 08:05 4460092 /lib/x86_64-linux-gnu/libm-2.15.so&lt;BR /&gt;7f8d382a0000-7f8d382b8000 r-xp 00000000 08:05 4457015 /lib/x86_64-linux-gnu/libpthread-2.15.so&lt;BR /&gt;7f8d382b8000-7f8d384b7000 ---p 00018000 08:05 4457015 /lib/x86_64-linux-gnu/libpthread-2.15.so&lt;BR /&gt;7f8d384b7000-7f8d384b8000 r--p 00017000 08:05 4457015 /lib/x86_64-linux-gnu/libpthread-2.15.so&lt;BR /&gt;7f8d384b8000-7f8d384b9000 rw-p 00018000 08:05 4457015 /lib/x86_64-linux-gnu/libpthread-2.15.so&lt;BR /&gt;7f8d384b9000-7f8d384bd000 rw-p 00000000 00:00 0 &lt;BR /&gt;7f8d384bd000-7f8d384d2000 r-xp 00000000 08:05 4460185 /lib/x86_64-linux-gnu/libgcc_s.so.1&lt;BR /&gt;7f8d384d2000-7f8d386d1000 ---p 00015000 08:05 4460185 /lib/x86_64-linux-gnu/libgcc_s.so.1&lt;BR /&gt;7f8d386d1000-7f8d386d2000 r--p 00014000 08:05 4460185 /lib/x86_64-linux-gnu/libgcc_s.so.1&lt;BR /&gt;7f8d386d2000-7f8d386d3000 rw-p 00015000 08:05 4460185 /lib/x86_64-linux-gnu/libgcc_s.so.1&lt;BR /&gt;7f8d386d3000-7f8d386d5000 r-xp 00000000 08:05 4460099 /lib/x86_64-linux-gnu/libdl-2.15.so&lt;BR /&gt;7f8d386d5000-7f8d388d5000 ---p 00002000 08:05 4460099 /lib/x86_64-linux-gnu/libdl-2.15.so&lt;BR /&gt;7f8d388d5000-7f8d388d6000 r--p 00002000 08:05 4460099 /lib/x86_64-linux-gnu/libdl-2.15.so&lt;BR /&gt;7f8d388d6000-7f8d388d7000 rw-p 00003000 08:05 4460099 /lib/x86_64-linux-gnu/libdl-2.15.so&lt;BR /&gt;7f8d388d7000-7f8d38a8c000 r-xp 00000000 08:05 4456972 /lib/x86_64-linux-gnu/libc-2.15.so&lt;BR /&gt;7f8d38a8c000-7f8d38c8c000 ---p 001b5000 08:05 4456972 /lib/x86_64-linux-gnu/libc-2.15.so&lt;BR /&gt;7f8d38c8c000-7f8d38c90000 r--p 001b5000 08:05 4456972 /lib/x86_64-linux-gnu/libc-2.15.so&lt;BR /&gt;7f8d38c90000-7f8d38c92000 rw-p 001b9000 08:05 4456972 /lib/x86_64-linux-gnu/libc-2.15.so&lt;BR /&gt;7f8d38c92000-7f8d38c97000 rw-p 00000000 00:00 0 &lt;BR /&gt;7f8d38c97000-7f8d38d79000 r-xp 00000000 08:05 270211 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16&lt;BR /&gt;7f8d38d79000-7f8d38f78000 ---p 000e2000 08:05 270211 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16&lt;BR /&gt;7f8d38f78000-7f8d38f80000 r--p 000e1000 08:05 270211 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16&lt;BR /&gt;7f8d38f80000-7f8d38f82000 rw-p 000e9000 08:05 270211 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16&lt;BR /&gt;7f8d38f82000-7f8d38f97000 rw-p 00000000 00:00 0 &lt;BR /&gt;7f8d38f97000-7f8d3907e000 r-xp 00000000 08:05 2495293 /opt/intel/composer_xe_2013_sp1.0.080/compiler/lib/intel64/libiomp5.so&lt;BR /&gt;7f8d3907e000-7f8d3927d000 ---p 000e7000 08:05 2495293 /opt/intel/composer_xe_2013_sp1.0.080/compiler/lib/intel64/libiomp5.so&lt;BR /&gt;7f8d3927d000-7f8d39288000 rw-p 000e6000 08:05 2495293 /opt/intel/composer_xe_2013_sp1.0.080/compiler/lib/intel64/libiomp5.so&lt;BR /&gt;7f8d39288000-7f8d392b0000 rw-p 00000000 00:00 0 &lt;BR /&gt;7f8d392b0000-7f8d3a011000 r-xp 00000000 08:05 2499545 /opt/intel/composer_xe_2013_sp1.0.080/mkl/lib/intel64/libmkl_intel_thread.so&lt;BR /&gt;7f8d3a011000-7f8d3a211000 ---p 00d61000 08:05 2499545 /opt/intel/composer_xe_2013_sp1.0.080/mkl/lib/intel64/libmkl_intel_thread.so&lt;BR /&gt;7f8d3a211000-7f8d3a212000 r--p 00d61000 08:05 2499545 /opt/intel/composer_xe_2013_sp1.0.080/mkl/lib/intel64/libmkl_intel_thread.so&lt;BR /&gt;7f8d3a212000-7f8d3a347000 rw-p 00d62000 08:05 2499545 /opt/intel/composer_xe_2013_sp1.0.080/mkl/lib/intel64/libmkl_intel_thread.so&lt;BR /&gt;7f8d3a347000-7f8d3a34a000 rw-p 00000000 00:00 0 &lt;BR /&gt;7f8d3a34a000-7f8d3b611000 r-xp 00000000 08:05 2499567 /opt/intel/composer_xe_2013_sp1.0.080/mkl/lib/intel64/libmkl_core.so&lt;BR /&gt;7f8d3b611000-7f8d3b811000 ---p 012c7000 08:05 2499567 /opt/intel/composer_xe_2013_sp1.0.080/mkl/lib/intel64/libmkl_core.so&lt;BR /&gt;7f8d3b811000-7f8d3b850000 r--p 012c7000 08:05 2499567 /opt/intel/composer_xe_2013_sp1.0.080/mkl/lib/intel64/libmkl_core.so&lt;BR /&gt;7f8d3b850000-7f8d3b85a000 rw-p 01306000 08:05 2499567 /opt/intel/composer_xe_2013_sp1.0.080/mkl/lib/intel64/libmkl_core.so&lt;BR /&gt;7f8d3b85a000-7f8d3b878000 rw-p 00000000 00:00 0 &lt;BR /&gt;7f8d3b878000-7f8d3bd89000 r-xp 00000000 08:05 2499556 /opt/intel/composer_xe_2013_sp1.0.080/mkl/lib/intel64/libmkl_intel_lp64.so&lt;BR /&gt;7f8d3bd89000-7f8d3bf88000 ---p 00511000 08:05 2499556 /opt/intel/composer_xe_2013_sp1.0.080/mkl/lib/intel64/libmkl_intel_lp64.so&lt;BR /&gt;7f8d3bf88000-7f8d3bf8a000 r--p 00510000 08:05 2499556 /opt/intel/composer_xe_2013_sp1.0.080/mkl/lib/intel64/libmkl_intel_lp64.so&lt;BR /&gt;7f8d3bf8a000-7f8d3bf96000 rw-p 00512000 08:05 2499556 /opt/intel/composer_xe_2013_sp1.0.080/mkl/lib/intel64/libmkl_intel_lp64.so&lt;BR /&gt;7f8d3bf96000-7f8d3bf9b000 rw-p 00000000 00:00 0 &lt;BR /&gt;7f8d3bf9b000-7f8d3bfbd000 r-xp 00000000 08:05 4460093 /lib/x86_64-linux-gnu/ld-2.15.so&lt;BR /&gt;7f8d3c014000-7f8d3c172000 rw-p 00000000 00:00 0 &lt;BR /&gt;7f8d3c172000-7f8d3c173000 ---p 00000000 00:00 0 &lt;BR /&gt;7f8d3c173000-7f8d3c18a000 rw-p 00000000 00:00 0 &lt;BR /&gt;7f8d3c198000-7f8d3c1bd000 rw-p 00000000 00:00 0 &lt;BR /&gt;7f8d3c1bd000-7f8d3c1be000 r--p 00022000 08:05 4460093 /lib/x86_64-linux-gnu/ld-2.15.so&lt;BR /&gt;7f8d3c1be000-7f8d3c1c0000 rw-p 00023000 08:05 4460093 /lib/x86_64-linux-gnu/ld-2.15.so&lt;BR /&gt;7ffff40c6000-7ffff40e8000 rw-p 00000000 00:00 0 [stack]&lt;BR /&gt;7ffff41ff000-7ffff4200000 r-xp 00000000 00:00 0 [vdso]&lt;BR /&gt;ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]&lt;BR /&gt;Aborted (core dumped)&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;GDB backtrace&lt;/P&gt;
&lt;P&gt;===========================&lt;/P&gt;
&lt;P&gt;(gdb) bt&lt;BR /&gt;#0 0x00007ffff474c425 in __GI_raise (sig=&amp;lt;optimized out&amp;gt;)&lt;BR /&gt; at ../nptl/sysdeps/unix/sysv/linux/raise.c:64&lt;BR /&gt;#1 0x00007ffff474fb8b in __GI_abort () at abort.c:91&lt;BR /&gt;#2 0x00007ffff478a39e in __libc_message (do_abort=2, &lt;BR /&gt; fmt=0x7ffff4894748 "*** glibc detected *** %s: %s: 0x%s ***\n")&lt;BR /&gt; at ../sysdeps/unix/sysv/linux/libc_fatal.c:201&lt;BR /&gt;#3 0x00007ffff4794b96 in malloc_printerr (action=3, &lt;BR /&gt; str=0x7ffff4894838 "munmap_chunk(): invalid pointer", ptr=&amp;lt;optimized out&amp;gt;)&lt;BR /&gt; at malloc.c:5039&lt;BR /&gt;#4 0x00000000004013b8 in eigensystem (A=0x7ffff1f5a010, eValues=0x603010, &lt;BR /&gt; eVectors=0x7fffee250010, n=2000, number_of_eigenvalues=584)&lt;BR /&gt; at eigensolver.cpp:202&lt;BR /&gt;#5 0x0000000000400db3 in main () at eigensolver.cpp:29&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2013 14:23:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Memory-error-in-complex-eigensolver/m-p/981384#M17471</guid>
      <dc:creator>Carsten_F_</dc:creator>
      <dc:date>2013-11-12T14:23:12Z</dc:date>
    </item>
    <item>
      <title>It may be more profitable for</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Memory-error-in-complex-eigensolver/m-p/981385#M17472</link>
      <description>&lt;P&gt;It may be more profitable for you to note that, for&amp;nbsp;N = 2000, M = 583 (in fact, even for M=50 with the same N) the program gives&lt;/P&gt;
&lt;P&gt;[bash]&amp;nbsp;ZSTEIN =&amp;gt; info = -6[/bash]&lt;/P&gt;
&lt;P&gt;When such an error occurs, you should probably terminate the program instead of continuing the calculations and calling ZUMPTR with invalid results from the earlier calculation.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In other words, look into the failure of ZSTEIN instead of the failure of ZUMPTR.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2013 18:05:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Memory-error-in-complex-eigensolver/m-p/981385#M17472</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2013-11-12T18:05:06Z</dc:date>
    </item>
    <item>
      <title>Hi mecej4.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Memory-error-in-complex-eigensolver/m-p/981386#M17473</link>
      <description>&lt;P&gt;Hi mecej4.&lt;/P&gt;
&lt;P&gt;Thank for your reply.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;In other words, look into the failure of ZSTEIN instead of the failure of ZUMPTR.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That's even more weird, &amp;nbsp;because I don't get that message. Here's the complete log from my run (except the backtrace).&lt;/P&gt;
&lt;P&gt;$&amp;gt; ./eigensolver&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;ALL DONE&lt;/P&gt;
&lt;P&gt;Cleanup&lt;BR /&gt;*** glibc detected *** ./eigensolver: munmap_chunk(): invalid pointer: 0x0000000002529260 ***&lt;BR /&gt;======= Backtrace: =========&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2013 06:11:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Memory-error-in-complex-eigensolver/m-p/981386#M17473</guid>
      <dc:creator>Carsten_F_</dc:creator>
      <dc:date>2013-11-13T06:11:44Z</dc:date>
    </item>
    <item>
      <title>pls, set                </title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Memory-error-in-complex-eigensolver/m-p/981387#M17474</link>
      <description>&lt;P&gt;pls&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;, set &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;double * lambda = new double&lt;N&gt;;&lt;/N&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;instead of &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;double * lambda = new double&lt;M&gt;;&lt;/M&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;see from documentation for &amp;nbsp;&lt;SPAN class="kwd" style="font-family: 'Courier New', Courier, monospace; color: rgb(51, 51, 51); font-size: 13.600000381469727px; line-height: 20px;"&gt;dstebz&lt;/SPAN&gt;&lt;SPAN class="delim" style="font-family: 'Courier New', Courier, monospace; color: rgb(51, 51, 51); font-size: 13.600000381469727px; line-height: 20px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;DL&gt;
	&lt;DT class="dlterm" style="margin-left: 0em; margin-top: 0em; margin-bottom: 0em; width: 100px; color: rgb(51, 51, 51); font-family: Verdana, Arial, sans-serif; font-size: 13.600000381469727px; font-weight: normal; line-height: normal;"&gt;&lt;SPAN class="parmname" style="font-style: italic; font-family: 'Courier New', Courier, monospace;"&gt;w&lt;/SPAN&gt;&lt;/DT&gt;
	&lt;DD style="font-size: 13.600000381469727px; margin-left: 0px; position: relative; top: -13pt; left: 110px; width: 704.75px; line-height: 14pt; margin-top: 0em; margin-bottom: -10pt; color: rgb(51, 51, 51); font-family: Verdana, Arial, sans-serif;"&gt;
		&lt;P style="font-size: inherit; line-height: 20px; margin-top: 0em; margin-bottom: 0em;"&gt;&lt;SPAN class="keyword" style="font-family: 'Courier New', Courier, monospace;"&gt;REAL&lt;/SPAN&gt;&amp;nbsp;for&amp;nbsp;&lt;SPAN class="option" style="font-family: 'Courier New', Courier, monospace;"&gt;sstebz&lt;/SPAN&gt;&lt;/P&gt;

		&lt;P style="font-size: inherit; line-height: 20px; margin-top: 0em; margin-bottom: 0em;"&gt;&lt;SPAN class="keyword" style="font-family: 'Courier New', Courier, monospace;"&gt;DOUBLE PRECISION&lt;/SPAN&gt;&amp;nbsp;for&amp;nbsp;&lt;SPAN class="option" style="font-family: 'Courier New', Courier, monospace;"&gt;dstebz&lt;/SPAN&gt;.&lt;/P&gt;

		&lt;P style="font-size: inherit; line-height: 20px; margin-top: 0em; margin-bottom: 0em;"&gt;Array,&amp;nbsp;&lt;SPAN class="keyword" style="font-family: 'Courier New', Courier, monospace;"&gt;DIMENSION&lt;/SPAN&gt;&amp;nbsp;&lt;STRONG&gt;at least max(1,&amp;nbsp;&lt;VAR&gt;n&lt;/VAR&gt;)&lt;/STRONG&gt;. The computed eigenvalues, stored in&amp;nbsp;&lt;SAMP class="codeph" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;VAR&gt;w&lt;/VAR&gt;(1)&lt;/SAMP&gt;&amp;nbsp;to&amp;nbsp;&lt;VAR&gt;w&lt;/VAR&gt;(&lt;VAR&gt;m&lt;/VAR&gt;).&lt;/P&gt;
	&lt;/DD&gt;
&lt;/DL&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;here is output of your example after this correction:&lt;/P&gt;

&lt;P&gt;ALL DONE&lt;/P&gt;

&lt;P&gt;Cleanup&lt;BR /&gt;
	Return&lt;/P&gt;

&lt;P&gt;***************************************&lt;BR /&gt;
	* &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Eigenvalues report &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; *&lt;BR /&gt;
	***************************************&lt;BR /&gt;
	0 &amp;nbsp; &amp;nbsp; &amp;nbsp; -2.70582&lt;BR /&gt;
	583 &amp;nbsp; &amp;nbsp; 0&lt;BR /&gt;
	Press any key to continue . . .&lt;/P&gt;

&lt;P&gt;regards, Gennady&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Nov 2013 05:28:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Memory-error-in-complex-eigensolver/m-p/981387#M17474</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2013-11-28T05:28:00Z</dc:date>
    </item>
  </channel>
</rss>

