wo80 / csparse-interop

C# bindings for sparse matrix solvers.
BSD 3-Clause "New" or "Revised" License
9 stars 3 forks source link

ARPACK Solver with ComputeEigenVectors = False #6

Closed ajos6183 closed 5 years ago

ajos6183 commented 5 years ago

Hello Christian,

I came across a possible bug. I get a NullReferenceException when the ComputeEigenVectors parameter of the ARPACK Solver is set to false. It happens at line 105 of ArpackResult.cs:

e.eigvec = InteropHelper.Pin(((DenseColumnMajorStorage<T>)eigvec).Values, handles);

Also as a side note, i was wondering if i can run something else past you. I don't know where to ask it. I've tried to write a binding for the dsygv_ function of LAPACK, but i am having a problem with the x64 version. I have described the issue here and the visual studio solution is located here. I would really appreciate it if you could glimpse over it and let me know what you think.

Thanks, Anthony

wo80 commented 5 years ago

Fixed.

Regarding your other problem: I can't reproduce the error, all configurations work fine for me (x86, x64, Release, Debug).

Try searching for the error code -1073741819 = 0xC0000005.

ajos6183 commented 5 years ago

Thank you for the quick fix!

With regards to my problem with LAPACK, the behavior that i am getting is that it exits by itself a few seconds after the calculation is finished only in the x64 mode! I am really surprised that is not occurring on your machine, but thanks for testing it! i will keep on researching it but it seems like it has something to do with destructing the objects and returning the handles to Windows.