Quantcast
Channel: Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
Viewing all articles
Browse latest Browse all 2652

Having trouble referencing/creating MKL.DLL in Visual C# Studio

$
0
0

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.


Viewing all articles
Browse latest Browse all 2652

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>