// info is -i and the i-th parameter had an illegal value.
else if (info > 0)
// info is i and the i-th diagonal element of the triangular
// factor of A is zero, so that A does not have full rank;
// the least squares solution could not be computed.
If I comment out the place where dgels is called everything works just fine but when it is used my application freezes randomly. By "randomly" I mean that it freezes everytime when I run it but sometimes it runs for 10 seconds and sometime a couple of seconds. I once managed to get an error message that described stack overflow. I'm using Visual Studio 2008 and even try-catch doesn't do any good because my application just freezes and I have to kill it using Task Manager.
I'm new to MKL so I if you guys could see if there's something wrong with my MKLImports ([In/Out]'s, ref's, ...). If I have understood MKL's documentation right they should be like that.
The example only show how to import dgemm and dgeev. Not dgels or dgemv which I need. I don't think there's anything wrong with my code and how I have imported the functions. It's just weird how my application is not stable when I use those imported MKL functions. It just freezes randomly.
I just wanted to show how I have imported the functions and if somebody could tell me if I have done something wrong. Usually when something mystical happens, when managed and unmanaged code is used together, there's something wrong with marshaling. Well, in this case there's no need to do anything that involves "fixed" or "unsafe" keywords so the problem is propably with the parameters that are given to dgels and dgemv functions.
Is there a chance that dgels and dgemv could cause an unhandled exception that would cause freezing when invalid parameters are passed?
Just tested my dgels import with data that is proven to be correct and I keep feeding it to dgels every time it is called in my application. It still hangs every now and then.
Has anyone ever had this kind of problems? This has got to be some kind of memory allocation/usage conflict. But there's no need to do any marshaling when you use MKL functions like in the example, right?
The "799" in my example was a typo but thanks to you I double checked my code and there was a bug where I create the arrays. Unfortunately dgels doesn't throw any exceptions so my application just crashed. Maybe it handles the exception but it does not work when playing in unmanaged/managed environment.
Naturally you cannot calculate H x b, where H is x*y and b is y*z, if H.y != b.y.