[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.1.1-103-g8eef807
Service Account
noreply at mpich.org
Tue Jul 15 09:38:58 CDT 2014
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 8eef807cf5a6a61b8d6a1289f52d900afe779c10 (commit)
via 209a8b7d1bc971339ae362f06ee49a9cc9150e43 (commit)
from aaf1d96f019f1ccfbcebfd17f6c5d098a3883a4f (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/8eef807cf5a6a61b8d6a1289f52d900afe779c10
commit 8eef807cf5a6a61b8d6a1289f52d900afe779c10
Author: Wesley Bland <wbland at anl.gov>
Date: Thu Jul 10 16:41:34 2014 -0500
Add a test for the bug in #2129
Test this case so we don't have another regression. Thanks for test case
contributed by Lisandro Dalcin (dalcinl at gmail.com).
See #2129
Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>
diff --git a/test/mpi/pt2pt/Makefile.am b/test/mpi/pt2pt/Makefile.am
index 4929daa..752a451 100644
--- a/test/mpi/pt2pt/Makefile.am
+++ b/test/mpi/pt2pt/Makefile.am
@@ -23,6 +23,7 @@ noinst_PROGRAMS = \
bsendalign \
cancelrecv \
isendself \
+ issendselfcancel \
sendself \
eagerdt \
isendselfprobe \
diff --git a/test/mpi/pt2pt/issendselfcancel.c b/test/mpi/pt2pt/issendselfcancel.c
new file mode 100644
index 0000000..c5ee541
--- /dev/null
+++ b/test/mpi/pt2pt/issendselfcancel.c
@@ -0,0 +1,36 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ * (C) 2014 by Argonne National Laboratory.
+ * See COPYRIGHT in top-level directory.
+ */
+#import <stdio.h>
+#import <stdlib.h>
+#import <assert.h>
+#import "mpi.h"
+
+int main(int argc, char **argv)
+{
+ MPI_Request req;
+ MPI_Status status;
+
+ MPI_Init(NULL, NULL);
+
+ MPI_Issend(NULL, 0, MPI_BYTE, 0, 123, MPI_COMM_SELF, &req);
+
+ MPI_Probe(MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_SELF, &status);
+ assert(status.MPI_SOURCE == 0);
+ assert(status.MPI_TAG == 123);
+
+ MPI_Cancel(&req);
+ assert(req != MPI_REQUEST_NULL);
+
+ MPI_Request_free(&req);
+
+ MPI_Irecv(NULL, 0, MPI_BYTE, 0, 123, MPI_COMM_SELF, &req);
+ MPI_Cancel(&req);
+ MPI_Wait(&req, &status);
+
+ printf(" No Errors\n");
+
+ MPI_Finalize();
+}
diff --git a/test/mpi/pt2pt/testlist b/test/mpi/pt2pt/testlist
index 89de3e2..d3a7da9 100644
--- a/test/mpi/pt2pt/testlist
+++ b/test/mpi/pt2pt/testlist
@@ -16,6 +16,7 @@ bsend5 4
bsendalign 2
bsendpending 2
isendself 1
+issendselfcancel 1
bsendfrag 2
icsend 4
rqstatus 2
http://git.mpich.org/mpich.git/commitdiff/209a8b7d1bc971339ae362f06ee49a9cc9150e43
commit 209a8b7d1bc971339ae362f06ee49a9cc9150e43
Author: Wesley Bland <wbland at anl.gov>
Date: Thu Jul 10 16:25:30 2014 -0500
Fix refcounting for isends
The refcounting for isends needs to be reset to 0 sometimes if an error occurs
before passing the request back to the user. This was mistakenly cleaned up in
[1e171ff6] and now needs to be set back (along with a better comment
explaining the problem.
Thanks for the bug report to Lisandro Dalcin (dalcinl at gmail.com).
Fixes #2129
Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>
diff --git a/src/mpid/ch3/src/mpid_cancel_send.c b/src/mpid/ch3/src/mpid_cancel_send.c
index 9610793..4772c8c 100644
--- a/src/mpid/ch3/src/mpid_cancel_send.c
+++ b/src/mpid/ch3/src/mpid_cancel_send.c
@@ -66,9 +66,12 @@ int MPID_Cancel_send(MPID_Request * sreq)
MPIU_DBG_MSG_FMT(CH3_OTHER,VERBOSE,(MPIU_DBG_FDEST,
"send-to-self cancellation successful, sreq=0x%08x, rreq=0x%08x",
sreq->handle, rreq->handle));
-
- MPID_Request_release(rreq);
-
+
+ /* Pull the message out of the unexpected queue since it's being
+ * cancelled */
+ MPIU_Object_set_ref(rreq, 0);
+ MPIDI_CH3_Request_destroy(rreq);
+
MPIR_STATUS_SET_CANCEL_BIT(sreq->status, TRUE);
/* no other thread should be waiting on sreq, so it is safe to
reset ref_count and cc */
diff --git a/src/mpid/ch3/src/mpidi_isend_self.c b/src/mpid/ch3/src/mpidi_isend_self.c
index 3d71199..2961a07 100644
--- a/src/mpid/ch3/src/mpidi_isend_self.c
+++ b/src/mpid/ch3/src/mpidi_isend_self.c
@@ -45,7 +45,10 @@ int MPIDI_Isend_self(const void * buf, int count, MPI_Datatype datatype, int ran
/* --BEGIN ERROR HANDLING-- */
if (rreq == NULL)
{
- MPID_Request_release(sreq);
+ /* Set the refcount to 0 since the user will never have a chance to
+ * release their reference */
+ MPIU_Object_set_ref(sreq, 0);
+ MPIDI_CH3_Request_destroy(sreq);
sreq = NULL;
MPIU_ERR_SET1(mpi_errno, MPI_ERR_OTHER, "**nomem",
"**nomemuereq %d", MPIDI_CH3U_Recvq_count_unexp());
-----------------------------------------------------------------------
Summary of changes:
src/mpid/ch3/src/mpid_cancel_send.c | 9 +++++--
src/mpid/ch3/src/mpidi_isend_self.c | 5 +++-
test/mpi/pt2pt/Makefile.am | 1 +
test/mpi/pt2pt/issendselfcancel.c | 36 +++++++++++++++++++++++++++++++++++
test/mpi/pt2pt/testlist | 1 +
5 files changed, 48 insertions(+), 4 deletions(-)
create mode 100644 test/mpi/pt2pt/issendselfcancel.c
hooks/post-receive
--
MPICH primary repository
More information about the commits
mailing list