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

SUNDIALS_BLAS_LAPACK not present in sundials 6 #147

Open
martinjrobins opened this issue Jan 16, 2023 · 1 comment
Open

SUNDIALS_BLAS_LAPACK not present in sundials 6 #147

martinjrobins opened this issue Jan 16, 2023 · 1 comment

Comments

@martinjrobins
Copy link
Contributor

I'm trying to use the latest version of scikits.odes that uses sundials v6. I'm having trouble getting scikits.odes to recognise the lapack dense solver, and am getting the following error:

======================================================================
ERROR: test_model_solver_ode_jacobian_python (test_solvers.test_scikits_solvers.TestScikitsSolvers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/PyBaMM/PyBaMM/tests/unit/test_solvers/test_scikits_solvers.py", line 185, in test_model_solver_ode_jacobian_python
    solution = solver.solve(model, t_eval)
  File "/home/runner/work/PyBaMM/PyBaMM/pybamm/solvers/base_solver.py", line 875, in solve
    new_solution = self._integrate(
  File "/home/runner/work/PyBaMM/PyBaMM/pybamm/solvers/scikits_ode_solver.py", line 159, in _integrate
    sol = ode_solver.solve(t_eval, y0)
  File "/home/runner/work/PyBaMM/PyBaMM/.tox/coverage/lib/python3.9/site-packages/scikits/odes/ode.py", line 333, in solve
    return self._integrator.solve(tspan, y0)
  File "scikits/odes/sundials/cvode.pyx", line 1768, in scikits.odes.sundials.cvode.CVODE.solve
  File "scikits/odes/sundials/cvode.pyx", line 1806, in scikits.odes.sundials.cvode.CVODE._solve
  File "scikits/odes/sundials/cvode.pyx", line 1610, in scikits.odes.sundials.cvode.CVODE._init_step
ValueError: LinSolver: LAPACK not available, cannot execute solver type: lapackdense

It looks like scikits.odes is looking for the SUNDIALS_BLAS_LAPACK define in sundials_config.h, as per this line

"SUNDIALS_BLAS_LAPACK", headers=[SUNDIALS_CONFIG_H],

but I don't think sundials v6 defines this, even if the sundials lapack solvers are compiled. Instead in my sundials_config.h I have:

#define SUNDIALS_SUNLINSOL_LAPACKBAND 1
#define SUNDIALS_SUNLINSOL_LAPACKDENSE 1
@testcan
Copy link

testcan commented Jul 21, 2023

Hello,

I got same issues using the latest version of scikits.odes. Did you manage to fix it?

Thanks

stuart-nolan added a commit to stuart-nolan/odes that referenced this issue Oct 9, 2023
Signed-off-by: stuart-nolan <61199416+stuart-nolan@users.noreply.github.com>
stuart-nolan added a commit to stuart-nolan/odes that referenced this issue Jul 16, 2024
Signed-off-by: stuart-nolan <61199416+stuart-nolan@users.noreply.github.com>
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

No branches or pull requests

2 participants