-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Complex matrix support #8
Comments
I made an attempt at getting this to work by changing the matrix type flag to 6 (complex symmetric) and commenting out the checks on the data types. It seems like Pardiso will successfully perform the solve (no error thrown) but there is still an issue with passing the data back into Python from C. Generating random complex symmetric matrices and solving with random right hand sides gives solutions that look like:
Note that scipy's spsolve() is able to handle these same problems so it shouldn't be an issue with the matrix symmetry. |
My bad... in the above comment I was actually not setting mtype correctly. Those outputs correspond to feeding complex inputs when Pardiso is expecting real inputs (still having mtype=11). My approach to trying to get complex numbers to work was:
This gives a |
See my pull request #9 |
@ianwilliamson @haasad I don't know if anyone is still interested in complex types in pypardiso now (2 years later) but I stumbled upon this as I was trying to wrap complex types for PARDISO 6 and got curious so I was playing around. I think that this pull request #9 might actually work (more or less -- there is a test failing due to the removed conversion from half-precision that used to happen behind the scenes)! The problem with the example code in #8 (comment) (I think) is that the matrix type is specified as a symmetric type (Possible that there were other problems I don't know about here) |
@victorminden Feel free to take over that pull request, if you wish. Just FYI... there is also this package: https://github.com/dwfmarchant/pyMKL that wraps (what I think is the same solver) and supports complex numbers. We have used it successfully over the past few years. |
@ianwilliamson Thanks for the note, I have been looking at PyMKL as well. My interest is as part of a "which of these two projects would be more straightforward for trying out PARDISO 6 with complex support via Python", so when I saw this and #10 I was trying to investigate low-hanging fruit here. Will spend more time with PyMKL as well. |
Ah, makes sense. It would be really useful to have a working interface to pardiso version 6 from Python. |
Complex cdouble support: https://github.com/andrejstmh/PyPardisoProject |
Hi, I'm looking to use this for complex128 csr matrices, but it is not currently supported.
Is this in the pipeline? Is it straightforward to implement?
Right now, I'm performing a workaround by constructing a twice as large, real matrix, which works but is significantly slower.
Thanks!
The text was updated successfully, but these errors were encountered: