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

lapack on Mac OSX: ld: can't locate file

david_farrelly
Beginner
439 Views
I've just installed the MKL libraries on a Mac Pro. When I do

ifort -o $1.o $1.f -L/Library/Frameworks/Intel_MKL.framework/Versions/9.0/lib/32 -libmkl_lapack -lmkl_ia32 -lguide -lpthread

I get the error

ld: can't locate file for: -libmkl_lapack

I've played around with the path and tried the various examples in the Intel "Getting Started Guide" and I always get the same thing. The compiler itself is working fine.

I'm sure it's something obvious but I'm pretty clueless on this type of stuff.

Do I need to reinstall Xcode?

Thanks,

David

0 Kudos
3 Replies
TimP
Honored Contributor III
439 Views

Normally, wesupply the full path for the mkl libraries, e.g. /opt/intel/mkl/9.0/....../libmkl_lapack.a. If you want the -l mechanism to work, you must set the MKL directory path with a preceding -L, or, possibly, make sure that you have run the mklvars path setting script. It's better, when using ifort or icc, to use the -openmp option to have the compiler take care implicitlyof libguide and libpthread. This would help avoid confusion about whether the libguide in MKL or ifort /lib directories will be in use.

I wouldn't say all of this is obvious; IMHO the MKL release notes cover the gcc situation OK but fall a little short on Fortran compilers.

I don't know anyone who uses Mac-32, but one would expect the -L/-l mechanism to work the same on all platforms.

Most of the people I work with avoid the default placement of MKL library directories, and some have requested a change to make more uniformity between Intel compiler and library tools, so I won't try to guess where your MKL libraries are.

0 Kudos
david_farrelly
Beginner
439 Views
Thanks - that was helpful - your post help clarify some stuff - much appreciated. Now it's up and running!


0 Kudos
inspectmaster
Beginner
439 Views
Yes, thanks! I also benefitted from your reply.

http://www.inspectmaster.com
0 Kudos
Reply