Skip to content

Commit

Permalink
Only delete compcomm on icomm if it exists
Browse files Browse the repository at this point in the history
Within the MPI implementation, an inner communicator can optionally
contain a compilation commucator. An indentation error meant that the
compilation attribute was unconditionally deleted, causing incorrect
MPI behaviour if the attribute had never been set in the first
place. On MPICH, this doesn't seem to raise any errors, but with
OpenMPI it causes errors like:

    mpi4py.MPI.Exception: MPI_ERR_OTHER: known error not in list
  • Loading branch information
angus-g committed Feb 5, 2024
1 parent e0a4d3a commit 0a0ab8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyop2/mpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def delcomm_outer(comm, keyval, icomm):
if comp_comm is not None:
debug('Removing compilation comm on inner comm')
decref(comp_comm)
icomm.Delete_attr(compilationcomm_keyval)
icomm.Delete_attr(compilationcomm_keyval)

# Once we have removed the reference to the inner/compilation comm we can free it
cidx = icomm.Get_attr(cidx_keyval)
Expand Down

0 comments on commit 0a0ab8a

Please sign in to comment.