Skip to content

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

Description

@yantosca

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingintegratorsRelated to numerical integrators

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions