My attempt to compile an x64 version of an inherited code that contains OpenMP directives, contains a "USE OMP_LIB" statement, and links to routines in the MKL library keeps grabbing the 32-bit version of LIBIOMP5MD.DLL.
Details about my set-up
- x64-based computer running Windows 7 Professional
- MSVS 2008 Professional (Version 9.0.30729.1 SP)
- Intel Visual Fortran 11.0.075 (yes, I know, it's old...)
- MKL 10.2.1.019
I can get the 32-bit version of the code to compile and execute. And it generates the same answers (to within roundoff) as the pre-compiled version of the code.
My problem is that I have trouble with the 64-bit version of the code. It compiles and links to libraries successfully, but throws an error when executed. A look at the executable with Dependency Walker (64-bit version) shows that the x64 executable keeps trying to load the 32-bit (x86) version of LIBIOMP5MD.DLL. Some basics:
- I have verified that MSVS is configured for x64 compilation (Visual C++ -> X64 Compilers and Tools box is checked)
- Under Project -> Properties
- Fortran -> General -> Additional Include Directories:
C:\Program Files (x86)\Intel\Compiler\11.0\075\fortran\lib\intel64;C:\Program Files (x86)\Intel\Compiler\11.0\075\fortran\mkl\em64t\lib - Fortran -> Language -> Process OpenMP Directives: Generate Parallel Code (/Qopenmp)
- Fortran -> Libraries -> Runtime Library: Multithreaded
- Linker -> General -> Additional Library Directories:
C:\Program Files (x86)\Intel\Compiler\11.0\075\fortran\lib\intel64;C:\Program Files (x86)\Intel\Compiler\11.0\075\fortran\mkl\em64t\lib - Linker -> Input -> Additional Dependencies: mkl_intel_lp64.lib mkl_core.lib mkl_intel_thread.lib libiomp5md.lib
- Fortran -> General -> Additional Include Directories:
- I have verified that libipmp5md.lib (and the .dll) exist in C:\Program Files (x86)\Intel\Compiler\11.0\075\fortran\lib\intel64
- I have verified that omp_lib.mod exists in C:\Program Files (x86)\Intel\Compiler\11.0\075\fortran\include\intel64
Interestingly enough, if I change the Runtime Library to Multithread DLL and link to either the listed libraries or their _dll versions (for the first three), then Dependency Walker tells me that the compiler has grabbed the 32-bit version of all of the additional libraries.
I can't help but think that I have screwed up a setting somewhere that I keep grabbing the 32-bit version of libiomp5md.lib. Any help would be appreciated.
Thanks.
Bruce