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 in checkpoint function with Alquimia #294

Open
levuvietphong opened this issue Feb 17, 2025 · 0 comments
Open

Bug in checkpoint function with Alquimia #294

levuvietphong opened this issue Feb 17, 2025 · 0 comments
Assignees
Labels

Comments

@levuvietphong
Copy link
Contributor

There is a minor bug in the checkpoint function of ats when running alquimia with subgrid. The issue arises due to an invalid key generated by splitKey(), which incorrectly includes a reaction from the Pflotran file.

Running the code attached produced the following error:

libc++abi: terminating due to uncaught exception of type Errors::Message: Keys::splitKey() called with invalid argument "transport_coupler_next.cell.1.0e+00 DOM1  + 1.0e+00 O2(aq)  -> 1.0e+00 HCO3- + 1.0 H+ aq kin rate cnst"

It seems that the splitKey() function does not correctly extract the name and tag, leading to an invalid key that includes the reaction from the Pflotran file:

# DOM aerobic respiration
MICROBIAL_REACTION
  REACTION 1.0e+00 DOM1  + 1.0e+00 O2(aq)  -> 1.0e+00 HCO3- + 1.0 H+ 
  RATE_CONSTANT      0
  MONOD
    SPECIES_NAME        O2(aq)
    HALF_SATURATION_CONSTANT 0
    THRESHOLD_CONCENTRATION 1.1e-20
  /
/

Removing checkpoint tag from the xml input avoids this bug, as no checkpoint files are written. Setting single file checkpoint = true fixes the issue in serial runs, but does not resolve in parallel runs.

checkpoint_bugs_example.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants