Skip to content

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

@yantosca

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.

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