I am having a terrible time setting up Intel's Math Kernel for Visual C#. I have downloaded and ran the install file with no luck of accessing the Math Kernel Functions inside of the mkl.dll file. When I implement one of mkl.dll functions a BadImageFormatException is thrown. Online documentations instructs you to go through the visual studio command prompt and call:
"mklvars.bat" ia32 nmake ia32
When I run this throught the shell mklvars.bat ia32 is accepted and nmake ia32 throws and it throws an error within the command prompt.
I tried using the MKL_Link_Tool.exe with the following result and still receive the bad image exception:
Code:
class Program { static class MKL { [DllImport("mkl.dll", CallingConvention = CallingConvention.Cdecl)] internal static extern int DftiCreateDescriptor(ref IntPtr desc, int precision, int domain, int dimention, int length); } [STAThread] static void Main(string[] args) { IntPtr pnt = new IntPtr(32); try { Console.Write(MKL.DftiCreateDescriptor(ref pnt, 1, 1, 10, 10) + ""); } catch (BadImageFormatException ex) { Debug.WriteLine(ex.Message); } } } }
I can't figure out how to use Intel's Math Kernel Library with Visual Studio... Can anyone help me set up MKL (escpicially the BLAS and LA packages) Thank you.