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

radau5 solver does not support sundials 64 bit index #107

Open
jschueller opened this issue Jul 4, 2024 · 12 comments
Open

radau5 solver does not support sundials 64 bit index #107

jschueller opened this issue Jul 4, 2024 · 12 comments
Assignees
Labels
bug Something isn't working

Comments

@jschueller
Copy link
Contributor

if sundials is compiled with SUNDIALS_INDEX_SIZE=64 (default) radau5 will fail in superlu_mt method get_perm_c
with message error from colamd

@PeterMeisrimelModelon
Copy link
Collaborator

Can you provide some more information such as the error message and sundials version?

@jschueller
Copy link
Contributor Author

yes, thats for all sundials versions >=5:
tests.test_examples.Test_Examples.test_cvode_with_jac_sparse ... COLAMD failed at line 58 in file /tmp/superlu_mt-4.0.1/SRC/get_perm_c.c

@PeterMeisrimelModelon PeterMeisrimelModelon self-assigned this Jul 8, 2024
@PeterMeisrimelModelon
Copy link
Collaborator

Just for clarity, your initial comment states Radau5, the test you quote is CVode, so you observe both solvers being affected?

@jschueller
Copy link
Contributor Author

maybe the error message does not match the output, because only radau uses superlu, right ?

@PeterMeisrimelModelon
Copy link
Collaborator

CVode + sparse also uses superLU.

@jschueller
Copy link
Contributor Author

oh then that might be it too, sorry if the report wasnt super clear

@PeterMeisrimelModelon
Copy link
Collaborator

I can reproduce the issue with CVode , looking into it.

@PeterMeisrimelModelon PeterMeisrimelModelon added the bug Something isn't working label Jul 8, 2024
@PeterMeisrimelModelon
Copy link
Collaborator

This is somewhat of a known issue, see https://github.com/modelon-community/Assimulo/blob/master/setup.py#L394

Sticking with SUNDIALS_INDEX_SIZE=32 is likely the best option for now. If one used a superLU configured to match SUNDIALS_INDEX_SIZE=64, there might be issues with Radau5's sparse solver.

/Peter

@modelonrobinandersson
Copy link
Member

@PeterMeisrimelModelon @jschueller is this issue solved by #108?

@jschueller
Copy link
Contributor Author

no

@jschueller
Copy link
Contributor Author

but with #108 now we configure sundials with the correct index type (32 bits) so that newer versions can be tested

@PeterMeisrimelModelon
Copy link
Collaborator

Also just for completeness, the issue here seems to be that the sparse jacobian callbacks for both Radau5 & CVode (+ IDA?) both work with generic Cython int + we currently assume superLU is using 32 bit indices. So, a few things not really in sync.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants