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

fixes #147: SUNDIALS_BLAS_LAPACK not present in sundials 6 #160

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/scikits-odes-sundials/setup_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def get_sundials_config_pxi(include_dirs, dist):
# Check for blas/lapack
if check_macro_def(
config_cmd,
"SUNDIALS_BLAS_LAPACK", headers=[SUNDIALS_CONFIG_H],
"SUNDIALS_BLAS_LAPACK_ENABLED", headers=[SUNDIALS_CONFIG_H],
include_dirs=include_dirs
):
has_lapack = True
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ IF SUNDIALS_BLAS_LAPACK:
ctypedef _SUNLinearSolverContent_LapackDense *SUNLinearSolverContent_LapackDense

SUNLinearSolver SUNLinSol_LapackDense(N_Vector y, SUNMatrix A, SUNContext sunctx)
SUNLinearSolver SUNLapackDense(N_Vector y, SUNMatrix A) #deprecated

SUNLinearSolver_Type SUNLinSolGetType_LapackDense(SUNLinearSolver S)
SUNLinearSolver_ID SUNLinSolGetID_LapackDense(SUNLinearSolver S)
Expand All @@ -87,7 +86,6 @@ IF SUNDIALS_BLAS_LAPACK:
ctypedef _SUNLinearSolverContent_LapackBand *SUNLinearSolverContent_LapackBand

SUNLinearSolver SUNLinSol_LapackBand(N_Vector y, SUNMatrix A, SUNContext sunctx)
SUNLinearSolver SUNLapackBand(N_Vector y, SUNMatrix A) # deprecated

SUNLinearSolver_Type SUNLinSolGetType_LapackBand(SUNLinearSolver S)
SUNLinearSolver_ID SUNLinSolGetID_LapackBand(SUNLinearSolver S)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1577,7 +1577,7 @@ cdef class CVODE:
if SUNDIALS_BLAS_LAPACK:
if linsolver == 'lapackdense':
A = SUNDenseMatrix(N, N, self.sunctx)
LS = SUNLapackDense(self.y0, A)
LS = SUNLinSol_LapackDense(self.y0, A, self.sunctx)
# check if memory was allocated
if (A == NULL or LS == NULL):
raise ValueError('Could not allocate matrix or linear solver')
Expand All @@ -1593,7 +1593,7 @@ cdef class CVODE:
.format(flag))
elif linsolver == 'lapackband':
A = SUNBandMatrix(N, <int> opts['uband'], <int> opts['lband'], self.sunctx)
LS = SUNLapackBand(self.y0, A)
LS = SUNLinSol_LapackBand(self.y0, A, self.sunctx)
if (A == NULL or LS == NULL):
raise ValueError('Could not allocate matrix or linear solver')
flag = CVodeSetLinearSolver(cv_mem, LS, A)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1693,7 +1693,7 @@ cdef class IDA:
if SUNDIALS_BLAS_LAPACK:
if linsolver == 'lapackdense':
A = SUNDenseMatrix(N, N, self.sunctx)
LS = SUNLapackDense(self.y0, A)
LS = SUNLinSol_LapackDense(self.y0, A, self.sunctx)
# check if memory was allocated
if (A == NULL or LS == NULL):
raise ValueError('Could not allocate matrix or linear solver')
Expand All @@ -1709,7 +1709,7 @@ cdef class IDA:
.format(flag))
elif linsolver == 'lapackband':
A = SUNBandMatrix(N, <int> opts['uband'], <int> opts['lband'], self.sunctx);
LS = SUNLapackBand(self.y0, A)
LS = SUNLinSol_LapackBand(self.y0, A, self.sunctx)
if (A == NULL or LS == NULL):
raise ValueError('Could not allocate matrix or linear solver')
flag = IDASetLinearSolver(ida_mem, LS, A)
Expand Down