Skip to content
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

Expose linear solver options #37

Merged
merged 11 commits into from
Jan 28, 2020
Merged

Expose linear solver options #37

merged 11 commits into from
Jan 28, 2020

Conversation

mtanneau
Copy link
Member

@mtanneau mtanneau commented Jan 28, 2020

This PR makes it possible to customize the linear solver via solver parameters, instead of having to manually change the source code.

To make this possible, I introduced some trait-like options for linear solvers.
These options are exposed as solver parameters, which can be set by the user. The exact linear solver type if then dispatched on automatically.

Current options are

  • Numerical type Tv, determined by the Model object
  • Linear system to be solved: either AugmentedSystem or NormalEquations
  • Linear solver backend. Currently supported are Lapack (for dense systems), Cholmod and LDLFact.

These options are now displayed at the beginning of the optimization, e.g.:

Linear solver options
  Precision    : Float64
  Backend      : CHOLMOD
  System       : Augmented system

See the documentation for more details and default options.

Finally, I added generic tests to simplify the testing of various linear solvers (customized ones in particular).

@mtanneau mtanneau merged commit 9684e69 into master Jan 28, 2020
@mtanneau mtanneau deleted the LSTraits branch January 28, 2020 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant