[mpich] MPICH primary repository branch, master, updated. v3.1.3-6-g8afce34
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "MPICH primary repository". The branch, master has been updated via 8afce3469a7dffcbbe1f8b0a7c049604fa7970c4 (commit) from cc4b0952a7b8503e2340938ce11092aa5784305a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://git.mpich.org/mpich.git/commitdiff/8afce3469a7dffcbbe1f8b0a7c049604fa... commit 8afce3469a7dffcbbe1f8b0a7c049604fa7970c4 Author: Igor Ivanov <[email protected]> Date: Fri Oct 10 14:07:21 2014 +0200 mpid: Fix REQUEST memory leak for Irsend Memory leak can appear in case netmod usage. Comm override functions are responsible for creating its own request. So they need to come before the sreq is created. Signed-off-by: Igor Ivanov <[email protected]> Signed-off-by: Pavan Balaji <[email protected]> diff --git a/src/mpid/ch3/src/mpid_irsend.c b/src/mpid/ch3/src/mpid_irsend.c index d8a0c0a..0bae646 100644 --- a/src/mpid/ch3/src/mpid_irsend.c +++ b/src/mpid/ch3/src/mpid_irsend.c @@ -50,6 +50,19 @@ int MPID_Irsend(const void * buf, int count, MPI_Datatype datatype, int rank, in mpi_errno = MPIDI_Isend_self(buf, count, datatype, rank, tag, comm, context_offset, MPIDI_REQUEST_TYPE_RSEND, &sreq); goto fn_exit; } + + if (rank != MPI_PROC_NULL) { + MPIDI_Comm_get_vc_set_active(comm, rank, &vc); +#ifdef ENABLE_COMM_OVERRIDES + /* this needs to come before the sreq is created, since the override + * function is responsible for creating its own request */ + if (vc->comm_ops && vc->comm_ops->irsend) + { + mpi_errno = vc->comm_ops->irsend( vc, buf, count, datatype, rank, tag, comm, context_offset, &sreq); + goto fn_exit; + } +#endif + } MPIDI_Request_create_sreq(sreq, mpi_errno, goto fn_exit); MPIDI_Request_set_type(sreq, MPIDI_REQUEST_TYPE_RSEND); @@ -62,16 +75,6 @@ int MPID_Irsend(const void * buf, int count, MPI_Datatype datatype, int rank, in goto fn_exit; } - MPIDI_Comm_get_vc_set_active(comm, rank, &vc); - -#ifdef ENABLE_COMM_OVERRIDES - if (vc->comm_ops && vc->comm_ops->irsend) - { - mpi_errno = vc->comm_ops->irsend( vc, buf, count, datatype, rank, tag, comm, context_offset, &sreq); - goto fn_exit; - } -#endif - MPIDI_Datatype_get_info(count, datatype, dt_contig, data_sz, dt_ptr, dt_true_lb); MPIDI_Pkt_init(ready_pkt, MPIDI_CH3_PKT_READY_SEND); ----------------------------------------------------------------------- Summary of changes: src/mpid/ch3/src/mpid_irsend.c | 23 +++++++++++++---------- 1 files changed, 13 insertions(+), 10 deletions(-) hooks/post-receive -- MPICH primary repository
participants (1)
-
noreply@mpich.org