Problem of MKL memory management with mkl_malloc, mkl_memstat, mkl_free

Problem of MKL memory management with mkl_malloc, mkl_memstat, mkl_free

imagem de nansal

Hi,
For applying the MKL memory management, I have used the external functions: mkl_malloc, mkl_memstat, and mkl_free, in my Fortran program in Linux.

I write these command lines in terminal:
MKL_LIBRARY_PATH=/opt/intel/mkl/9.1.023/lib/32
MKL_INCLUDE_PATH=/opt/intel/mkl/9.1.023/include
ifort -c my_program.for -L MKL_LIBRARY_PATH -I MKL_INCLUDE_PATH -lmkl_lapack -lmkl_ia32 -lguide -lpthread

But after this command line:
ifort -o my_prog my_program.o -L MKL_LIBRARY_PATH -I MKL_INCLUDE_PATH -lmkl_lapack -lmkl_ia32 -lguide -lpthread
I have this message:
undefined reference 'mkl_malloc_'
undefined reference 'mkl_memstat_'
undefined reference 'mkl_free_'

Has anyone have this problem?
Thanks

5 posts / 0 new
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.
imagem de ArturGuzik
Quoting - nansal Hi,
For applying the MKL memory management, I have used the external functions: mkl_malloc, mkl_memstat, and mkl_free, in my Fortran program in Linux.

I write these command lines in terminal:
MKL_LIBRARY_PATH=/opt/intel/mkl/9.1.023/lib/32
MKL_INCLUDE_PATH=/opt/intel/mkl/9.1.023/include
ifort -c my_program.for -L MKL_LIBRARY_PATH -I MKL_INCLUDE_PATH -lmkl_lapack -lmkl_ia32 -lguide -lpthread

But after this command line:
ifort -o my_prog my_program.o -L MKL_LIBRARY_PATH -I MKL_INCLUDE_PATH -lmkl_lapack -lmkl_ia32 -lguide -lpthread
I have this message:
undefined reference 'mkl_malloc_'
undefined reference 'mkl_memstat_'
undefined reference 'mkl_free_'

Has anyone have this problem?
Thanks

Hi,

a few things: (a) your version is too old. I believe the memory management was introduced with 10.0 update 2 (b) you need INCLUDE 'mkl_service.fi' statement in your code.

A.

imagem de nansal
Quoting - ArturGuzik Hi,

a few things: (a) your version is too old. I believe the memory management was introduced with 10.0 update 2 (b) you need INCLUDE 'mkl_service.fi' statement in your code.

A.

Thank you so much, ArturGuzik

I'm using MKL version 10.0 update 2 but without the statement of the (include 'mkl_service.fi'), since there isn't in the include file. Now, I don't have the previous problem.

imagem de Sahar A.

and for C??

imagem de Victor Pasko (Intel)

Hi,

MKL 10.0 is a major release which introduced layered model of libraries. So, link line is very different with MKL 9.1 release.
Please try http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/

Thanks, -- Victor

Faça login para deixar um comentário.