- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm a new user of ifort and MKL.
My build terminates with ..
ifort -o ha_sdafemsda_v1 ha_sdafemsda_v1.o phiq_sdafemsda_v1.o sdafemsda_v1.o sub1_sdafemsda_v1.o cmatr.o cmatr_iso.o fmin_baw.o sub2.o vlim.o epsc_multilay_isomatr.o epsc_multilay_obl.o bpa_getargfromfile.o octave_matfile.o ha_sdafemsda_v1_cmd.o -shared-intel -L"/opt/intel/Compiler/11.1/067/Frameworks/mkl" -lmkl_lapack -lguide -lpthread
ipo: warning #11011: unable to find -lmkl_lapack
ipo: warning #11020: unresolved _zgeev_
It wouldn't surprize me to find I'm doing several things wrong. If one does not exist, can someone give me a brief set of instructions for how to build a simple fortran program that calls lapack?
Link Copied
7 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
An important part of that would be to consult the link advisor in the right hand column of the forum header page. You appear to have copied some link options from a linux combinations of ifort and MKL of several years ago.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - tim18
An important part of that would be to consult the link advisor in the right hand column of the forum header page. You appear to have copied some link options from a linux combinations of ifort and MKL of several years ago.
I went to the link-line advisor at
and obtained the link options below.
-L$(MKLPATH) $(MKLPATH)/libmkl_solver_sequential.a -lmkl_intel -lmkl_sequential -lmkl_core -lpthread
My MKLROOT and MLKPATH are set as
MKLROOT = /Developer/opt/intel/Compiler/11.1/067/Frameworks/mkl
MKLPATH = $(MKLROOT)/lib/32
Now I see
ifort -o ha_sdafemsda_v1 ha_sdafemsda_v1.o phiq_sdafemsda_v1.o sdafemsda_v1.o sub1_sdafemsda_v1.o cmatr.o cmatr_iso.o fmin_baw.o sub2.o vlim.o epsc_multilay_isomatr.o epsc_multilay_obl.o bpa_getargfromfile.o octave_matfile.o ha_sdafemsda_v1_cmd.o -L/opt/intel/Compiler/11.1/067/Frameworks/mkl/lib/32 /opt/intel/Compiler/11.1/067/Frameworks/mkl/lib/32/libmkl_solver_sequential.a -lmkl_intel -lmkl_sequential -lmkl_core -lpthread
ipo: warning #11009: file format not recognized for /opt/intel/Compiler/11.1/067/Frameworks/mkl/lib/32/libmkl_intel.dylib
ipo: warning #11009: file format not recognized for /opt/intel/Compiler/11.1/067/Frameworks/mkl/lib/32/libmkl_sequential.dylib
ipo: warning #11009: file format not recognized for /opt/intel/Compiler/11.1/067/Frameworks/mkl/lib/32/libmkl_core.dylib
ipo: warning #11020: unresolved _zgeev_
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have you mixed 64-bit build and 32-bit libraries? The environment paths and -L should be set automatically when you have your compiler environment set, since you are using the MKL which comes with the compiler.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - tim18
Have you mixed 64-bit build and 32-bit libraries? The environment paths and -L should be set automatically when you have your compiler environment set, since you are using the MKL which comes with the compiler.
Your hypothesis makes sense to me. How might I modify what I'm doing to confirm?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You would simply set up the environment variables by sourceing the ifortvars compiler script. Then, you would leave out the -L specification, as the correct MKL library folder should be on the search path already.
By the way, a -L specification ends with a directory name, doesn't include any specific library. It would not work to search a library for itself or other libraries, which is what you specified.
By the way, a -L specification ends with a directory name, doesn't include any specific library. It would not work to search a library for itself or other libraries, which is what you specified.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - tim18
You would simply set up the environment variables by sourceing the ifortvars compiler script. Then, you would leave out the -L specification, as the correct MKL library folder should be on the search path already.
By the way, a -L specification ends with a directory name, doesn't include any specific library. It would not work to search a library for itself or other libraries, which is what you specified.
By the way, a -L specification ends with a directory name, doesn't include any specific library. It would not work to search a library for itself or other libraries, which is what you specified.
Are you sure my "-L" option is wrong?
-L/Developer/opt/intel/Compiler/11.1/067/Frameworks/mkl/lib/32
I tried running ifortvars ...
/opt/intel/Compiler/11.1/067/bin/ifortvars.sh ia32
... but my build still fails.
ifort -o ha_sdafemsda_v1 ha_sdafemsda_v1.o phiq_sdafemsda_v1.o sdafemsda_v1.o sub1_sdafemsda_v1.o cmatr.o cmatr_iso.o fmin_baw.o sub2.o vlim.o epsc_multilay_isomatr.o epsc_multilay_obl.o bpa_getargfromfile.o octave_matfile.o ha_sdafemsda_v1_cmd.o -L/Developer/opt/intel/Compiler/11.1/067/Frameworks/mkl/lib/32 /Developer/opt/intel/Compiler/11.1/067/Frameworks/mkl/lib/32/libmkl_solver_sequential.a -lmkl_intel -lmkl_sequential -lmkl_core -lpthreadipo: warning #11009: file format not recognized for /Developer/opt/intel/Compiler/11.1/067/Frameworks/mkl/lib/32/libmkl_intel.dylibipo: warning #11009: file format not recognized for /Developer/opt/intel/Compiler/11.1/067/Frameworks/mkl/lib/32/libmkl_sequential.dylibipo: warning #11009: file format not recognized for /Developer/opt/intel/Compiler/11.1/067/Frameworks/mkl/lib/32/libmkl_core.dylibipo: warning #11020: unresolved _zgeev_
When I remove the "-L" option the MKL libraries are not found.
ifort -o ha_sdafemsda_v1 ha_sdafemsda_v1.o phiq_sdafemsda_v1.o sdafemsda_v1.o sub1_sdafemsda_v1.o cmatr.o cmatr_iso.o fmin_baw.o sub2.o vlim.o epsc_multilay_isomatr.o epsc_multilay_obl.o bpa_getargfromfile.o octave_matfile.o ha_sdafemsda_v1_cmd.o /Developer/opt/intel/Compiler/11.1/067/Frameworks/mkl/lib/32/libmkl_solver_sequential.a -lmkl_intel -lmkl_sequential -lmkl_core -lpthreadipo: warning #11011: unable to find -lmkl_intelipo: warning #11011: unable to find -lmkl_sequentialipo: warning #11011: unable to find -lmkl_coreipo: warning #11020: unresolved _zgeev_
Is there some way I can confirm the ifortvars script is functioning for correctly?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It just occurred to me that I needed to source ifortvars.sh
source /opt/intel/Compiler/11.1/067/bin/ifortvars.sh ia32
After doing that, my program compiled and ran witiout problem ... both with and without the "-L" option.
Out of curiousity I did some speed comparisons. Using ifort and mkl_lapack, my program ran in 1.85 secs as compared to ifort with veclib which ran in 2.31 secs. Using gfortran with veclib resulted in an execution time of 2.86 secs.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page