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

Attempt to work around garbage_cleanup deadlock #590

Merged
merged 3 commits into from
Jul 18, 2024

Conversation

jrmaddison
Copy link
Collaborator

It's not clear where the deadlock is coming from (PetscCommDuplicate not being called on all processes during garbage cleanup), but this PR makes the tlm_adjoint garbage_cleanup more defensive.

Similarly make the comm finalizer more defensive -- it is now the responsibility of the caller of comm.Free() to ensure that garbage_cleanup(comm) is called first. This avoids the delete_fn calling other MPI routines (see https://docs.open-mpi.org/en/v5.0.x/man-openmpi/man3/MPI_Comm_free.3.html).

@jrmaddison jrmaddison merged commit 4bcc3ff into main Jul 18, 2024
4 checks passed
@jrmaddison jrmaddison deleted the jrmaddison/garbage_cleanup branch July 18, 2024 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant