Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
6981 Discussions

How to compile the example C# wrapper on a 64bit server to call DGEMM

srlawton
Beginner
462 Views

Hi, I'm really stuck.

I have previously successfully compiled the Example C# wrapper to call DGemm on a 32 bit machine, creating MKL.DLL - C# wrapper which calls the Intel MKL DLLs

The following command worked just fine:

nmake ia32 mklroot="C:\\\\Program Files\\\\Intel\\\\MKL\\\\10.2.1.019"

I have now moved to an Intel 64 bit server and have installed Visual Studio 2008 SP1.

From a Visual Studio 2008 Command Prompt on the 64 bit machine (Windows 2003 Server)

Upon calling:

C:\\\\Temp\\\\Intel_MKL_C#_Examples>nmake ia64 MKLROOT="c:\\\\program files\\\\intel\\\\mkl\\\\10.2.0.014\\\\"

I get:

Microsoft Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation. All rights reserved.

Add path of the MKL libraries to the lib environment variable
set lib=%MKLROOT%\\\\ia64\\\\lib;%lib%
MKL entries for custom dll
Workaround for pardiso
Microsoft 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.

_fseeki64.c
Build MKL custom dll
nmake mkl.dll MACHINE=IA64 MKL_LIB="mkl_intel_lp64_dll.lib mkl_intel_thread_dll.lib mkl_core_dll.lib" MSLIB="msvcrt.lib user32.lib"

Microsoft Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation. All rights reserved.

link /DLL /MACHINE:IA64 /def:user.def _fseeki64.obj mkl_intel_lp64_dll.lib mkl_intel_thread_dll.lib mkl_core_dll.lib libiomp5md.lib msvcrt.lib user32.l
ib /out:mkl.dll
Microsoft Incremental Linker Version 9.00.30729.01
Copyright (C) Microsoft Corporation. All rights reserved.

_fseeki64.obj : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'IA64'
NMAKE : fatal error U1077: '"E:\\\\Program Files (x86)\\\\Microsoft Visual Studio 9.0\\\\VC\\\\BIN\\\\link.EXE"' : return code '0x458'
Stop.
NMAKE : fatal error U1077: '"E:\\\\Program Files (x86)\\\\Microsoft Visual Studio 9.0\\\\VC\\\\BIN\\\\nmake.EXE"' : return code '0x2'
Stop.

My paths seem Ok:

echo %lib%
"C:\\\\Program Files\\\\Intel\\\\MKL\\\\10.2.0.014\\\\ia64\\\\lib"

echo %MKLRoot%
"c:\\\\program files\\\\intel\\\\mkl\\\\10.2.0.014\\\\"

it seems to be failing at the end: module machine type 'X86' conflicts with target machine type 'IA64'.

Any ideas how I can get a 64 bit version of the DLL built ?

Thanks in advance

Steve

0 Kudos
1 Solution
Gennady_F_Intel
Moderator
462 Views

Stephen, i guess your target mashine type is not 'IA64' ( aka Itanium), but 'em64t' ( aka Xeon).

So, add path of the MKL libraries to the lib environment variableset lib=%MKLROOT%\\em64t\\lib;%lib%, instead of%MKLROOT%\\ia64\\lib;%lib%

--Gennady

View solution in original post

0 Kudos
3 Replies
Gennady_F_Intel
Moderator
463 Views

Stephen, i guess your target mashine type is not 'IA64' ( aka Itanium), but 'em64t' ( aka Xeon).

So, add path of the MKL libraries to the lib environment variableset lib=%MKLROOT%\\em64t\\lib;%lib%, instead of%MKLROOT%\\ia64\\lib;%lib%

--Gennady

0 Kudos
Gennady_F_Intel
Moderator
462 Views
Just for your information - please look at the KB article explains whatIA-32, Intel 64 and IA-64 Architecture means
0 Kudos
srlawton
Beginner
462 Views

Gennady, thanks.

I've made life difficult for myself today.

Advice to everyone, when installing Visual Studio 2008, select "Full" install not "Default", this gives you the x64 bit compiler + 64 bit V Studio Command Prompt. It may take a bit longer to install but atleast you will have the full suite.

Everything works once you have the right software installed.

regards,

Steve

0 Kudos
Reply