Skip to content

Issue 633 add klu#657

Merged
Scottmar93 merged 90 commits intomasterfrom
issue-633-add-klu
Oct 25, 2019
Merged

Issue 633 add klu#657
Scottmar93 merged 90 commits intomasterfrom
issue-633-add-klu

Conversation

@Scottmar93
Copy link
Copy Markdown
Contributor

@Scottmar93 Scottmar93 commented Oct 10, 2019

Description

Added pybind11 interface to sundials with the sparse linear solver KLU works for all models including 2p1D now. Still fairly simple requiring the jacobian and events to be passed in but we can add these as options later. Additional things added:

  • a unit test to ensure it works on one of the standard examples included in sundials (ida_roberts_klu)
  • an integration test to ensure it works on the spme (in 1D). (I didn't add the 2p1D case because that takes too long)
  • an install script in "scripts/install_sundials_4.1.0.sh" that downloads sparsesuite, sundials4.1.0, sets up pybind11, and then generates the klu solver shared library so that it can be imported in python
  • some simple instructions in the README.md for how to install using the install script
  • added KLU to travis.yml (I think I have done this right but please check) (Unfortunately this will add quite a bit of time to tests because needs to download and install SuiteSparse which takes a while).

Fixes #633

Type of Change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

Key checklist:

  • No style issues: $ flake8
  • All tests pass: $ python run-tests.py --unit
  • The documentation builds: $ cd docs and then $ make clean; make html

You can run all three at once, using $ python run-tests.py --quick.

Further checks:

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works
  • Any dependent changes have been merged and published in downstream modules

@Scottmar93 Scottmar93 merged commit 2af6103 into master Oct 25, 2019
@valentinsulzer valentinsulzer deleted the issue-633-add-klu branch October 25, 2019 20:50
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.

Add KLU solver interface

4 participants