You may require the libguide from MKL (newer than the one from ifort 9.1) to find a version which is compatible both with ifort 9 and with MKL 10.1. If you don't want MKL to start its own threads or have problems with OpenMP run time link compatibility, use the mkl_sequential library in place of mkl_intel_thread. Then you should not have a problem with the libguide chosen by ifort 9.1. These problems should be alleviated by ifort professional (all recent versions), where the current MKL is included in ifort.
Hi tim18!
Thank you for the response but I still get the same result using the mkl_sequential library. I must make a static build (my mexfunction dll will be on computers that do not have MSVS and Intel compilers and MKL) and require OpenMP for program speed. I am also limited to using the Intel Visual Fortran version 9.1 because of Matlab restrictions. I have tried using MKL 9.1.027 using the following library list,
> mex foo.f90 'c:\program files\intel\mkl\9.1.027\ia32\lib\fftw3xf_ms.lib' 'c:\...\lib\libguide40.lib' 'c:\...\lib\mkl_c.lib' 'c:\...\lib\mkl_ia32.lib'
but this crashes Matlab when I run the dll.
So this is where I stand:
1) if I use MKL 9.1.027 I can not make either a static or shared version of my code. Both will crash Matlab.
2) if I use MKL 10.1.3.028 I can make a static build without OpenMP and get correct output data. If I compile using /Qopenmp, I get incorrect output (but does not crash Matlab)
Do I have any options left?
Thanks again for your help.
Sincerely,
David