<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Intel MKL 10.3 with C# 32-bit and 64-bit in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-10-3-with-C-32-bit-and-64-bit/m-p/798252#M2841</link>
    <description>I ran into similar problems when I used the makefile inside &lt;A&gt;Intel_MKL_C#_Examples.zip. The build log that you showed above indicates that a custom DLL was built. That is not needed with MKL 10.3. Make sure that you use the makefile and examples inside &lt;/A&gt;&lt;A&gt;Intel_MKL_C#_Examples&lt;B&gt;_02&lt;/B&gt;.zip.&lt;BR /&gt;&lt;BR /&gt;I was able to build and run the examples in 32-bit and 64-bit environments under Windows 7 X64 using the MS C 16.0 compilers and the MKL bundled with Composer XE2011, compiler version 12.1.3 (20120130).&lt;/A&gt;</description>
    <pubDate>Sat, 03 Mar 2012 17:14:01 GMT</pubDate>
    <dc:creator>mecej4</dc:creator>
    <dc:date>2012-03-03T17:14:01Z</dc:date>
    <item>
      <title>Intel MKL 10.3 with C# 32-bit and 64-bit</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-10-3-with-C-32-bit-and-64-bit/m-p/798248#M2837</link>
      <description>&lt;BR /&gt;I am using Intel MKL 10.3 with Visual Studio 2010 and Windows 7 (64-bit). I am trying to use the MKL functions in my C# code. I need to create 32-bit and 64-bit versions of my C# program.&lt;BR /&gt;
I followed the instructions under the heading &lt;B&gt;Building the Examples with Intel&lt;/B&gt;&lt;B&gt;MKL 10.3&lt;/B&gt;at&lt;A href="http://software.intel.com/en-us/articles/using-intel-mkl-in-your-c-program/"&gt;http://software.intel.com/en-us/articles/using-intel-mkl-in-your-c-program&lt;/A&gt;. I was able to successfully execute the command &lt;CODE&gt;nmake intel64 MKLREDIST="c:\\Program Files\\Intel\\ComposerXE-2011\\redist"&lt;/CODE&gt; from both the &lt;B&gt;Visual Studio Command Prompt (2010)&lt;/B&gt; and &lt;B&gt;Visual Studio x64 Win64 Command Prompt (2010)&lt;/B&gt;, however, I when I tried to execute &lt;CODE&gt;nmake ia32 MKLREDIST="c:\\Program Files\\Intel\\ComposerXE-2011\\redist"&lt;/CODE&gt; from either prompt...I got the following error:
&lt;BR /&gt;
&lt;CODE&gt;
C:\\Program Files (x86)\\Intel\\ComposerXE-2011\\mkl\\tools\\builder&amp;gt;nmake ia32 MKLREDIST="C:\\Program Files (x86)\\Intel\\ComposerXE-2011\\redist"

Microsoft  Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation.  All rights reserved.

        set Lib=..\\..\\lib\\ia32;%Lib%;;..\\..\\..\\compiler\\lib\\ia32
        type functions_list &amp;gt;&amp;gt; user_def_file.def
Microsoft  Library Manager Version 10.00.40219.01
Copyright (C) Microsoft Corporation.  All rights reserved.

Microsoft  Library Manager Version 10.00.40219.01
Copyright (C) Microsoft Corporation.  All rights reserved.

        link /DLL /MANIFEST /MACHINE:IX86 /NODEFAULTLIB  /def:user_def_file.def  .\\temp_cdll\\*.obj   mkl_intel_c.lib mkl_intel_thread.lib mkl_core.lib  libiomp5md.lib  msvcrt.lib kernel32.lib user32.lib bufferoverflowu.lib /out:mkl_custom.dll
Microsoft  Incremental Linker Version 10.00.40219.01
Copyright (C) Microsoft Corporation.  All rights reserved.

LINK : fatal error LNK1181: cannot open input file 'bufferoverflowu.lib'
NMAKE : fatal error U1077: '"c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\BIN\\link.EXE"' : return code '0x49d'
Stop.
&lt;/CODE&gt;
&lt;BR /&gt;
The strange thing about this whole situation is that I am able to compile and execute a 32-bit version of my C# program without any issues; however, when I compile and run the 64-bit version, I get the following &lt;B&gt;run-time&lt;/B&gt; error:&lt;BR /&gt;

&lt;CODE&gt;
The program '[6568] IntelMKL.vshost.exe: Managed (v4.0.30319)' has exited with code 1 (0x1).
&lt;/CODE&gt;
&lt;BR /&gt;
Can anyone help me figure out what I need to do to use Intel MKL 10.3 with 32- and 64-bit versions of my C# program?  Thanks!</description>
      <pubDate>Thu, 01 Mar 2012 18:44:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-10-3-with-C-32-bit-and-64-bit/m-p/798248#M2837</guid>
      <dc:creator>Mullins__Brian</dc:creator>
      <dc:date>2012-03-01T18:44:37Z</dc:date>
    </item>
    <item>
      <title>Intel MKL 10.3 with C# 32-bit and 64-bit</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-10-3-with-C-32-bit-and-64-bit/m-p/798249#M2838</link>
      <description>1)&lt;DIV id="_mcePaste"&gt;##------------------------------------------------------------------------------&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;## if you get the message:&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;##  LINK : fatal error LNK1181: cannot open input file 'bufferoverflowu.lib'&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;##------------------------------------------------------------------------------&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;## add option 'buf_lib=' or comment the line below&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;buf_lib = bufferoverflowu.lib&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;##------------------------------------------------------------------------------## if you get the message:##  LINK : fatal error LNK1181: cannot open input file 'bufferoverflowu.lib'##------------------------------------------------------------------------------## add option 'buf_lib=' or comment the line belowbuf_lib = bufferoverflowu.lib</description>
      <pubDate>Fri, 02 Mar 2012 04:06:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-10-3-with-C-32-bit-and-64-bit/m-p/798249#M2838</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2012-03-02T04:06:56Z</dc:date>
    </item>
    <item>
      <title>Intel MKL 10.3 with C# 32-bit and 64-bit</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-10-3-with-C-32-bit-and-64-bit/m-p/798250#M2839</link>
      <description>see also this KB describing &lt;A href="http://software.intel.com/en-us/articles/using-intel-mkl-in-your-c-program/"&gt;using mkl with .net environment&lt;/A&gt;</description>
      <pubDate>Fri, 02 Mar 2012 04:12:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-10-3-with-C-32-bit-and-64-bit/m-p/798250#M2839</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2012-03-02T04:12:39Z</dc:date>
    </item>
    <item>
      <title>Intel MKL 10.3 with C# 32-bit and 64-bit</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-10-3-with-C-32-bit-and-64-bit/m-p/798251#M2840</link>
      <description>&lt;DIV&gt;Hi Gennady,&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;Thank you very much for responding to my question. I have been referring to the link that you provided...unless I'm missing something, it doesn't address the problems that I'm experiencing. I just tried to re-run the "ia32" version of the nmake command today and now I'm getting a different error:&lt;/DIV&gt;
&lt;CODE&gt;
C:\Users\poibri01\Desktop\Intel_MKL_C#_Examples_03&amp;gt;nmake ia32 MKLREDIST="C:\Program Files (x86)\Intel\ComposerXE-2011\redist"

Microsoft  Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation.  All rights reserved.

Add path of the MKL redistributable to the path environment variable
        set path=%MKLREDIST%\ia32\mkl;%MKLREDIST%\ia32\compiler;%path%
Build and run examples
        nmake /a dgemm.exe dgeev.exe dfti_d1.exe pardiso.exe vddiv.exe mkl_dcscmv.exe

Microsoft  Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation.  All rights reserved.

Compile dgemm.cs
        csc  .\dgemm.cs
Microsoft  Visual C# 2010 Compiler version 4.0.30319.1
Copyright (C) Microsoft Corporation. All rights reserved.

Run dgemm example
        dgemm.exe
MKL cblas_dgemm example

alpha=1
beta=-1
Matrix A
        1       2       3
        4       5       6
Matrix B
        0       1       0       1
        1       0       0       1
        1       0       1       0
Initial C
        5       1       3       3
        11      4       6       9

Unhandled Exception: System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
   at mkl.CBLASNative.cblas_dgemm(Int32 Order, Int32 TransA, Int32 TransB, Int32 M, Int32 N, Int32 K, Double alpha, Double[] A, Int32 lda, Double[] B, Int32 ldb, Double beta, Double[] C, Int32 ldc)
   at test_dgemm.Main(String[] args)
NMAKE : fatal error U1077: '.\dgemm.exe' : return code '0xe0434352'
Stop.
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\amd64\nmake.EXE"' : return code '0x2'
Stop.
&lt;/CODE&gt;
&lt;DIV&gt;&lt;BR /&gt;
Just to summarize my situation:
&lt;/DIV&gt;&lt;BR /&gt;
&lt;OL&gt;
&lt;LI&gt;I am using Visual Studio 2010 with Intel MKL 10.3 and Windows 7 (64-bit).&lt;/LI&gt;
&lt;LI&gt;The following paths are in my PATH environment variable:&lt;BR /&gt;&lt;CODE&gt;C:\Program Files (x86)\Intel\ComposerXE-2011\redist\ia32;
C:\Program Files (x86)\Intel\ComposerXE-2011\redist\intel64;
C:\Program Files (x86)\Intel\ComposerXE-2011\redist\ia32\compiler;
C:\Program Files (x86)\Intel\ComposerXE-2011\redist\intel64\compiler;
C:\Program Files (x86)\Intel\ComposerXE-2011\mkl\lib\ia32;
C:\Program Files (x86)\Intel\ComposerXE-2011\mkl\lib\intel64&lt;/CODE&gt;&lt;/LI&gt;
&lt;LI&gt;I am able to run the "intel64" version of the nmake command from both the "Visual Studio Command Prompt (2010)" and the "Visual Studio x64 Win64 Command Prompt (2010)":&lt;BR /&gt;&lt;CODE&gt;nmake intel64 MKLREDIST="C:\Program Files (x86)\Intel\ComposerXE-2011\redist"&lt;/CODE&gt;&lt;/LI&gt;
&lt;LI&gt;I am &lt;B&gt;NOT&lt;/B&gt; able to run the "ia32" version of the nmake command from either command prompt:&lt;BR /&gt;&lt;CODE&gt;nmake ia32 MKLREDIST="C:\Program Files (x86)\Intel\ComposerXE-2011\redist"&lt;/CODE&gt;&lt;/LI&gt;
&lt;LI&gt;I am able to compile and run a &lt;B&gt;32-bit&lt;/B&gt; version of my C# program using the MKL functions.&lt;/LI&gt;
&lt;LI&gt;I get a runtime error when I run a &lt;B&gt;64-bit&lt;/B&gt; version of my C# program:&lt;BR /&gt;&lt;CODE&gt;The program '[3640] IntelMKL.vshost.exe: Managed (v4.0.30319)' has exited with code 1 (0x1).&lt;/CODE&gt;&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Fri, 02 Mar 2012 15:52:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-10-3-with-C-32-bit-and-64-bit/m-p/798251#M2840</guid>
      <dc:creator>Mullins__Brian</dc:creator>
      <dc:date>2012-03-02T15:52:51Z</dc:date>
    </item>
    <item>
      <title>Intel MKL 10.3 with C# 32-bit and 64-bit</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-10-3-with-C-32-bit-and-64-bit/m-p/798252#M2841</link>
      <description>I ran into similar problems when I used the makefile inside &lt;A&gt;Intel_MKL_C#_Examples.zip. The build log that you showed above indicates that a custom DLL was built. That is not needed with MKL 10.3. Make sure that you use the makefile and examples inside &lt;/A&gt;&lt;A&gt;Intel_MKL_C#_Examples&lt;B&gt;_02&lt;/B&gt;.zip.&lt;BR /&gt;&lt;BR /&gt;I was able to build and run the examples in 32-bit and 64-bit environments under Windows 7 X64 using the MS C 16.0 compilers and the MKL bundled with Composer XE2011, compiler version 12.1.3 (20120130).&lt;/A&gt;</description>
      <pubDate>Sat, 03 Mar 2012 17:14:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-10-3-with-C-32-bit-and-64-bit/m-p/798252#M2841</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2012-03-03T17:14:01Z</dc:date>
    </item>
    <item>
      <title>Intel MKL 10.3 with C# 32-bit and 64-bit</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-10-3-with-C-32-bit-and-64-bit/m-p/798253#M2842</link>
      <description>&lt;H2&gt;&lt;SPAN style="font-weight: normal;"&gt;@mecej4: Thank you very much for your help...after following your suggestion to use the makefile inside "Intel_MKL_C#_Examples_02.zip" I was able to successfully compile and run both versions (32-bit and 64-bit) of my C# program. This is a huge relief...I spent hours trying to get this to work.Again, I really appreciate all your time and help. I wish you the very best! =)&lt;/SPAN&gt;&lt;/H2&gt;</description>
      <pubDate>Sat, 03 Mar 2012 19:54:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-10-3-with-C-32-bit-and-64-bit/m-p/798253#M2842</guid>
      <dc:creator>Mullins__Brian</dc:creator>
      <dc:date>2012-03-03T19:54:18Z</dc:date>
    </item>
  </channel>
</rss>

