Reputation: 17527
I'm trying to test an ASP API controller which in turn calls out to a DLL which uses MathNet.Numerics.LinearAlgebra. I first call
MathNet.Numerics.Control.UseManaged();
However this call fails with the error
Exception thrown: 'System.NotSupportedException' in MathNet.Numerics.dll
Additional information: Cuda Native Provider not found.
Why would Cuda be required when I'm explicitly telling MathNet to use managed not native?
Upvotes: 0
Views: 483
Reputation: 4726
It actually does not fail, the exception is handled internally. You can just continue debugging.
The exception is not actually thrown within the UseManaged
call but internally at the static construction of the Control
class, the first time it is being accessed and initializes the default providers (which includes probing whether any of the known native providers are available). Of course, Cuda is not required when using the managed providers.
This is indeed a small usability issue when debugging with "break on all exceptions" enabled. We may be able to avoid throwing the exception with a small refactoring. Maybe we should open a GitHub issue to track this?
Upvotes: 1