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

[BUG/ISSUE] LSODE integrator is not thread-safe #118

Open
yantosca opened this issue Dec 19, 2024 · 0 comments · May be fixed by #121
Open

[BUG/ISSUE] LSODE integrator is not thread-safe #118

yantosca opened this issue Dec 19, 2024 · 0 comments · May be fixed by #121
Assignees
Labels
bug Something isn't working integrators Related to numerical integrators
Milestone

Comments

@yantosca
Copy link
Contributor

Following the discussion on geoschem/geos-chem#2443, we have determined that the LSODE integrator is not thread-safe. That is, if you try to call the KPP Integrate function from within an OpenMP !$OMP PARALLEL DO loop, the integration will eventually fail with convergence errors. However, LSODE still works properly in single-thread instances.

I believe this is caused by an old-school F77 COMMON block that is buried deep inside the int/lsode.f90 routine. I am going to do a bit of testing to see how we can replace this legacy construct with modern Fortran while not causing the output to be changed. Stay tuned.

@yantosca yantosca added bug Something isn't working integrators Related to numerical integrators labels Dec 19, 2024
@yantosca yantosca added this to the 3.2.0 milestone Dec 19, 2024
@yantosca yantosca self-assigned this Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working integrators Related to numerical integrators
Projects
None yet
1 participant