Skip to content

Commit 1be40a1

Browse files
committed
The Py_INCREF((PyObject *) pyMPI_Comm) was added inside the function for creating new Python MPI communicator.
1 parent 725f5a2 commit 1be40a1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/mpi/wrap_mpi_comm.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ extern "C" {
162162
pyORBIT_MPI_Comm* newMPI_Comm(){
163163
pyORBIT_MPI_Comm* pyMPI_Comm = PyObject_New(pyORBIT_MPI_Comm,&pyORBIT_MPI_Comm_Type);
164164
pyMPI_Comm->comm = MPI_COMM_WORLD;
165+
Py_INCREF((PyObject *) pyMPI_Comm);
165166
return pyMPI_Comm;
166167
}
167168

0 commit comments

Comments
 (0)