I'm currently evaluating MKL for usage in a MinGW (64 bit) environment. I know that MinGW is not a compiler platform officially supported for MKL, but thought it would be worth a try with MKL for Windows because MinGW's gcc & linker produces just native windows object/lib file formats.
However, when I try to link a small program against MKL (following the link line advisor tool on this site)
I got many undefined references:
c:/mingw-w64-gcc4.7/bin/g++ -L"c:/Program Files (x86)\\Intel\\Composer XE 2011 SP1\\mkl\\lib\\intel64" -o tstmkl t
stmkl.o dgemm.o -lgomp -lwinmm -Wl,--subsystem,console -mwindows
Warning: .drectve `-defaultlib:"uuid.lib" ' unrecognized
libs/mkl/mkl_intel_thread.lib(dgemm_drv.obj):(.text[mkl_blas_dgemm]+0x4b5): undefined reference to `__kmpc_global_thread_num'
libs/mkl/mkl_intel_thread.lib(dgemm_drv.obj):(.text[mkl_blas_dgemm]+0x5d0): undefined reference to `__kmpc_ok_to_fork'
mkl_intel_lp64.lib(_dgemm_lp64.obj):(.text[dgemm]+0x159): undefined reference to `mkl_blas_dgemm'
I think part of the problem could be that MinGw links to the GNU OMP lib (-lgomp) which is probably incompatible to the OMP lib used by MKL ? (please confirm)
However, I also tried to use the non-threaded MKL and still got the undefined reference to mkl_blas_dgemm.
Interestingly, however not all references are undefined. I even managed to
succesfully link a very small MKL program using only some timer
functions so I still think it should be possible in principle ..
Therefore I would be very interestd if anyone has been able to succesfully use MKL with MinGW64
(The existing threads in the forum about this topic remained inconclusive)
Thanks in advance for any help and suggestions