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

Problems in linking to MKL

newguy
Beginner
785 Views
I have recently downloaded Intel's MKL and installed it. But I am having problems in trying to link to the lapack32 library. Any help is appriciated. Here is sample of what I did. ifc -Vaxlib -L/opt/intel/mkl60/lib/32/ -lmkl_lapack32 -lpthreads -openmp variablesize.f 9 Lines Compiled /usr/lib/crt1.o:In function '_start':*** /usr/lib/crt1.o(.text+0x18): unidentified reference to 'main' /opt/intel/mkl60/lib32/libmkl_lapack32.so: undefined reference to 'chemm' /opt/intel/mkl60/lib32/libmkl_lapack32.so: undefined reference to 'sspr' /opt/intel/mkl60/lib32/libmkl_lapack32.so: undefined reference to 'strsm' /opt/intel/mkl60/lib32/libmkl_lapack32.so: undefined reference to 'ctrmm' etc, etc The above bolded errors I always get, I think this is due to not linking to the proper library The other errors are occuring when I try to link to lapack32 library in the mkl package. I've read through a lot of support material but to no avail any help is appriciated. Thanks
0 Kudos
2 Replies
cp_jain
Beginner
785 Views
Hi AFAIK just linking lapack32.so is not enough. You should also link libmkl_def.so or libmkl_p4.so Please read MKL's documentation to get more information on this. Regarding usr/lib/crt1.o:In function '_start':*** /usr/lib/crt1.o(.text+0x18): unidentified reference to 'main' error - you will get this error if you try to create an executable with file without the main function. Use -c option to just compile the file (without main function). cp
0 Kudos
newguy
Beginner
784 Views
Thanks my Desi friend, it works now.
0 Kudos
Reply