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

Improve default LSODA tolerances #216

Merged
merged 1 commit into from
Sep 16, 2024
Merged

Improve default LSODA tolerances #216

merged 1 commit into from
Sep 16, 2024

Conversation

adigitoleo
Copy link
Member

Loosening the atol tolerance for the main LSODA solver improves performance significantly without failing any of our tests. Because we already modify atol based on the initial condition, this change mostly just prevents LSODA from trying to meet unreasonably tight error tolerances for those elements of the solution where the corresponding initial condition is zero. With this improvement we go from being sometimes more than 20x slower than the Fortran (for simple shear, excluding Numba compilation time) to being about 7 or 8 times slower.

Loosening the `atol` tolerance for the main LSODA solver improves
performance significantly without failing any of our tests. Because we
already modify `atol` based on the initial condition, this change mostly
just prevents LSODA from trying to meet unreasonably tight error
tolerances for those elements of the solution where the corresponding
initial condition is zero. With this improvement we go from being
sometimes more than 20x slower than the Fortran (for simple shear,
excluding Numba compilation time) to being about 7 or 8 times slower.
@adigitoleo
Copy link
Member Author

Also, changing these components of atol to be below 1e-4 doesn't improve things any further, at least from my rough testing. Similarly changing rtol doesn't do very much.

@Patol75 Patol75 merged commit 56940fa into main Sep 16, 2024
11 checks passed
@Patol75 Patol75 deleted the fix-lsoda-tolerances branch September 16, 2024 11:39
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.

2 participants