-
-
Notifications
You must be signed in to change notification settings - Fork 346
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
Use Eigen as alternative to LAPACK #333
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Check for a system copy of Eigen, and if that is not found, install Eigen's headers with the Cantera headers. Add the header 'eigen_dense.h' to provide a single header to include from other locations.
Because SquareMatrix is unused within Cantera and deprecated, it is not necessary to implement alternatives for these functions.
Cantera no longer requires BLAS / LAPACK (but can use them if available), so it is never necessary to compile any of the external Fortran or f2c-converted code.
Hi speth, |
I've toyed around with the idea, but I think that it's pretty far down on my priority list. |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR eliminates the need to keep a (incomplete, buggy) copy of BLAS and LAPACK with Cantera, along with other fortran and f2c-converted source.
These versions of BLAS and LAPACK were not thread-safe, and they are also not optimized. Eigen is both thread safe and quite fast. The only feature needed by Cantera that is not provided by Eigen is a solver for banded matrices, for which we can currently utilize the solver provided with Sundials (although hopefully there will be a banded solver in Eigen at some point).
If users have a particularly good BLAS/LAPACK implementation, that can of course still be used (with the exception of the complicated and still unresolved incompatibility with Matlab).
This also opens the door for using Eigen more extensively throughout Cantera, both to improve speed and to improve readability by writing vector/matrix expressions more naturally.