[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.1b1-182-gd089353

mysql vizuser noreply at mpich.org
Sun Nov 3 21:32:45 CST 2013


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  d089353f5514a61062bd34bde2c0c5135902b97c (commit)
      from  a5aa7920ba7045ff66a3c3f5cfec7d8037b40fea (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/d089353f5514a61062bd34bde2c0c5135902b97c

commit d089353f5514a61062bd34bde2c0c5135902b97c
Author: Rob Latham <robl at mcs.anl.gov>
Date:   Fri Nov 1 16:51:20 2013 -0500

    testcase for status object manipulations
    
    MPI_Count in a status object breaks ABI, so we have a scheme to use lo
    and hi parts of adjacent struct members.  but it's not foolproof.  Test
    case to demonstrate bugs and hopefully catch future regressions.
    
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/test/mpi/pt2pt/Makefile.am b/test/mpi/pt2pt/Makefile.am
index 5031100..4929daa 100644
--- a/test/mpi/pt2pt/Makefile.am
+++ b/test/mpi/pt2pt/Makefile.am
@@ -48,5 +48,6 @@ noinst_PROGRAMS =  \
     waittestnull   \
     sendall        \
     large_message  \
-    mprobe
+    mprobe         \
+    big_count_status
 
diff --git a/test/mpi/pt2pt/big_count_status.c b/test/mpi/pt2pt/big_count_status.c
new file mode 100644
index 0000000..3b93109
--- /dev/null
+++ b/test/mpi/pt2pt/big_count_status.c
@@ -0,0 +1,51 @@
+#include <mpi.h>
+#include <assert.h>
+#include <stdio.h>
+
+int test_count(MPI_Count count)
+{
+    MPI_Status stat;
+    int cancelled, cancelled2;
+    MPI_Count bcount, bcount2;
+    int nerrs = 0;
+
+    bcount = count;
+    cancelled = 0;
+    MPI_Status_set_cancelled(&stat, cancelled);
+    MPI_Status_set_elements_x(&stat, MPI_BYTE, bcount);
+    MPI_Get_elements_x(&stat, MPI_BYTE, &bcount2);
+    MPI_Test_cancelled(&stat, &cancelled2);
+    if (bcount != bcount2) {
+        fprintf(stderr, "Count Error: expected %lx, got %lx\n", bcount, bcount2);
+        nerrs++;
+    }
+    if (cancelled != cancelled2) {
+        fprintf(stderr, "Cancelled Error: expected %d, got %d\n", cancelled, cancelled2);
+        nerrs++;
+    }
+    return nerrs;
+}
+
+int main(int argc, char **argv)
+{
+    int nerrors = 0;
+
+    MPI_Init(&argc, &argv);
+    /* baseline: this tiny value should pose no problems */
+    nerrors += test_count(60);
+    /* one with no next-to-high-bits set */
+    nerrors += test_count(0x3654321f71234567);
+    /* masking after shift can help the count_high, but count_low is still
+     * wrong */
+    nerrors += test_count(0x7654321f71234567);
+    /* original problematic count reported by Artem Yalozo */
+    nerrors += test_count(0x7654321ff1234567);
+
+    if (nerrors != 0) {
+        fprintf(stderr, "found %d errors\n", nerrors);
+    }
+    else {
+        printf(" No Errors\n");
+    }
+    MPI_Finalize();
+}
diff --git a/test/mpi/pt2pt/testlist b/test/mpi/pt2pt/testlist
index f5c86aa..89de3e2 100644
--- a/test/mpi/pt2pt/testlist
+++ b/test/mpi/pt2pt/testlist
@@ -37,3 +37,4 @@ waitany-null 1
 # perhaps disable in the release tarball
 large_message 3
 mprobe 2 mpiversion=3.0
+big_count_status 1 mpiversion=3.0

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

Summary of changes:
 test/mpi/pt2pt/Makefile.am        |    3 +-
 test/mpi/pt2pt/big_count_status.c |   51 +++++++++++++++++++++++++++++++++++++
 test/mpi/pt2pt/testlist           |    1 +
 3 files changed, 54 insertions(+), 1 deletions(-)
 create mode 100644 test/mpi/pt2pt/big_count_status.c


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list