Erroneous eigenvalue computation for large matrices in R2016a when forcing single threaded execution
8 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
MathWorks Support Team
il 2 Gen 2018
Risposto: MathWorks Support Team
il 3 Gen 2018
Why does MATLAB R2016a produce wrong eigenvalues for large matrices (N>7799) when forced to run as a single threaded application?
Example code:
%Diagonalization of a tridiagonal matrix.
t=1; %off-diagonal elements
tic;
%creates tridiagonal matrix of size NxN
T=gallery('tridiag',N,t,0,t);
T=full(T);
T(1,N)=t;
T(N,1)=t;
[V,D]=eig(T,'vector');%compute eigenvalues and store in vector
fprintf('Invoking "eig()" yields eigenvalues:\n')
fprintf('max: %2.4f \n',max(D))
fprintf('min: %2.4f \n',min(D))
toc;
exit
Execution Command:
taskset -c 0 /opt/MATLAB/R2016a/bin/matlab -nodisplay -nodesktop -nosplash -nojvm -r "N=7800;test"
The above command yields wrong eigenvalues. The correct max and min eigenvalues are supposed to be 2 and -2 respectively.
However, the following multithreaded implementation produces accurate results:
taskset -c 0,1 /opt/MATLAB/R2016a/bin/matlab -nodisplay -nodesktop -nosplash -nojvm -r "N=7800;test"
Risposta accettata
MathWorks Support Team
il 2 Gen 2018
CAUSE:
This error is due to a bug in the Intel Math Kernel Library 11.2.3 that was shipped with MATLAB R2016a. This is a bug that is present only in MATLAB R2016a.
SOLUTION:
Please upgrade to a different release of MATLAB in order to avoid this error.
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Linear Algebra in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!