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

Service Account noreply at mpich.org
Mon Jun 15 10:37:31 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  9d508d5d83f35978ffaaae1557280969ff47201c (commit)
      from  5324a41f661085fdcd6c6365635accf9fa65839a (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/9d508d5d83f35978ffaaae1557280969ff47201c

commit 9d508d5d83f35978ffaaae1557280969ff47201c
Author: Lena Oden <loden at anl.gov>
Date:   Wed Jun 10 12:43:37 2015 -0500

    Add a isend-irecv test for multiple processors
    
    This test uses irecv and isend to transfer data in
    an alltoall manner between multiple processes.
    The idea of this test is testing, if MPI can handle
    multiple processes trying to connect to each other from
    both sides at the same time.
    
    Signed-off-by: Antonio J. Pena <apenya at mcs.anl.gov>

diff --git a/test/mpi/pt2pt/Makefile.am b/test/mpi/pt2pt/Makefile.am
index 9c5d352..d31d31c 100644
--- a/test/mpi/pt2pt/Makefile.am
+++ b/test/mpi/pt2pt/Makefile.am
@@ -25,6 +25,7 @@ noinst_PROGRAMS =  \
     cancelanysrc   \
     isendself      \
     issendselfcancel \
+    isendirecv     \
     sendself       \
     eagerdt        \
     isendselfprobe \
diff --git a/test/mpi/pt2pt/isendirecv.c b/test/mpi/pt2pt/isendirecv.c
new file mode 100644
index 0000000..e2fccf6
--- /dev/null
+++ b/test/mpi/pt2pt/isendirecv.c
@@ -0,0 +1,48 @@
+/* -*- 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 <stdlib.h>
+#include <stdio.h>
+#include "mpitest.h"
+
+int main(int argc, char *argv[])
+{
+    int errors = 0;
+    int elems = 20;
+    int rank, nproc, dest, i;
+    float *in_buf, *out_buf;
+    MPI_Comm      comm;
+    MPI_Request *reqs;
+
+    MTest_Init(&argc, &argv);
+
+    comm = MPI_COMM_WORLD;
+    MPI_Comm_rank(comm, &rank);
+    MPI_Comm_size(comm, &nproc);
+
+    reqs = (MPI_Request *)malloc(2 * nproc * sizeof(MPI_Request));
+    in_buf = (float *)malloc(elems * nproc * sizeof(float));
+    out_buf = (float *)malloc(elems * nproc * sizeof(float));
+
+    for (i=0; i<nproc; i++) {
+        MPI_Irecv(&in_buf[elems*i], elems, MPI_FLOAT, i,
+                  0, comm, &reqs[i]);
+       }
+
+    for (i=0; i<nproc; i++) {
+        MPI_Isend(&out_buf[elems*i], elems, MPI_FLOAT, i, 0,
+                    comm, &reqs[i+nproc]);
+       }
+
+    MPI_Waitall(nproc*2,reqs, MPI_STATUSES_IGNORE);
+
+    MTest_Finalize(errors);
+    MPI_Finalize();
+    return 0;
+
+}
diff --git a/test/mpi/pt2pt/testlist b/test/mpi/pt2pt/testlist
index 8f5afbb..aa45f32 100644
--- a/test/mpi/pt2pt/testlist
+++ b/test/mpi/pt2pt/testlist
@@ -17,6 +17,7 @@ bsendalign 2
 bsendpending 2
 isendself 1
 issendselfcancel 1
+isendirecv 10
 bsendfrag 2
 icsend 4
 rqstatus 2

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

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


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list