[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2b2-23-gcdf23c5

Service Account noreply at mpich.org
Wed Apr 29 16:05:16 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  cdf23c555a25d30b795896280b259d15d8ea0bdc (commit)
      from  d14132727ec37ec61bb22cc1f7f80fd8bf41e447 (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/cdf23c555a25d30b795896280b259d15d8ea0bdc

commit cdf23c555a25d30b795896280b259d15d8ea0bdc
Author: Rob Latham <robl at mcs.anl.gov>
Date:   Tue Apr 28 14:19:15 2015 -0500

    test case for large gather
    
    see #1767
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/test/mpi/.gitignore b/test/mpi/.gitignore
index 5c3bd05..6cfaa34 100644
--- a/test/mpi/.gitignore
+++ b/test/mpi/.gitignore
@@ -575,6 +575,7 @@
 /coll/bcastzerotype
 /coll/gather
 /coll/gather2
+/coll/gather_big
 /coll/iallred
 /coll/ibarrier
 /coll/icalltoallv
diff --git a/test/mpi/coll/Makefile.am b/test/mpi/coll/Makefile.am
index 0ab3079..6c7a2ed 100644
--- a/test/mpi/coll/Makefile.am
+++ b/test/mpi/coll/Makefile.am
@@ -52,6 +52,7 @@ noinst_PROGRAMS =      \
     exscan2            \
     gather             \
     gather2            \
+    gather_big         \
     iallred            \
     ibarrier           \
     icallgather        \
diff --git a/test/mpi/coll/gather_big.c b/test/mpi/coll/gather_big.c
new file mode 100644
index 0000000..58d15d3
--- /dev/null
+++ b/test/mpi/coll/gather_big.c
@@ -0,0 +1,84 @@
+/* -*- 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 "mpitest.h"
+#include <stdio.h>
+#include <stdlib.h>
+
+#define ROOT 7
+#if 0
+/* Following should always work for -n 8  256, -N 32, using longs */
+#define COUNT 1048576*32
+#endif
+#if 1
+/* Following will fail always work for -n 8 unless gather path is 64 bit clean */
+#define COUNT 1048576*32+1
+#endif
+#define VERIFY_CONST 100000000L
+
+int
+main(int argc, char *argv[])
+{
+    int rank, size;
+    int i, j;
+    long *sendbuf;
+    long *recvbuf;
+
+    MPI_Init(&argc, &argv);
+    MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+    MPI_Comm_size(MPI_COMM_WORLD, &size);
+
+    sendbuf = malloc(COUNT * sizeof(long));
+    if (sendbuf == NULL) {
+        fprintf(stderr, "PE %d:ERROR: malloc of sendbuf failed\n", rank);
+    }
+    for (i = 0; i < COUNT; i++) {
+        sendbuf[i] = (long) i + (long) rank * VERIFY_CONST;
+    }
+
+    if (rank == ROOT) {
+        recvbuf = malloc(COUNT * sizeof(long) * size);
+        if (recvbuf == NULL) {
+            fprintf(stderr, "PE %d:ERROR: malloc of recvbuf failed\n", rank);
+        }
+        for (i = 0; i < COUNT * size; i++) {
+            recvbuf[i] = -456789L;
+        }
+    }
+
+    MPI_Gather(sendbuf, COUNT, MPI_LONG, recvbuf, COUNT, MPI_LONG,
+		    ROOT, MPI_COMM_WORLD);
+
+    int lerr = 0;
+    if (rank == ROOT) {
+        for (i = 0; i < size; i++) {
+            for (j = 0; j < COUNT; j++) {
+                if (recvbuf[i * COUNT + j] != i * VERIFY_CONST + j) {
+                    printf("PE 0: mis-match error");
+                    printf("  recbuf[%d * %d + %d] = ", i, COUNT, j);
+                    printf("  %ld,", recvbuf[i * COUNT + j]);
+                    printf("  should be %ld\n", i * VERIFY_CONST + j);
+                    lerr++;
+                    if (lerr > 10) {
+                        j = COUNT;
+		    }
+                }
+            }
+        }
+	MTest_Finalize(lerr);
+	free(recvbuf);
+    } else {
+	    MTest_Finalize(lerr);
+    }
+
+    MPI_Barrier(MPI_COMM_WORLD);
+    MPI_Finalize();
+
+    free(sendbuf);
+    return 0;
+}
+
diff --git a/test/mpi/coll/testlist b/test/mpi/coll/testlist
index 2c8d5fe..765ca7a 100644
--- a/test/mpi/coll/testlist
+++ b/test/mpi/coll/testlist
@@ -78,6 +78,7 @@ exscan 10
 exscan2 5
 gather 4
 gather2 4
+gather_big 8 xfail=ticket1767
 scattern 4
 scatter2 4
 scatter3 4

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

Summary of changes:
 test/mpi/.gitignore        |    1 +
 test/mpi/coll/Makefile.am  |    1 +
 test/mpi/coll/gather_big.c |   84 ++++++++++++++++++++++++++++++++++++++++++++
 test/mpi/coll/testlist     |    1 +
 4 files changed, 87 insertions(+), 0 deletions(-)
 create mode 100644 test/mpi/coll/gather_big.c


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list