You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered: