mathnet / mathnet-numerics-native

Native Providers for Math.NET Numerics (obsolete, now included in mainline repo)
11 stars 12 forks source link

Exception for missing CUDA dll #18

Open OsirisTerje opened 8 years ago

OsirisTerje commented 8 years ago

I am using Mathnet.Numerics in a library, and the app that uses this package, also includes the mathnet.numerics. When I try to debug the app, I get a

Exception thrown: 'System.DllNotFoundException' in MathNet.Numerics.dll

Additional information: Unable to load DLL 'MathNet.Numerics.CUDA.dll': The specified module could not be found.

There is no CUDA dll in the package, and I assume this is a native provider, but I have not enabled anything. So, why is this coming up? How do I disable this?

cdrnet commented 8 years ago

To my understanding this should no longer happen since v3.11. Which version are you using?

You can safely continue/skip the exception, it is caught internally (your debugger is likely configured to always pause when this particular exception is thrown, even if it is caught).

OsirisTerje commented 8 years ago

Version 3.11.1 And after this one I get a Exception thrown: 'System.NotSupportedException' in MathNet.Numerics.dll

Additional information: Cuda Native Provider not found.

And then followed by similar pair ones for MKL Exception thrown: 'System.DllNotFoundException' in MathNet.Numerics.dll

Additional information: Unable to load DLL 'MathNet.Numerics.MKL.dll': Exception thrown: 'System.NotSupportedException' in MathNet.Numerics.dll

Additional information: MKL Native Provider not found.

And then

Exception thrown: 'System.DllNotFoundException' in MathNet.Numerics.dll

Additional information: Unable to load DLL 'MathNET.Numerics.OpenBLAS.dll':

with Exception thrown: 'System.NotSupportedException' in MathNet.Numerics.dll

Additional information: OpenBLAS Native Provider not found.

ebyrne commented 8 years ago

We're on 3.12, just upgraded, and we're seeing the same thing. (3 separate sets of first chance exceptions - both DllNotFound and NotSupported for each.) Is that the expected behavior currently? Would a stack help?

If I might humbly suggest, for something like this a custom exception rather than something as common as NotSupportedException would go a long way towards improving the debugging experience since folks would often be hesitant to disable all NotSupportedException's.

mguntli commented 8 years ago

Version 3.12.0.0 with the same behaviour

darrenreynolds commented 7 years ago

v3.13.1. I have exactly the same sequence of errors. Is there something I can do to resolve them?

**{"Unable to load DLL 'MathNet.Numerics.CUDA.dll': The specified module could not be found...} Cuda Native Provider not found.

{"Unable to load DLL 'MathNet.Numerics.MKL.dll': The specified module could not be found...} MKL Native Provider not found.

{"Unable to load DLL 'MathNET.Numerics.OpenBLAS.dll': The specified module could not be found...} OpenBLAS Native Provider not found**

cdrnet commented 7 years ago

Just to clarify: none of these are exceptions that ever reach your code, they only show up on debugging when the debugger is configured to break on all exceptions (which is inconvenient), even if caught. Is this correct?

cdrnet commented 7 years ago

PS: Native providers are no longer developed in this repo, but instead in the main repository directly.

darrenreynolds commented 7 years ago

Yes, that is correct. It is a matter of convenience. You'll appreciate why some developers have 'break on all errors' enabled.

On 14 Sep 2016 8:18 p.m., "Christoph Ruegg" notifications@github.com wrote:

Just to clarify: none of these are exceptions that ever reach your code, they only show up on debugging when the debugger is configured to break on all exceptions (which is inconvenient), even if caught. Is this correct?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mathnet/mathnet-numerics-native/issues/18#issuecomment-247124023, or mute the thread https://github.com/notifications/unsubscribe-auth/ATvgjIlJ2349uB9luiGtZ59OJ-ZtxFdsks5qqEhzgaJpZM4IQu8V .

cdrnet commented 7 years ago

I do appreciate it. I'll see whether we can improve this further.