- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To Whom It May Concern,
I have a problem with the MKL library. I cannot compile my file and it seems that the MKL is not properly linked. I followed the steps to include the additinal dependencies: MKL\\bin and the MKL\\library\\intel64 files but I get the following error message:
Error 1 error LNK2019: unresolved external symbol _DGESV_MKL95 referenced in function _HP_MATRIX tools.obj
Error 2 error LNK2019: unresolved external symbol _DGESV1_MKL95 referenced in function _NEWTON tools.obj
Error 3 error LNK2019: unresolved external symbol _ZGGES_MKL95 referenced in function _SCHUR_SOLVE_OLD tools.obj
Error 4 error LNK2019: unresolved external symbol _ZGESV_MKL95 referenced in function _SCHUR_SOLVE_OLD tools.obj
Error 5 error LNK2019: unresolved external symbol _DGGES_MKL95 referenced in function _SCHUR_SECOND_ORDER_OLD tools.obj
Error 6 error LNK2019: unresolved external symbol _DTGSYL_MKL95 referenced in function _SCHUR_SECOND_ORDER_OLD tools.obj
Error 7 error LNK2019: unresolved external symbol _DGETRF_MKL95 referenced in function _DET tools.obj
Error 8 error LNK2019: unresolved external symbol _DSYEV_MKL95 referenced in function _NEWTON_DFP tools.obj
I am running the Intel fortran 10.0. with the MKL 10.3. on the 64 bit machine. I used the following linker settings:
mkl_lapack95_ilp64.lib mkl_intel_ilp64_dll.lib mkl_sequential_dll.lib mkl_core_dll.lib
I appreciate any help!!!!!!
Best,
steingre
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
However, I do not understand what I should correct.
I am runningthe code on a Windows 64 bit machine and I use the following command to access the lapack
use mkl95_lapack, only : GETRF
call GETRF(a, IPIV=ipiv, INFO=info)
I think that this is correct since it works on my 32 bit machine.
You are right in that I have troubles running the code on a 64 bit machine.
Now, you mention that I link 32 objects with a 64 bit library. So how can I change my 32 bit libraries to 64 bit libraries? What do I do wrong?
i tried to put the 32 bit links to access 32 bit librariesbut it won't work.
I appreciate your help!!!
Best,
steingre
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is an example that someone posted to this forum some time ago.
[fortran]program invert use mkl95_lapack,only : getrf,getri implicit none integer, parameter :: N = 7 integer :: i,j real, dimension(N,N) :: A = & (/ 1.0658, -0.6313, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, & -0.6313, 4.2632, -1.8940, 0.0000, 0.0000, 0.0000, 0.0000, & 0.0000, -1.8940, 8.5265, -3.1567, 0.0000, 0.0000, 0.0000, & 0.0000, 0.0000, -3.1567, 23.2603, -3.6892, 0.0000, 0.0000, & 0.0000, 0.0000, 0.0000, -3.6892, 37.5680 , -4.8192, 0.0000, & 0.0000, 0.0000, 0.0000, 0.0000, -4.8192, 47.5467, -5.9492, & 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, -5.9492, 57.5255 /) integer, dimension(N) :: piv integer :: info call getrf( a, piv, info ) call getri( a, piv, info ) write(*,10)((a(i,j),j=1,N),i=1,N) stop 10 format(1x,7F12.6) end program invert [/fortran]Compiling:
[bash]s:lang> ifort /Qmkl getrf.f90 mkl_lapack95_lp64.lib [/bash]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Then, I did the following: Select Configuration Properties > Fortran > General. In the right-hand part of the window, select Additional Include Directories > C:\Program Files\Intel\Composer XE 2011 SP1\mkl include Select Configuration Properties > Fortran > Preprocessor. In the right-hand part of the window, select Preprocess Source File > Yes (default is No). Select Configuration Properties > Linker > General. In the right-hand part of the window, select Additional Library Directories > C:\Program Files\Intel\Composer XE 2011 SP1\mkl\lib\intel64 Select Configuration Properties > Linker > Input. In the right-hand part of the window, select Additional Dependencies and type the libraries required.I put the following link:
|
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you use libraries named *ilp*.lib, you need to compile your sources with INTEGER*8 or with the -i8 option.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Error1 error LNK2019: unresolved external symbol for_array_copy_in referenced in function ZGGES_F95mkl_lapack95_ilp64.lib
Error2 error LNK2001: unresolved external symbol for_array_copy_inmkl_lapack95_ilp64.lib
Error3 error LNK2001: unresolved external symbol for_array_copy_inmkl_lapack95_ilp64.lib
Error4 error LNK2019: unresolved external symbol for_array_copy_out referenced in function ZGGES_F95mkl_lapack95_ilp64.lib
Error5 error LNK2001: unresolved external symbol for_array_copy_outmkl_lapack95_ilp64.lib
Error6 error LNK2001: unresolved external symbol for_array_copy_outmkl_lapack95_ilp64.lib
Error7 fatal error LNK1120: 2 unresolved externalsx64\Debug\steingre.exe
Do you have any idea what I am doing wrong now?
I also will try the sample you gave me and see what I get. Let you know soon!
Best,
steingre
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I ran the sample you gave me and it works!
But I do not know why this one works and the other not????
Best,
steingre
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
------ Build started: Project: CG2, Configuration: Debug|x64 ------
Linking...
Link /OUT:"x64\Debug\CG2.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:\Program Files (x86)\Intel\Composer XE 2011 SP1\mkl\lib\intel64" /MANIFEST /MANIFESTFILE:"C:\Fortran\CG\CG2\CG2\x64\debug\cg2.exe.intermediate.manifest" /DEBUG /PDB:"C:\Fortran\CaG\CG2\CG2\x64\debug\cg2.pdb" /SUBSYSTEM:CONSOLE mkl_lapack95_lp64.lib mkl_intel_lp64_dll.lib mkl_sequential_dll.lib mkl_core_dll.lib "x64\Debug\nlpqlp.obj" "x64\Debug\ql.obj" "x64\Debug\nlpqly.obj" "x64\Debug\numerical_recipes.obj" "x64\Debug\lapack.obj" "x64\Debug\tools.obj" "x64\Debug\model3.obj"
Link: executing 'link'
mkl_lapack95_lp64.lib(zgges.obj) : error LNK2019: unresolved external symbol for_array_copy_in referenced in function ZGGES_F95
mkl_lapack95_lp64.lib(dgges.obj) : error LNK2001: unresolved external symbol for_array_copy_in
mkl_lapack95_lp64.lib(dtgsyl.obj) : error LNK2001: unresolved external symbol for_array_copy_in
mkl_lapack95_lp64.lib(zgges.obj) : error LNK2019: unresolved external symbol for_array_copy_out referenced in function ZGGES_F95
mkl_lapack95_lp64.lib(dgges.obj) : error LNK2001: unresolved external symbol for_array_copy_out
mkl_lapack95_lp64.lib(dtgsyl.obj) : error LNK2001: unresolved external symbol for_array_copy_out
x64\Debug\CG2.exe : fatal error LNK1120: 2 unresolved externals
CG2 - 7 error(s), 0 warning(s)
Can you tell me what should I correct? What do I miss here?
It is bizarre that the example you sent works and my code not...
Again, I appreciate really your help!
Best,
Steingre
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If that does not work, please add the /verbose option to the linker command line, REBUILD, and report the linker output as you did above.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To my knowledge, the only information given on this subject is that the run-time libraries are tested for compatibility with the previous major compiler release. That would imply that the latest MKL would work with the 11.0 compiler, if you updated the libraries to those supplied with the 12.0 compiler. The 12.0 libraries would not have been tested with the 10.0 compiler, but it is possible they may work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You have to decide whether to upgrade the compiler, or to download an older version of MKL. Note that the 10.0 version of MKL probably did not come with pre-built Lapack95 and Blas95 libraries, in which case the source codes and a makefile were provided from which you would need to build the libraries yourself.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page