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

mysql vizuser noreply at mpich.org
Sun Oct 20 18:10:06 CDT 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  011cd3dfd015608babb640b35266a792231e8833 (commit)
      from  269fc330d21d8ff49264d57b6dee875a08fa60ef (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/011cd3dfd015608babb640b35266a792231e8833

commit 011cd3dfd015608babb640b35266a792231e8833
Author: Xin Zhao <xinzhao3 at illinois.edu>
Date:   Sun Oct 20 13:12:45 2013 -0500

    Multi-threaded RMA test.
    
    Multiple threads do RMA operations and flush on the same target.
    
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/test/mpi/configure.ac b/test/mpi/configure.ac
index b63ee20..837ec75 100644
--- a/test/mpi/configure.ac
+++ b/test/mpi/configure.ac
@@ -1470,6 +1470,7 @@ AC_OUTPUT(maint/testmerge \
           threads/comm/Makefile \
           threads/init/Makefile \
           threads/spawn/Makefile \
+          threads/rma/Makefile \
           errors/Makefile \
           errors/attr/Makefile \
           errors/basic/Makefile \
diff --git a/test/mpi/threads/Makefile.am b/test/mpi/threads/Makefile.am
index 8bdb863..bb3ec8c 100644
--- a/test/mpi/threads/Makefile.am
+++ b/test/mpi/threads/Makefile.am
@@ -9,5 +9,5 @@ include $(top_srcdir)/Makefile.mtest
 
 EXTRA_DIST = testlist.in
 
-SUBDIRS = util pt2pt comm init $(spawndir)
-DIST_SUBDIRS = util pt2pt comm init spawn
\ No newline at end of file
+SUBDIRS = util pt2pt comm init $(spawndir) rma
+DIST_SUBDIRS = util pt2pt comm init spawn rma
\ No newline at end of file
diff --git a/test/mpi/threads/Makefile.am b/test/mpi/threads/rma/Makefile.am
similarity index 50%
copy from test/mpi/threads/Makefile.am
copy to test/mpi/threads/rma/Makefile.am
index 8bdb863..b34cbcc 100644
--- a/test/mpi/threads/Makefile.am
+++ b/test/mpi/threads/rma/Makefile.am
@@ -5,9 +5,8 @@
 ##     See COPYRIGHT in top-level directory.
 ##
 
-include $(top_srcdir)/Makefile.mtest
+include $(top_srcdir)/threads/Makefile_threads.mtest
 
-EXTRA_DIST = testlist.in
+EXTRA_DIST = testlist
 
-SUBDIRS = util pt2pt comm init $(spawndir)
-DIST_SUBDIRS = util pt2pt comm init spawn
\ No newline at end of file
+noinst_PROGRAMS = multirma
diff --git a/test/mpi/threads/rma/multirma.c b/test/mpi/threads/rma/multirma.c
new file mode 100644
index 0000000..eb9d5b5
--- /dev/null
+++ b/test/mpi/threads/rma/multirma.c
@@ -0,0 +1,65 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ *  (C) 2001 by Argonne National Laboratory.
+ *      See COPYRIGHT in top-level directory.
+ */
+
+#include "mpi.h"
+#include "stdio.h"
+#include "stdlib.h"
+#include "mpitest.h"
+#include "mpithreadtest.h"
+
+#define COUNT 1
+#define NUM_THREADS 4
+#define LOOPS 100000
+
+MPI_Win win;
+int errs = 0;
+
+MTEST_THREAD_RETURN_TYPE run_test(void *arg)
+{
+    int i;
+
+    for (i = 0; i < LOOPS; i++) {
+        MPI_Put(&i, 1, MPI_INT, 0, 0, 1, MPI_INT, win);
+        MPI_Win_flush(0, win);
+    }
+
+    return (MTEST_THREAD_RETURN_TYPE) NULL;
+}
+
+int main(int argc, char *argv[])
+{
+    int nprocs, i, pmode;
+    char *win_buf;
+
+    MTest_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &pmode);
+    if (pmode != MPI_THREAD_MULTIPLE) {
+	fprintf(stderr, "Thread Multiple not supported by the MPI implementation\n");
+        MPI_Abort(MPI_COMM_WORLD, -1);
+    }
+
+    MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
+
+    if (nprocs < 2) {
+        printf("Run this program with 2 or more processes\n");
+        MPI_Abort(MPI_COMM_WORLD, 1);
+    }
+
+    errs += MPI_Win_allocate(COUNT * sizeof(int), sizeof(int), MPI_INFO_NULL, MPI_COMM_WORLD, &win_buf, &win);
+    errs += MPI_Win_lock_all(0, win);
+
+    for (i = 0; i < NUM_THREADS; i++)
+        errs += MTest_Start_thread(run_test, NULL);
+    errs += MTest_Join_threads();
+
+    errs += MPI_Win_unlock_all(win);
+
+    errs += MPI_Win_free(&win);
+
+    MTest_Finalize(errs);
+    MPI_Finalize();
+
+    return 0;
+}
diff --git a/test/mpi/threads/rma/testlist b/test/mpi/threads/rma/testlist
new file mode 100644
index 0000000..d476236
--- /dev/null
+++ b/test/mpi/threads/rma/testlist
@@ -0,0 +1 @@
+multirma 2 mpiversion=3.0
\ No newline at end of file
diff --git a/test/mpi/threads/testlist.in b/test/mpi/threads/testlist.in
index 0cae8d2..934ff26 100644
--- a/test/mpi/threads/testlist.in
+++ b/test/mpi/threads/testlist.in
@@ -2,3 +2,4 @@ pt2pt
 comm
 init
 @spawndir@
+rma

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

Summary of changes:
 test/mpi/configure.ac                      |    1 +
 test/mpi/threads/Makefile.am               |    4 +-
 test/mpi/threads/{init => rma}/Makefile.am |    3 +-
 test/mpi/threads/rma/multirma.c            |   65 ++++++++++++++++++++++++++++
 test/mpi/threads/rma/testlist              |    1 +
 test/mpi/threads/testlist.in               |    1 +
 6 files changed, 71 insertions(+), 4 deletions(-)
 copy test/mpi/threads/{init => rma}/Makefile.am (89%)
 create mode 100644 test/mpi/threads/rma/multirma.c
 create mode 100644 test/mpi/threads/rma/testlist


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list