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

mysql vizuser noreply at mpich.org
Mon Oct 21 20:07:51 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  9f7f11253aee100565a379632c74139a02f4bbec (commit)
      from  c580679c9a583486ad321c885aaeb13351018716 (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/9f7f11253aee100565a379632c74139a02f4bbec

commit 9f7f11253aee100565a379632c74139a02f4bbec
Author: William Gropp <wgropp at illinois.edu>
Date:   Thu Oct 17 13:40:39 2013 -0500

    Add way to test implementation specific features
    
    Adds to the test suite a way to include tests that are specific to
    a particular implementation.  Currently includes only one for MPICH,
    testing the basic features of mpi_t.  This also serves as a test of the
    implementation tests themselves.
    
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/test/mpi/Makefile.am b/test/mpi/Makefile.am
index c314e09..218aaed 100644
--- a/test/mpi/Makefile.am
+++ b/test/mpi/Makefile.am
@@ -11,7 +11,7 @@ include $(top_srcdir)/Makefile.mtest
 ACLOCAL_AMFLAGS = -I confdb
 
 static_subdirs = util attr basic datatype coll comm errhan group info init \
-                 pt2pt rma topo errors manual perf mpi_t
+                 pt2pt rma topo errors manual perf mpi_t impls
 all_lang_subdirs = f77 cxx f90
 
 # DIST_SUBDIRS must be a superset of SUBDIRS, and automake must be able to
diff --git a/test/mpi/configure.ac b/test/mpi/configure.ac
index 837ec75..220a3bd 100644
--- a/test/mpi/configure.ac
+++ b/test/mpi/configure.ac
@@ -1232,6 +1232,24 @@ if test "$enable_romio" != no ; then
 fi
 AC_SUBST(iodir)
 
+impldir="#"
+#
+# Check for implementation to enable implementation-specific options
+if test $enable_strictmpi != "yes" ; then
+   # Is this MPICH?
+   if test "$FROM_MPICH" = yes ; then
+      impldir="mpich"
+   else
+       AC_CACHE_CHECK([Is the MPI derived from MPICH],
+       pac_cv_ismpich,[
+     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include "mpi.h"],[return 1 + MPICH;]),
+       pac_cv_ismpich=yes,pac_cv_ismpich=no])])
+       if test "$pac_cv_ismpich" = "yes" ; then
+           impldir="mpich"
+       fi
+   fi
+fi
+AC_SUBST(impldir)
 #
 # MPI_INTEGER16 is mentioned in only one place in MPI 2.1, and some
 # implementations may have missed it.  Check to see if it is available in 
@@ -1506,5 +1524,10 @@ AC_OUTPUT(maint/testmerge \
           threads/testlist \
           errors/testlist \
           errors/cxx/testlist \
+          impls/testlist \
+          impls/Makefile \
+          impls/mpich/Makefile \
+          impls/mpich/testlist \
+          impls/mpich/mpi_t/Makefile \
           )
 
diff --git a/test/mpi/impls/Makefile.am b/test/mpi/impls/Makefile.am
new file mode 100644
index 0000000..fbe2c38
--- /dev/null
+++ b/test/mpi/impls/Makefile.am
@@ -0,0 +1,14 @@
+# -*- Mode: Makefile; -*-
+# vim: set ft=automake :
+#
+# (C) 2011 by Argonne National Laboratory.
+#     See COPYRIGHT in top-level directory.
+#
+
+include $(top_srcdir)/Makefile.mtest
+
+EXTRA_DIST = testlist.in
+
+static_subdirs =
+SUBDIRS      = $(static_subdirs) $(impldir)
+DIST_SUBDIRS = $(static_subdirs) mpich
diff --git a/test/mpi/impls/README b/test/mpi/impls/README
new file mode 100644
index 0000000..5e5de06
--- /dev/null
+++ b/test/mpi/impls/README
@@ -0,0 +1,4 @@
+This directory contains tests that are implementation-specific.  These may be
+for an implementation (such as MPICH) or a subsystem (such as Hydra or ROMIO).
+Configure will attempt to enable the relevant tests, but they may need to be
+manually selected.
diff --git a/test/mpi/impls/mpich/Makefile.am b/test/mpi/impls/mpich/Makefile.am
new file mode 100644
index 0000000..00dbe35
--- /dev/null
+++ b/test/mpi/impls/mpich/Makefile.am
@@ -0,0 +1,19 @@
+# -*- Mode: Makefile; -*-
+# vim: set ft=automake :
+#
+# (C) 2011 by Argonne National Laboratory.
+#     See COPYRIGHT in top-level directory.
+#
+
+include $(top_srcdir)/Makefile.mtest
+
+EXTRA_DIST = testlist.in
+
+static_subdirs = mpi_t
+# For future tests - note that the IO and RMA directories are optional,
+# and need to be handled as shown in this comment
+#SUBDIRS      = $(static_subdirs) $(iodir) $(rmadir)
+SUBDIRS      = $(static_subdirs)
+# For future tests, as noted above
+#DIST_SUBDIRS = $(static_subdirs) io rma
+DIST_SUBDIRS = $(static_subdirs)
diff --git a/test/mpi/impls/mpich/mpi_t/Makefile.am b/test/mpi/impls/mpich/mpi_t/Makefile.am
new file mode 100644
index 0000000..d14072f
--- /dev/null
+++ b/test/mpi/impls/mpich/mpi_t/Makefile.am
@@ -0,0 +1,16 @@
+# -*- Mode: Makefile; -*-
+# vim: set ft=automake :
+#
+# (C) 2011 by Argonne National Laboratory.
+#     See COPYRIGHT in top-level directory.
+#
+
+include $(top_srcdir)/Makefile.mtest
+
+EXTRA_DIST = testlist
+
+## for all programs that are just built from the single corresponding source
+## file, we don't need per-target _SOURCES rules, automake will infer them
+## correctly
+noinst_PROGRAMS = \
+	collparmt
diff --git a/test/mpi/impls/mpich/mpi_t/collparmt.c b/test/mpi/impls/mpich/mpi_t/collparmt.c
new file mode 100644
index 0000000..588a3f2
--- /dev/null
+++ b/test/mpi/impls/mpich/mpi_t/collparmt.c
@@ -0,0 +1,147 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ *  (C) 2013 by Argonne National Laboratory.
+ *      See COPYRIGHT in top-level directory.
+ */
+/* */
+#include <stdio.h>
+#include "mpi.h"
+#include "mpitestconf.h"
+
+int main( int argc, char *argv[] )
+{
+    int          i, ncvar, cnameLen, verbosity, binding, scope;
+    int          wrank, wsize, provided;
+    char         cname[256];
+    char         buf1[400], buf2[400], buf3[500];
+    MPI_Datatype dtype;
+    MPI_T_enum   enumtype;
+    MPI_T_cvar_handle bcastHandle, bcastLongHandle;
+    int          bcastCount, bcastScope, bcastCvar;
+    int          bcastLongCount, bcastLongScope, bcastLongCvar;
+    int          gatherCount, gatherScope, gatherCvar;
+    int          newval;
+    int          errs = 0;
+
+    MPI_Init( &argc, &argv );
+    MPI_T_init_thread( MPI_THREAD_SINGLE, &provided );
+
+    MPI_Comm_rank( MPI_COMM_WORLD, &wrank );
+    MPI_Comm_size( MPI_COMM_WORLD, &wsize );
+
+    MPI_T_cvar_get_num( &ncvar );
+    /* Find collective tuning cvars */
+    for (i=0; i<ncvar; i++) {
+	cnameLen = sizeof(cname);
+	MPI_T_cvar_get_info( i, cname, &cnameLen, &verbosity, &dtype,
+			     &enumtype, NULL, NULL, &binding, &scope );
+	if (strcmp( cname, "GATHER_VSMALL_MSG_SIZE" ) == 0) {
+	    gatherCvar  = i;
+	    gatherScope = scope;
+	}
+	else if (strcmp( cname, "BCAST_SHORT_MSG_SIZE" ) == 0) {
+	    bcastCvar = i;
+	    bcastScope = scope;
+	    if (binding != MPI_T_BIND_NO_OBJECT &&
+		binding != MPI_T_BIND_MPI_COMM) {
+		fprintf( stderr, "Unexpected binding for BCAST_SHORT_MSG\n" );
+		errs++;
+	    }
+	}
+	else if (strcmp( cname, "BCAST_LONG_MSG_SIZE" ) == 0) {
+	    bcastLongCvar = i;
+	    bcastLongScope = scope;
+	    if (binding != MPI_T_BIND_NO_OBJECT &&
+		binding != MPI_T_BIND_MPI_COMM) {
+		fprintf( stderr, "Unexpected binding for BCAST_LONG_MSG\n" );
+		errs++;
+	    }
+	}
+	else if (strcmp( cname, "BCAST_MIN_PROCS" ) == 0) {
+	}
+    }
+
+    /* Change the BCAST cvar.  If the parameter has local scope,
+       change it only on some processes */
+    if (bcastCvar < 0 || bcastLongCvar < 0) {
+        /* Skip because we did not find a corresponding control variable */
+    }
+    else {
+	MPI_T_cvar_handle_alloc( bcastCvar, NULL, &bcastHandle,
+				 &bcastCount );
+	if (bcastScope == MPI_T_SCOPE_LOCAL) {
+	    if ((wrank & 0x1)) {
+		newval = 100;
+		MPI_T_cvar_write( bcastHandle, &newval );
+		MPI_T_cvar_read( bcastHandle, &newval );
+		if (newval != 100) {
+		    errs++;
+		    fprintf( stderr, "cvar write failed for bcast\n" );
+		}
+	    }
+	}
+	else {
+	    newval = 100;
+	    MPI_T_cvar_write( bcastHandle, &newval );
+	    MPI_T_cvar_read( bcastHandle, &newval );
+	    if (newval != 100) {
+		errs++;
+		fprintf( stderr, "cvar write failed for bcast\n" );
+	    }
+	}
+
+	MPI_T_cvar_handle_alloc( bcastLongCvar, NULL, &bcastLongHandle,
+				 &bcastLongCount );
+	if (bcastLongScope == MPI_T_SCOPE_LOCAL) {
+	    if ((wrank & 0x1)) {
+		newval = 200;
+		MPI_T_cvar_write( bcastLongHandle, &newval );
+		MPI_T_cvar_read( bcastLongHandle, &newval );
+		if (newval != 200) {
+		    errs++;
+		    fprintf( stderr, "cvar write failed for bcast long\n" );
+		}
+	    }
+	}
+	else {
+	    newval = 100;
+	    MPI_T_cvar_write( bcastLongHandle, &newval );
+	    MPI_T_cvar_read( bcastLongHandle, &newval );
+	    if (newval != 100) {
+		errs++;
+		fprintf( stderr, "cvar write failed for bcast long\n" );
+	    }
+	}
+
+	/* Test 1: Everyone under the new size */
+	MPI_Bcast( buf1, 40, MPI_BYTE, 0, MPI_COMM_WORLD );
+
+	/* Test 2: Everyone between the old and new size */
+	/* As of 8/16/13, it appears that the small and medium algorithm
+	   are the same; at least, local changes do not cause deadlocks */
+	MPI_Bcast( buf2, 150, MPI_BYTE, 0, MPI_COMM_WORLD );
+
+	/* Test 3: Everyone over the new long size */
+	/* As of 8/16/13, this causes the program to hang, almost
+	   certainly because the parameters much be changed collectively
+	   but incorrectly indicate that they have local scope */
+	MPI_Bcast( buf3, 250, MPI_BYTE, 0, MPI_COMM_WORLD );
+
+	MPI_T_cvar_handle_free( &bcastHandle );
+	MPI_T_cvar_handle_free( &bcastLongHandle );
+    }
+
+    /* Change the GATHER cvar.  If the parameter has local scope,
+       change it only on some processes.  Use a subcommunicator if the
+       size of comm_world is too large */
+
+    /* For full coverage, should address all parameters for collective
+       algorithm selection */
+
+    if (wrank == 0) printf( "Errors = %d\n", errs );
+
+    MPI_T_finalize();
+    MPI_Finalize();
+
+    return 0;
+}
diff --git a/test/mpi/impls/mpich/mpi_t/testlist b/test/mpi/impls/mpich/mpi_t/testlist
new file mode 100644
index 0000000..0a1b545
--- /dev/null
+++ b/test/mpi/impls/mpich/mpi_t/testlist
@@ -0,0 +1 @@
+collparmt 16
\ No newline at end of file
diff --git a/test/mpi/impls/mpich/testlist.in b/test/mpi/impls/mpich/testlist.in
new file mode 100644
index 0000000..f9d9b7d
--- /dev/null
+++ b/test/mpi/impls/mpich/testlist.in
@@ -0,0 +1,5 @@
+mpi_t
+# The IO and RMA directories are optional and need to be handled in
+# a special way.  Uncomment these as appropriate when a test is added.
+#@iodir@
+#@rmadir@
diff --git a/test/mpi/impls/testlist.in b/test/mpi/impls/testlist.in
new file mode 100644
index 0000000..f416a42
--- /dev/null
+++ b/test/mpi/impls/testlist.in
@@ -0,0 +1 @@
+ at impldir@
\ No newline at end of file
diff --git a/test/mpi/testlist.in b/test/mpi/testlist.in
index f822165..f84f2ba 100644
--- a/test/mpi/testlist.in
+++ b/test/mpi/testlist.in
@@ -23,3 +23,4 @@ topo
 @threadsdir@
 @ckpointdir@
 @ftdir@
+impls

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

Summary of changes:
 test/mpi/Makefile.am                               |    2 +-
 test/mpi/configure.ac                              |   23 +++
 test/mpi/{errors/cxx => impls}/Makefile.am         |    6 +-
 test/mpi/impls/README                              |    4 +
 test/mpi/impls/mpich/Makefile.am                   |   19 +++
 .../{errors/attr => impls/mpich/mpi_t}/Makefile.am |    4 +-
 test/mpi/impls/mpich/mpi_t/collparmt.c             |  147 ++++++++++++++++++++
 test/mpi/impls/mpich/mpi_t/testlist                |    1 +
 test/mpi/impls/mpich/testlist.in                   |    5 +
 test/mpi/impls/testlist.in                         |    1 +
 test/mpi/testlist.in                               |    1 +
 11 files changed, 207 insertions(+), 6 deletions(-)
 copy test/mpi/{errors/cxx => impls}/Makefile.am (67%)
 create mode 100644 test/mpi/impls/README
 create mode 100644 test/mpi/impls/mpich/Makefile.am
 copy test/mpi/{errors/attr => impls/mpich/mpi_t}/Makefile.am (92%)
 create mode 100644 test/mpi/impls/mpich/mpi_t/collparmt.c
 create mode 100644 test/mpi/impls/mpich/mpi_t/testlist
 create mode 100644 test/mpi/impls/mpich/testlist.in
 create mode 100644 test/mpi/impls/testlist.in


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list