mathnet-numerics icon indicating copy to clipboard operation
mathnet-numerics copied to clipboard

I can't get native linux MKL provider to work with MathNet v5

Open atlemann opened this issue 3 years ago • 2 comments

The release notes says something about making it better for x-plat, but I'm unable to make native providers work in linux at all. Is anyone else able to?

Should it be possible to include both MathNet.Numerics.MKL.Linux-x64 and MathNet.Numerics.MKL.Win-x64 in my application now so I can run it on both platforms?

atlemann avatar Sep 01 '22 07:09 atlemann

I have the same problem. When trying to call LinearAlgebraControl.UseNativeMKL() on Linux I get System.NotSupportedException: Native Provider Probing failed to resolve creator. Did you make this work @atlemann?

petterton avatar Feb 07 '23 09:02 petterton

No, unfortunately not. The actual application has been running mostly in a Windows environment due to other reasons, although I develop on Linux. I didn't have time to test too much so I just gave up. But we want the app to run on linux as well, so I'll have to look into it again some time. It's a bit annoying how it works in MathNet, since AFAIK you cannot have both linux and windows native libs available, since the files have the same name. At least before MathNet v5.

We're building our own custom native Intel.MKL to get some other functions and we pack both windows and linux artifacts in the same NuGet package. If you call your artifacts "MyCoolLib.dll" and "libMyCoolLib.so", you can use DllImport("MyCoolLib") and .NET will find the correct file for each platform itself. Last time I checked it seemed MathNet was using a very complicated way of finding these libs.

atlemann avatar Feb 17 '23 10:02 atlemann