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

[CVLS ERROR] CVodeSetJacFn Linear solver memory is NULL. #139

Open
Immudzen opened this issue Sep 1, 2022 · 0 comments
Open

[CVLS ERROR] CVodeSetJacFn Linear solver memory is NULL. #139

Immudzen opened this issue Sep 1, 2022 · 0 comments

Comments

@Immudzen
Copy link

Immudzen commented Sep 1, 2022

I am using scikits.odes 2.6.4 installed from conda-forge

ode_solver = scikits.odes.ode('cvode', self.rhs,
atol = 1e-8,
rtol = 1e-6,
old_api = False,
max_steps = 20000,
linsolver = 'dense',
lmm_type = 'ADAMS',
nonlinsolver = 'fixedpoint',
one_step_compute=True,
jacfn=self.jac)

and

def jac(self, t, y, f, J):
"computer the jacobian"
def wrap(x):
return self.function(t, x, self.current_feeds, jacobian=True)
J[:] = scipy.optimize.approx_fprime(y, wrap)

and I get [CVLS ERROR] CVodeSetJacFn Linear solver memory is NULL. every time before my jac function is called

the entire integration seems to work fine. My function is called the Jacobian is set, J is the right shape when that function is called.

Any idea what is causing that error and how can I fix it?

Part of the reason I am doing this in the first place was I needed to debug the system and see what the approximate jacobian was and I also wanted to be able to tell apart calls to my function to approximate the jacobian and normal calls.

I don't think the issue is in the jac function since the error occurs before it is called.

Further information: If I changed fixedpoint to newton the error message goes away

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

1 participant