Skip to content

Commit 030f381

Browse files
author
Luke Robison
committed
pml/cm: Correct pml request memory leak in MPI_Recv
This addresses a leak introduced in 73977ba. It can be observed by an mpi application using pml/cm calling MPI_Recv many times which will eventually OOM. During investigation I also wondered if there was significant performance impact from using the list rather than stack-based alloca, however testing shows no performance difference beyond measurement noise of ~0.5 usec, so keep the refactor, and just ensure the request object is returned. Signed-off-by: Luke Robison <lrbison@amazon.com>
1 parent cb00772 commit 030f381

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

ompi/mca/pml/cm/pml_cm.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,6 @@ mca_pml_cm_irecv(void *addr,
121121
return ret;
122122
}
123123

124-
__opal_attribute_always_inline__ static inline void
125-
mca_pml_cm_recv_fast_completion(struct mca_mtl_request_t *mtl_request)
126-
{
127-
// Do nothing!
128-
ompi_request_complete(mtl_request->ompi_req, true);
129-
return;
130-
}
131-
132124
__opal_attribute_always_inline__ static inline int
133125
mca_pml_cm_recv(void *addr,
134126
size_t count,
@@ -159,7 +151,6 @@ mca_pml_cm_recv(void *addr,
159151
count,
160152
flags);
161153

162-
recvreq->req_mtl.completion_callback = mca_pml_cm_recv_fast_completion;
163154
assert(NULL == recvreq->req_base.req_ompi.req_complete_cb);
164155

165156
MCA_PML_CM_THIN_RECV_REQUEST_START(recvreq, comm, tag, src, ret);

0 commit comments

Comments
 (0)