Intel MKL + ATL DLL Register Error 32-bit vs 64-bit

Intel MKL + ATL DLL Register Error 32-bit vs 64-bit

Hello,

I am trying to write a dll (ALT/COM) in Visual Studio 2010 for use in Excel/VBA. My development system specs are as follows:

  • Operating System: Windows 7 (64-bit)
  • Development Environment: Visual Studio 2010
  • Intel MKL Version: 10.3.4

I should mention that even though my development computer is 64-bit, I am compiling (on purpose) a 32-bit dll.

Everything works fine on my development box (I can compile, register, reference and use the dll in Excel/VBA), but when I try register the dll on another user's computer (Windows 7, 32-bit), regsvr32 gives me the error 'The module "myname.dll" failed to load'. I am running regsvr32 from an elevated command promp and I have installed the VC++ 2010 runtime libraries on the user's computer. I have also copied the Intel MKL redist directory ("C:\\Program Files\\Intel\\ComposerXE-2011\\redist") on the user's computer and added "C:\\Program Files (x86)\\Intel\\ComposerXE-2011\\redist\\ia32" to the system's PATH environment variable. Thinking that I may have missed a reference, I ran "Dependancy Walker" on my dll and saw that it is referencing the 64-bit version of MKL_INTEL_THREAD.DLL and MKL_CORE.DLL. I have tried to find in Visual Studio 2010 a way to reference the 32-bit versions, but I don't see any options to do so. As I said, I am already compiling my dll as 32-bit (it says Win32 in Visual Studio) and I don't know what else to do. Does anyone have any ideas?

publicaciones de 7 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.

If you are following the advice of the link advisor at the top of this forum for 32-bit link, and you still get apparent dependencies on the 64-bit MKL libraries, I suppose you could try hiding the 64-bit part of the MKL installation (move it to a renamed folder, zip it, ....) and see what happens with the build.
I'm not clear from your description whether you are setting paths for 32-bit MKL libraries in your Visual Studio additional dependencies.
If you continue to have difficulty, you might consider submitting a case including at least the files involved in your link step (should not need to include source) under your support account at premier.intel.com.

Hello Tim,Thanks for your reply and for your suggestion...it worked! I renamed the "Intel64" folder and recompiled my 32-bit DLL...Visual Studio used the 32-bit versions of the MKL DLLs. To answer your question, I did not explicitly set the paths for the MKL libraries in Visual Studio. I am using Visual Studio 2010 with the "built-in" MKL option (Project > Properties > Configuration Properties > Intel Performance Libraries > Use MKL > Parallel). I assume that this "built-in" option sets the paths to the MKL libraries behind the scenes, but there is no option for 32- vs 64-bit. Of course, when I used Visual Studio 2008, I had no choice but to set the paths manually and I had no issues. Perhaps the Visual Studio 2010 integration of the MKL libraries defaults to the type (32- or 64-bit) of operating system. If this is the case, I'd recommend that an additional option be added to allow the user to choose 32- or 64-bit libraries.Cheers!

>>...when I try register the dll on another user's computer (Windows 7, 32-bit), regsvr32 gives me the error 'The module
>>"myname.dll" failed to load'...
>>...
>>...I ran "Dependancy Walker" on my dll and saw that it is referencing the 64-bit version of MKL_INTEL_THREAD.DLL and
>>MKL_CORE.DLL. I have tried to find in Visual Studio 2010 a way to reference the 32-bit versions, but I don't see any
>>options to do so.

I consider it as a project configuration issue because 64-bit DLLs are referenced for the 32-bit application. You could try to use a different approach, like:
...
#if defined ( _MKL_SUPPORT_ )
#include "mkl.h"
#if ( defined ( _M_IX86 ) )
#pragma comment ( lib, "[ a path to 32-bit folder ]\mkl_rt.lib" )
#pragma comment ( lib, "[ a path to 32-bit folder ]\mkl_core.lib" )
#endif
#if ( defined ( _M_X64 ) || defined ( _M_AMD64 ) || defined ( _M_IA64 ) )
#pragma comment ( lib, "[ a path to 64-bit folder ]\mkl_rt.lib" )
#pragma comment ( lib, "[ a path to 64-bit folder ]\mkl_core.lib" )
#endif
#endif
...

Also, you need to verify Visual Studio settings for Directories, like Include and Libraries.

This is a follow up: Brian, did you resolve the problem?

Hello Sergey,

Thanks for following-up on my question.  I have not tried your solution as I have moved on to other development projects (I had originally asked the question in 2011), but I agree with your assertion that it is indeed a configuration issue.  I was able to get things working as indicated in my comment on Thu, 06/02/2011 - 07:28----granted, this was not a very elegant way of resolving my issue. =)

Best regards,

Brian

Regarding your solution: It is OK if it worked! Thanks for the confirmation that the problem is resolved.

Inicie sesión para dejar un comentario.