-
Notifications
You must be signed in to change notification settings - Fork 131
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
Support of -DEIGEN_DEFAULT_TO_ROW_MAJOR #119
Comments
I tried to replace all occurences of Then i get a segfault however. |
It seems that If the input matrix is row-majored, then there are flags in |
Thanks! This works, for me and i have used it also in #36. (compiled without the mentioned flag) Along the way i have noted that i got wrong results with Maybe a warning in the docs of spectra that it should not be used in combination with this Eigen flag (since it is giving wrong results, something that i did not observe yet for Eigen alone) could prevent future users from this pitfall. |
Yeah, internally Spectra relies on the column-majored layout for efficient operations (e.g. copying columns), and I was even unaware of the existence of the I once hoped that when the matrix layout is different from the wrapper class (e.g. By the way, I noticed that you had a PR in KratosMultiphysics/Kratos#8440. Do you need to support the |
The KratosMultiphysics project uses row-majored ublas matrices internally. We are interfacing Eigen for access to some linear algebra functionality and for convenience we have used the In PR 8440 i have interfaced spectra on top of that, and in this process i have detected the issues with the |
I have compared the result of
SymGEigsShiftSolver
if compiled with and without-DEIGEN_DEFAULT_TO_ROW_MAJOR
.It seems that internally some types are hard-coded to default to col-major ordering and ignore this flag.
This leads to wrong results if the Eigen storage order is defaulting to row-major.
Are there plans to support this flag?
without
-DEIGEN_DEFAULT_TO_ROW_MAJOR
with
-DEIGEN_DEFAULT_TO_ROW_MAJOR
Example code
The test example i have used is from the documentation of the
SymGEigsShiftSolver
class:The text was updated successfully, but these errors were encountered: