0

Currently, I am experiencing an exception caused by MathNet.Numerics C# library during the initial usage of Inverse() function. After first time usage, I dont have any problem. I might be missing some details.

Simply following code is used. (Kt is prefedined)

 Matrix<double> Ktinv = DenseMatrix.Create(4, 4, 0);
 Matrix<double> KT_Copy = DenseMatrix.OfArray(Kt);

 Ktinv = KT_Copy.Inverse();

I am guessing that, it might be CudeProvider path exception. Did anyone experience such a problem?

NuGet Version: 4.11.0

Call Stack

Ugur
  • 1,257
  • 2
  • 20
  • 30
  • A bit of a guess, but I don't suppose you've unintentionally set it to break on first-chance exceptions, have you? [Visual Studio: How to break on handled exceptions?](https://stackoverflow.com/a/47681894/1115360) - make sure it is *not* set to break on handled exceptions. – Andrew Morton Jul 22 '20 at 14:03
  • @AndrewMorton, I have checked all exception settings to see what was going on. Normally this exception is "ignorable". But it creates small performance issue at start up. I wanted to avoid this startup issue. – Ugur Jul 22 '20 at 14:18
  • If you put the rest of the stack trace and your code that will help. Quick observation : The MathNet library is trying to load a provider. My guess is it is trying to resolve the dependency pointing to numerical algebra (or related) library, failing to find it at default path on first attempt but then loading it by navigating through default path(s), finding it eventually and then continuing with success. See https://stackoverflow.com/questions/2009047/load-a-dll-reference-from-a-different-folder for more information. – Amogh Sarpotdar Jul 22 '20 at 14:28
  • 1
    Possible duplicate of https://stackoverflow.com/questions/48002796/error-in-c-sharp-application-system-argumentexception-the-path-is-not-of-a-le however that one has not been marked as 'answered' as well. This has very high possibility of being a 'permissions' issue - something to do with your local environment - unless you provide code and it can be reproduced on others machine. – Amogh Sarpotdar Jul 22 '20 at 14:32
  • @AmoghSarpotdar rest of the call stack is just click event. Not relevant for this exception. It may be CUDA related dll or path problem. – Ugur Jul 22 '20 at 14:48
  • @AndrewMorton , have you got it resolved? If so, can you please put a comment in here with your observations? Curious because I saw this in one of my builds and it was intermittent but seems to have disappeared for now on its own. – Amogh Sarpotdar Jul 22 '20 at 16:47
  • @AmoghSarpotdar I think you meant to address the OP, Ugur, not me. – Andrew Morton Jul 22 '20 at 19:08

0 Answers0