Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Segmentation Fault with DSYEVD

jjaffari
Beginner
813 Views
A segmentation fault occurs when I run following simple c code complied by dynamically on using MKL libraries on Linux:

int n=3;
double a[9]={1, 0.2, 0.1,
0.2, 1.1, 0.05,
0.1, 0.05, 0.9};

double eigval[3];

double work[37];
int lwork=37;

int iwork[18];
int liwork=18;

int info=0;

DSYEVD("V","U", &n, a, &n, eigval, work, &lwork, iwork, &liwork, &info);

I am using BLAS functions with dynamic access to libs with no problem, only the LAPACK function does not work. However, the static usage of the code is working properly.

Here is what I get when running valgrind:

==21353== Jump to the invalid address stated on the next line
==21353== at 0x0: ???
==21353== by 0x4209925: mkl_lapack_dsytd2 (in /opt/intel/mkl/10.0.1.014/lib/32/libmkl_lapack.so)
==21353== by 0x437C49F: mkl_lapack_xdsytrd (in /opt/intel/mkl/10.0.1.014/lib/32/libmkl_lapack.so)
==21353== by 0x40427FFF: ???
==21353== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==21353==
==21353== Process terminating with default action of signal 11 (SIGSEGV)
==21353== Bad permissions for mapped region at address 0x0
==21353== at 0x0: ???
==21353== by 0x4209925: mkl_lapack_dsytd2 (in /opt/intel/mkl/10.0.1.014/lib/32/libmkl_lapack.so)
==21353== by 0x437C49F: mkl_lapack_xdsytrd (in /opt/intel/mkl/10.0.1.014/lib/32/libmkl_lapack.so)
==21353== by 0x40427FFF: ???
==21353==
0 Kudos
1 Reply
Michael_C_Intel4
Employee
813 Views

It seems to be an issue with loading BLAS function dynamically. What is the link line?

Michael.

0 Kudos
Reply