Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
7263 Discussions

Lapack: DSTEVR produces SIGSEGV when all eigenvectors are queried

clemens_adolphs
Beginner
1,249 Views
Dear all,
I am using DSTEVR to diagonalize a symmetric tridiagonal matrix. It works fine when I only want none or some of the eigenvectors. For a matrix of dimension N, computing the first N-1 eigenvectors/eigenvalues works fine.
However, if I want all eigenvectors, DSTEVR crashes with a segmentation fault in mkl_lapack_dlarre

A minimum example is attached.
0 Kudos
8 Replies
Gennady_F_Intel
Moderator
1,249 Views
Quoting - clemens_adolphs
Dear all,
I am using DSTEVR to diagonalize a symmetric tridiagonal matrix. It works fine when I only want none or some of the eigenvectors. For a matrix of dimension N, computing the first N-1 eigenvectors/eigenvalues works fine.
However, if I want all eigenvectors, DSTEVR crashes with a segmentation fault in mkl_lapack_dlarre

A minimum example is attached.

Hi Clemens,
Could you check the problem with the lates version of MKL ( 10.2 update2)?
I checked it with this version and see the results below,

0.981753 -0.189933 0.00931642
0.189899 0.976642 -0.100539
0.00999689 0.100474 0.994889
ISUPPZ: 1 3 1 3 1 3
Press any key to continue . . .

no segmentation ....
all outputs are correct ...

--Gennady
0 Kudos
clemens_adolphs
Beginner
1,249 Views

Hi Clemens,
Could you check the problem with the lates version of MKL ( 10.2 update2)?
I checked it with this version and see the results below,

0.981753 -0.189933 0.00931642
0.189899 0.976642 -0.100539
0.00999689 0.100474 0.994889
ISUPPZ: 1 3 1 3 1 3
Press any key to continue . . .

no segmentation ....
all outputs are correct ...

--Gennady

Hello,
sorry, since I'm at a workplace where only that version is installed, I cannot test it with that version.
Did you try it with -O3 optimization as well? While trying to resolve the problem, I switched from dstevr to dstevx. Then I get weird problems where I still have not fully figured out what triggers what. Apparently, compiling with
-debug produces a version that works. Omitting -debug and specifying -DNDEBUG or -DDEBUG only works if -O0 (no optimization) is given. Providing neither -debug nor -DNDEBUG nor -DDEBUG allows -O3 to produce a working version.
Very weird.

The above compiler flag 'magic' does not, however, affect the segfault in dstevr... disabling optimization changes nothing, I still get the segfault. :-(
I will try to get the system administrator to update the mkl :)
0 Kudos
Gennady_F_Intel
Moderator
1,249 Views
Quoting - clemens_adolphs

Hi Clemens,
Could you check the problem with the lates version of MKL ( 10.2 update2)?
I checked it with this version and see the results below,

0.981753 -0.189933 0.00931642
0.189899 0.976642 -0.100539
0.00999689 0.100474 0.994889
ISUPPZ: 1 3 1 3 1 3
Press any key to continue . . .

no segmentation ....
all outputs are correct ...

--Gennady

Hello,
sorry, since I'm at a workplace where only that version is installed, I cannot test it with that version.
Did you try it with -O3 optimization as well? While trying to resolve the problem, I switched from dstevr to dstevx. Then I get weird problems where I still have not fully figured out what triggers what. Apparently, compiling with
-debug produces a version that works. Omitting -debug and specifying -DNDEBUG or -DDEBUG only works if -O0 (no optimization) is given. Providing neither -debug nor -DNDEBUG nor -DDEBUG allows -O3 to produce a working version.
Very weird.

The above compiler flag 'magic' does not, however, affect the segfault in dstevr... disabling optimization changes nothing, I still get the segfault. :-(
I will try to get the system administrator to update the mkl :)

hmm, that's interesting behaviour ... . Actually, compiling with different options shouldn't affect on the MKL routines ... . Nevertheless, please try to update to the latest version of MKL and let us the update :).
--Gennady

0 Kudos
clemens_adolphs
Beginner
1,249 Views
Update:

On one architecture I have icpc version 11. There it compiles and runs without segmentation fault, but the array isuppz is left unchanged although jobz is "V" and range is "A". Also, valgrind tells about invalid reads/writes and lost data in the parallelization libraries...

For icpc 10.1, I still get the segmentation fault for any combination of compiler flags (-O0 to -O3, debug, etc) and various link lines (-openmp -lmkl or -lguide -lpthread -lmkl)


0 Kudos
Artem_V_Intel
Employee
1,249 Views
Quoting - clemens_adolphs
Update:

On one architecture I have icpc version 11. There it compiles and runs without segmentation fault, but the array isuppz is left unchanged although jobz is "V" and range is "A". Also, valgrind tells about invalid reads/writes and lost data in the parallelization libraries...

For icpc 10.1, I still get the segmentation fault for any combination of compiler flags (-O0 to -O3, debug, etc) and various link lines (-openmp -lmkl or -lguide -lpthread -lmkl)



Hello,

I checked test case you submitted with Intel C++ Compiler Professional 11.1.046 that contains MKL 10.2.2.025 in bundle on Linux intel64 machine. Please see the results below:

$ export MKLPATH=/opt/intel/Compiler/11.1/046/mkl/lib/em64t
$ icpc -o test test.cpp -Wl,--start-group ${MKLPATH}/libmkl_intel_lp64.a ${MKLPATH}/libmkl_intel_thread.a ${MKLPATH}/libmkl_core.a -Wl,--end-group -openmp -lpthread
$ ./test
0.981753 -0.189933 0.00931642
0.189899 0.976642 -0.100539
0.00999689 0.100474 0.994889
ISUPPZ: 1 3 1 3 1 3
$

Thanks,
Art
0 Kudos
yuriisig
Beginner
1,249 Views
Quoting - clemens_adolphs
Dear all,
I am using DSTEVR to diagonalize a symmetric tridiagonal matrix. It works fine when I only want none or some of the eigenvectors. For a matrix of dimension N, computing the first N-1 eigenvectors/eigenvalues works fine.
However, if I want all eigenvectors, DSTEVR crashes with a segmentation fault in mkl_lapack_dlarre

A minimum example is attached.

I advise not to use this algorithm. It can fine say lies.
0 Kudos
Gennady_F_Intel
Moderator
1,249 Views
Quoting - yuriisig
Quoting - clemens_adolphs
Dear all,
I am using DSTEVR to diagonalize a symmetric tridiagonal matrix. It works fine when I only want none or some of the eigenvectors. For a matrix of dimension N, computing the first N-1 eigenvectors/eigenvalues works fine.
However, if I want all eigenvectors, DSTEVR crashes with a segmentation fault in mkl_lapack_dlarre

A minimum example is attached.

I advise not to use this algorithm. It can fine say lies.

Yuri, could you clarify what do you mean by that - "it can fine say lies"?
Is it wrong algorithm or the wrong implementation of DSTEVR into MKL?
--Gennady
0 Kudos
yuriisig
Beginner
1,249 Views
Is it wrong algorithm or the wrong implementation of DSTEVR into MKL?
--Gennady

, .
: , (. i7 860)? , , . : .

-
0 Kudos
Reply