[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2b3-60-g5bb0374

Service Account noreply at mpich.org
Fri Jun 12 10:27:06 CDT 2015


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  5bb037479a079a5e940a9c0e4e1f10f045cb9d7d (commit)
      from  ed749773a9e4fd793c2f517a2029a29c61ed9526 (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/5bb037479a079a5e940a9c0e4e1f10f045cb9d7d

commit 5bb037479a079a5e940a9c0e4e1f10f045cb9d7d
Author: Halim Amer <aamer at anl.gov>
Date:   Wed Jun 10 13:23:43 2015 -0500

    Test send cancellation issues with unmatched sends
    
    In this test, two messages are sent with the same rank, comm, and tag,
    and one of them is cancelled before it gets matched. If the
    destination does not differentiate between the messages, e.g. by using
    sequence numbers or the origin request handle, the wrong message might
    be canceled.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/test/mpi/.gitignore b/test/mpi/.gitignore
index a16a496..d5fcfe6 100644
--- a/test/mpi/.gitignore
+++ b/test/mpi/.gitignore
@@ -953,6 +953,7 @@
 /pt2pt/rqstatus
 /pt2pt/scancel
 /pt2pt/scancel2
+/pt2pt/scancel_unmatch
 /pt2pt/sendall
 /pt2pt/sendflood
 /pt2pt/sendrecv1
diff --git a/test/mpi/pt2pt/Makefile.am b/test/mpi/pt2pt/Makefile.am
index 0135272..9c5d352 100644
--- a/test/mpi/pt2pt/Makefile.am
+++ b/test/mpi/pt2pt/Makefile.am
@@ -38,6 +38,7 @@ noinst_PROGRAMS =  \
     scancel2       \
     rcancel        \
     pscancel       \
+    scancel_unmatch\
     sendflood      \
     sendrecv1      \
     sendrecv2      \
diff --git a/test/mpi/pt2pt/scancel_unmatch.c b/test/mpi/pt2pt/scancel_unmatch.c
new file mode 100644
index 0000000..350e387
--- /dev/null
+++ b/test/mpi/pt2pt/scancel_unmatch.c
@@ -0,0 +1,61 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ *  (C) 2015 by Argonne National Laboratory.
+ *      See COPYRIGHT in top-level directory.
+ */
+
+#include "mpi.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include "mpitest.h"
+
+/*
+static char MTEST_Descrip[] = "Test message reception ordering issues
+after cancelling a send";
+*/
+
+int main(int argc, char *argv[])
+{
+
+    int a, b, flag = 0, errs = 0;
+    MPI_Request requests[2];
+    MPI_Status statuses[2];
+
+    MPI_Init(&argc, &argv);
+
+    int rank, size;
+    MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+    MPI_Comm_size(MPI_COMM_WORLD, &size);
+
+    int source = 0;
+    int dest = size - 1;
+
+    if (rank == 0) {
+        a = 10;
+        b = 20;
+        MPI_Isend(&a, 1, MPI_INT, 1, 0, MPI_COMM_WORLD, &requests[0]);
+        MPI_Isend(&b, 1, MPI_INT, 1, 0, MPI_COMM_WORLD, &requests[1]);
+        MPI_Cancel(&requests[1]);
+        MPI_Wait(&requests[1], &statuses[1]);
+        MPI_Test_cancelled(&statuses[1], &flag);
+
+        if (!flag) {
+            printf("Failed to cancel send");
+            errs++;
+        }
+        MPI_Barrier(MPI_COMM_WORLD);
+        MPI_Wait(&requests[0], MPI_STATUS_IGNORE);
+    }
+    else if (rank == 1) {
+        MPI_Barrier(MPI_COMM_WORLD);
+        MPI_Recv(&a, 1, MPI_INT, 0, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE);
+        if (a == 20) {
+            printf("Failed! got the data from the wrong send!\n");
+            errs++;
+        }
+    }
+
+    MTest_Finalize(errs);
+    MPI_Finalize();
+    return 0;
+}
diff --git a/test/mpi/pt2pt/testlist b/test/mpi/pt2pt/testlist
index 25714ad..8f5afbb 100644
--- a/test/mpi/pt2pt/testlist
+++ b/test/mpi/pt2pt/testlist
@@ -30,6 +30,7 @@ scancel2 2
 pscancel 2 xfail=ticket2266 xfail=ticket2270
 rcancel 2
 cancelrecv 2 xfail=ticket2266 xfail=ticket2270
+scancel_unmatch 2 xfail=ticket2276
 cancelanysrc 2
 isendselfprobe 1
 inactivereq 1

-----------------------------------------------------------------------

Summary of changes:
 test/mpi/.gitignore              |    1 +
 test/mpi/pt2pt/Makefile.am       |    1 +
 test/mpi/pt2pt/scancel_unmatch.c |   61 ++++++++++++++++++++++++++++++++++++++
 test/mpi/pt2pt/testlist          |    1 +
 4 files changed, 64 insertions(+), 0 deletions(-)
 create mode 100644 test/mpi/pt2pt/scancel_unmatch.c


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list