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

Link LAPACK into Fortran 90 with ifort

sebschub
Beginner
279 Views
Hi,

this is probably a simple question but I just don't get it right.
I want to use the lapack routines coming with the intel compiler for linux. Using the IA32 version I try
[plain]ifort -L/opt/intel/Compiler/11.1/046/mkl/lib/32/ /opt/intel/Compiler/11.1/046/mkl/lib/32/libmkl_solver_sequential.a -I/opt/intel/Compiler/11.1/046/mkl/include/32 -I/opt/intel/Compiler/11.1/046/mkl/include  -lmkl_intel -lmkl_sequential -lmkl_core -lmkl_lapack95 -lmkl_blas95 -lmkl_lapack -lpthread test.f90[/plain]
but I get the error
[plain]/tmp/ifortuKuHag.o: In function `MAIN__':
test.f90:(.text+0x15e): undefined reference to `dgetrf_f95_'[/plain]
The code is just a testing one and really simple:
[plain]PROGRAM test

  USE lapack95

  REAL(kind=8), DIMENSION(4,4) :: x

  x = RESHAPE (source =(/34, 23, 12, 24, 14, 64, 235, 34, 23, 67, 233&
    , 124/), shape = (/4,4/))

  CALL getrf(x)

END PROGRAM test[/plain]

What can I do? I tried to understand the documentation but I did not find any further information!
cheers
0 Kudos
1 Reply
TimP
Honored Contributor III
279 Views
To make it simple, use only shared object MKL libraries. Don't try to mix static and shared.
To me also, the link advisor is confusing if you want to use shared objects. If you use static libraries, follow its advice more carefully.
Sorry if ifort doesn't complain about your RESHAPE source line. If you can't get a diagnostic with ifort -diag-enable sc, it would be worth a problem report.
0 Kudos
Reply