-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
PFloTran seems to only set the ierror flag on error, and if all things work, does not set the flag to 0. Effectively PFloTran seems to think of the flag as intent = inout.
Here, RReact is called with an uninitialized ierror:
https://github.com/LBL-EESA/alquimia-dev/blob/master/alquimia/pflotran_alquimia_interface.F90#L541
and later it is used in a conditional. So if ierror is not initialized by the compiler, that later if statement depends upon uninitialized data.
The fix is simply to initialize ierror to 0 prior to calling RReact().
I wasn't sure if this is an issue more broadly, but this silences some valgrind errors for me.
Metadata
Metadata
Assignees
Labels
No labels