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

SegFault when a MPI rank has no data of a sub-region #3528

Open
MelReyCG opened this issue Jan 29, 2025 · 0 comments · May be fixed by #3529
Open

SegFault when a MPI rank has no data of a sub-region #3528

MelReyCG opened this issue Jan 29, 2025 · 0 comments · May be fixed by #3529
Assignees
Labels
type: bug Something isn't working type: new A new issue has been created and requires attention

Comments

@MelReyCG
Copy link
Contributor

Describe the bug
When running a closed case of TE with the lastest versions, GEOS crashes (SegFault).

To Reproduce
I cannot join a case, but I'm posting a PR that will resolve this crash.
It happens because, if I understood correctly, in CompositionalMultiphaseFVM::scalingForSystemSolution, we assume that all MPI ranks will contains some information (pressure, density, temperature) for all the sub-regions, but in our case an MPI rank only has a non-simulated region.
The function scalingForSystemSolution() has an unsafe derefencing: we should not do *std::max_element() without checking if the list has any element at all.

Expected behavior
The function scalingForSystemSolution() should not dereference without checking if there is any information in the pressure/delta-density/temperature sets.

Platform (please complete the following information):

Additional info
I'm posting a quickfix PR that will expose in MpiWrapper methods to safely reduce pairs or pair sets over ranks. I'm also adding a unit test to check the consistency of the solution, to be sure that the reduction will remain stable.

@MelReyCG MelReyCG added type: bug Something isn't working type: new A new issue has been created and requires attention labels Jan 29, 2025
@MelReyCG MelReyCG self-assigned this Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working type: new A new issue has been created and requires attention
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant