- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
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==
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==
Enlace copiado
1 Responder
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
It seems to be an issue with loading BLAS function dynamically. What is the link line?
Michael.
Responder
Opciones de temas
- Suscribirse a un feed RSS
- Marcar tema como nuevo
- Marcar tema como leído
- Flotar este Tema para el usuario actual
- Favorito
- Suscribir
- Página de impresión sencilla