I'm trying to use the Mkl native provider from mathdotnet with mono in Linux.
I'm using monodevelop and installed MathNet.Numerics and both MathNet.Numerics.MKL.Linux-x64 and -x86 packages via the build in NuGet package manager.
When I try this code, i get System.NotSupportedException: MKL Native Provider Not Found.
using System;
using MathNet.Numerics.LinearAlgebra;
using MathNet.Numerics.LinearAlgebra.Double;
using MathNet.Numerics;
namespace mdeveloptest
{
class MainClass
{
public static void Main (string[] args)
{
Control.UseNativeMKL ();
Matrix<double> a = DenseMatrix.OfArray(new double[,] { {1,2,3}, {4,5,6}, {7,8,9}});
Matrix<double> b = DenseMatrix.OfArray(new double[,] { {1,2,3}, {4,5,6}, {7,8,9}});
Console.WriteLine (a*b);
}
}
}
The MKL-packages provide a libiomp5.so and a MathNet.Numerics.MKL.dll file. In windows it was enough to copy these files to the output directory but it doesn't seem to be enough in Linux.
I'm also not sure if I need the x64 or x86 package or if mono somehow can choose the right one by itself.