- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I downloaded the mkl 7 beta and installed the library without any problem. Anyway in the directory /opt/intel/mkl70/lib/32/ no libmkl_p4.a has been created during the installation. This is a file which I need to compile my code. if a list the content of that directory I obtain:
libguide.a libmkl_p3.so
libguide.so libmkl_p4.so
libmkl_blacs.a libmkl_scalapack.a
libmkl_blacsCinit.a libmkl_scalapacktesting.a
libmkl_blacsCinit_gnu.a libmkl_scalapacktesting_gnu.a
libmkl_blacsF77init.a libmkl.so
libmkl_blacsF77init_gnu.a libmkl_solver.a
libmkl_def.so libmkl_vml_def.so
libmkl_ia32.a libmkl_vml_p3.so
libmkl_lapack32.so libmkl_vml_p4.so
libmkl_lapack64.so libvml.so
libmkl_lapack.a
Does anybody know how to solve this problem? Maybe I could (or should?) use something else instead of libmkl_p4.a which is already contained in my directory. Does anybody know what?
thanks in advance for any help.
Matteo
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Matteo,
libmkl_ia32.a contains all the processors specific optimizations and uses CPUID information to execute the correct code, chosen at run time, for your processor.
The shared objects, on the other hand, have specific versions associated with them. Note that the .a file is much larger than any of the processor-specific .so's.
Bruce
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thank you very much for the informations. Anyway I still cannot understand
what I have to do to ovrcome my difficulty. At present in my makefile I have:
LIBS= -lfftw_ /opt/intel/mkl70/lib/32/libmkl_lapack.a
/opt/intel/mkl70/lib/32/libmkl_p4.a -lpthread
and I also tryed to substitute libmkl_p4.a with libmkl_ia32.a but it gives several errors during compilation.Do you have any suggestion to solve the problem?
Thanks a lot again for your help,
Matteo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Matteo,
It would be helpful if you would capture the output from your build and submit it so I can look at it.
You should be able to do something like this for the linking process (I am assuming the use of the Intel compiler here)
CC = icc
LINK = icc
MKLDIR = /where ever it is/
$(LINK) -staticmyprog.o -L$(MKLDIR) -lmkl_ia32 -lmkl_lapack -lguide -lpthread
Bruce- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I followed your instruction and the situation improved (in my opinion). But I still have some problems.
Now, in my makefile, I have (I'm using ifc8):
LIBS= -lfftw_ -L/opt/intel/mkl70/lib/32 -lmkl_ia32 -lmkl_lapack -lguide
-lpthread
and when I try to compile I obtain the following error message:
/opt/intel/mkl70/lib/32/libmkl_lapack.a(dsptrd.o): In function `_MKL_LAPACK_dsptrd':
dsptrd.o(.text+0x178): undefined reference to `dspmv'
dsptrd.o(.text+0x26a): undefined reference to `dspr2'
dsptrd.o(.text+0x396): undefined reference to `dspmv'
dsptrd.o(.text+0x457): undefined reference to `dspr2'
/opt/intel/mkl70/lib/32/libmkl_lapack.a(zhptrd.o): In function `_MKL_LAPACK_zhptrd':
zhptrd.o(.text+0x1fb): undefined reference to `zhpmv'
zhptrd.o(.text+0x34d): undefined reference to `zhpr2'
zhptrd.o(.text+0x4e9): undefined reference to `zhpmv'
zhptrd.o(.text+0x626): undefined reference to `zhpr2/opt/intel/mkl70/lib/32/libmkl_lapack.a(dlarfg.o): In function `_MKL_LAPACK_dlarfg':
dlarfg.o(.text+0x32): undefined reference to `dnrm2'
dlarfg.o(.text+0x12c): undefined reference to `dnrm2'
/opt/intel/mkl70/lib/32/libmkl_lapack.a(dlarf.o): In function `_MKL_LAPACK_dlarf':
dlarf.o(.text+0x7e): undefined reference to `dgemv'
dlarf.o(.text+0xba): undefined reference to `dger'
dlarf.o(.text+0x10a): undefined reference to `dgemv'
dlarf.o(.text+0x14c): undefined reference to `dger'
/opt/intel/mkl70/lib/32/libmkl_lapack.a(zlarf.o): In function `_MKL_LAPACK_zlarf':zlarf.o(.text+0x86): undefined reference to `zgemv'
zlarf.o(.text+0xcc): undefined reference to `zgerc'
zlarf.o(.text+0x133): undefined reference to `zgemv'
zlarf.o(.text+0x179): undefined reference to `zgerc'
So it seems that a bunch of lapack routines are not included anymore in the library or, at least, have changed name.
Do you have any suggestion? Thank you very much for your very important help.
Matteo
'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The Linux linker is not a multipath linker so libraries that contain objects referenced by other functions must appear after the reference. I show here a simple make file to build one of the LAPACK examples: zhptrdx. First I will link in the order you used:
F77 = ifc
CC = icc
LINK = $(F77)
MKLDIR = /opt/intel/mkl61/lib/32
LPDIR = /opt/intel/mkl61/examples/lapack/lib
testmkl: zhptrdx.o
$(LINK) zhptrdx.o -L$(MKLDIR) -L$(LPDIR) -lmkl_lapack -lmkl_ia32a: -lpth
read -laux32_intel
zhptrdx.o: zhptrdx.f
$(F77) -c zhptrdx.f
Results:
[greer@faith lapacktest]$ make
ifc zhptrdx.o -L/opt/intel/mkl61/lib/32 -L/opt/intel/mkl61/examples/lapack/lib
lmkl_ia32 -lmkl_lapack -lpthread -laux32_intel
/opt/intel/mkl61/lib/32/libmkl_lapack.a(zhptrd.o): In function `_MKL_LAPACK_zhp
rd':
zhptrd.o(.text+0x2c): undefined reference to `_MKL_SERV_lsame'
zhptrd.o(.text+0x4a): undefined reference to `_MKL_SERV_lsame'
zhptrd.o(.text+0x1fb): undefined reference to `zhpmv'
zhptrd.o(.text+0x24b): undefined reference to `zdotc'
zhptrd.o(.text+0x2f6): undefined reference to `zaxpy'
zhptrd.o(.text+0x34d): undefined reference to `zhpr2'
zhptrd.o(.text+0x4e9): undefined reference to `zhpmv'
zhptrd.o(.text+0x525): undefined reference to `zdotc'
zhptrd.o(.text+0x5d8): undefined reference to `zaxpy'
zhptrd.o(.text+0x626): undefined reference to `zhpr2'
zhptrd.o(.text+0x692): undefined reference to `xerbla_'
/opt/intel/mkl61/lib/32/libmkl_lapack.a(zlarfg.o): In function `_MKL_LAPACK_zla
fg':
zlarfg.o(.text+0x34): undefined reference to `dznrm2'
zlarfg.o(.text+0x110): undefined reference to `zdscal'
zlarfg.o(.text+0x16a): undefined reference to `dznrm2'
zlarfg.o(.text+0x252): undefined reference to `zscal'
zlarfg.o(.text+0x424): undefined reference to `zscal'
/opt/intel/mkl61/lib/32/libmkl_lapack.a(dlamch.o): In function `_MKL_LAPACK_dla
ch':
dlamch.o(.text+0x199): undefined reference to `_MKL_SERV_lsame'
dlamch.o(.text+0x1b6): undefined reference to `_MKL_SERV_lsame'
dlamch.o(.text+0x1d4): undefined reference to `_MKL_SERV_lsame'
dlamch.o(.text+0x1f2): undefined reference to `_MKL_SERV_lsame'
dlamch.o(.text+0x210): undefined reference to `_MKL_SERV_lsame'
/opt/intel/mkl61/lib/32/libmkl_lapack.a(dlamch.o)(.text+0x22e): more undefined
eferences to `_MKL_SERV_lsame' follow
make: *** [testmkl] Error 1
Next the order of the lapack and BLAS portions of the library are interchanged:
CC = icc
LINK = $(F77)
MKLDIR = /opt/intel/mkl61/lib/32
LPDIR = /opt/intel/mkl61/examples/lapack/lib
testmkl: zhptrdx.o
$(LINK) zhptrdx.o -L$(MKLDIR) -L$(LPDIR) -lmkl_lapack -lmkl_ia32 -lpthre
ad -laux32_intel
zhptrdx.o: zhptrdx.f
$(F77) -c zhptrdx.f
With this result:
[greer@faith lapacktest]$ make
ifc zhptrdx.o -L/opt/intel/mkl61/lib/32 -L/opt/intel/mkl61/examples/lapack/lib
lmkl_lapack -lmkl_ia32 -lpthread -laux32_intel
[greer@faith lapacktest]$
Hope this helps.
Bruce
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thank you very much for your great help! Now it works perfectly.
I apologise for my inexperience.
thank you again for all!
Matteo

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page