[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.1-21-g956047a

Service Account noreply at mpich.org
Thu Feb 27 11:05:11 CST 2014


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  956047a2696bdfb51d66f56d0b226df8d40ebd80 (commit)
      from  d384d9bc1cd6a1449320dae33bdfd1161a7085ba (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/956047a2696bdfb51d66f56d0b226df8d40ebd80

commit 956047a2696bdfb51d66f56d0b226df8d40ebd80
Author: Rob Latham <robl at mcs.anl.gov>
Date:   Wed Feb 26 16:38:14 2014 -0600

    ROMIO portablity: cannot "switch" on datatypes
    
    MPICH datatypes can be used in a switch statement, but OpenMPI uses
    pointers.
    
    The OpenMPI guys carried this patch for far too long. see
    https://svn.open-mpi.org/trac/ompi/ticket/2808

diff --git a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_io_dtype.c b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_io_dtype.c
index 7a76fa5..f581876 100644
--- a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_io_dtype.c
+++ b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_io_dtype.c
@@ -586,84 +586,94 @@ int convert_named(MPI_Datatype *mpi_dtype,
     fprintf(stderr, "NAMED");
 #endif
 
-    switch (*mpi_dtype)
+    if (MPI_CHAR == *mpi_dtype)
     {
-	case MPI_CHAR:
 	    ret = PVFS_Request_contiguous(1, PVFS_CHAR, pvfs_dtype);
 #ifdef DEBUG_DTYPE
 	    fprintf(stderr, "-MPI_CHAR\n");
 #endif
-	    break;
-	case MPI_BYTE:
-	    ret = PVFS_Request_contiguous(1, PVFS_BYTE, pvfs_dtype);
+    }
+    else if ( MPI_BYTE == *mpi_dtype )
+    {
+            ret = PVFS_Request_contiguous(1, PVFS_BYTE, pvfs_dtype);
 #ifdef DEBUG_DTYPE
-	    fprintf(stderr, "-MPI_BYTE\n");
+            fprintf(stderr, "-MPI_BYTE\n");
 #endif
-	    break;
-	case MPI_SHORT:
-	    ret = PVFS_Request_contiguous(1, PVFS_SHORT, pvfs_dtype);
+    }
+    else if ( MPI_SHORT == *mpi_dtype )
+    {
+            ret = PVFS_Request_contiguous(1, PVFS_SHORT, pvfs_dtype);
 #ifdef DEBUG_DTYPE
-	    fprintf(stderr, "-MPI_SHORT\n");
+            fprintf(stderr, "-MPI_SHORT\n");
 #endif
-	    break;
-	case MPI_INT:
-	    ret = PVFS_Request_contiguous(1, PVFS_INT, pvfs_dtype);	  
+    }
+    else if ( MPI_INT == *mpi_dtype )
+    {
+            ret = PVFS_Request_contiguous(1, PVFS_INT, pvfs_dtype);
 #ifdef DEBUG_DTYPE
-	    fprintf(stderr, "-MPI_INT\n");
+            fprintf(stderr, "-MPI_INT\n");
 #endif
-	    break;
-	case MPI_LONG:
-	    ret = PVFS_Request_contiguous(1, PVFS_LONG, pvfs_dtype);	  
+    }
+    else if ( MPI_LONG == *mpi_dtype )
+    {
+            ret = PVFS_Request_contiguous(1, PVFS_LONG, pvfs_dtype);
 #ifdef DEBUG_DTYPE
-	    fprintf(stderr, "-MPI_LONG\n");
+            fprintf(stderr, "-MPI_LONG\n");
 #endif
-	    break;
-	case MPI_FLOAT:
-	    ret = PVFS_Request_contiguous(1, PVFS_FLOAT, pvfs_dtype);	  
+    }
+    else if ( MPI_FLOAT == *mpi_dtype )
+    {
+	    ret  = PVFS_Request_contiguous(1, PVFS_FLOAT, pvfs_dtype);
 #ifdef DEBUG_DTYPE
 	    fprintf(stderr, "-MPI_FLOAT\n");
 #endif
-	    break;
-	case MPI_DOUBLE:
-	    ret = PVFS_Request_contiguous(1, PVFS_DOUBLE, pvfs_dtype);	  
+    }
+    else if ( MPI_DOUBLE == *mpi_dtype )
+    {
+	    ret = PVFS_Request_contiguous(1, PVFS_DOUBLE, pvfs_dtype);
 #ifdef DEBUG_DTYPE
 	    fprintf(stderr, "-MPI_DOUBLE\n");
 #endif
-	    break;
-	case MPI_UNSIGNED_CHAR:
-	    ret = PVFS_Request_contiguous(1, PVFS_UNSIGNED_CHAR, pvfs_dtype);  
+    }
+    else if ( MPI_UNSIGNED_CHAR == *mpi_dtype )
+    {
+	    ret = PVFS_Request_contiguous(1, PVFS_UNSIGNED_CHAR, pvfs_dtype);
 #ifdef DEBUG_DTYPE
 	    fprintf(stderr, "-MPI_UNSIGNED_CHAR\n");
 #endif
-	    break;
-	case MPI_UNSIGNED_SHORT:
-	    ret = PVFS_Request_contiguous(1, PVFS_UNSIGNED, pvfs_dtype); 
+    }
+    else if ( MPI_UNSIGNED_SHORT == *mpi_dtype )
+    {
+	    ret = PVFS_Request_contiguous(1, PVFS_UNSIGNED, pvfs_dtype);
 #ifdef DEBUG_DTYPE
 	    fprintf(stderr, "-MPI_UNSIGNED_SHORT\n");
 #endif
-	    break;
-	case MPI_UNSIGNED:
-	    ret = PVFS_Request_contiguous(1, PVFS_UNSIGNED, pvfs_dtype);  
+    }
+    else if ( MPI_UNSIGNED == *mpi_dtype )
+    {
+	    ret = PVFS_Request_contiguous(1, PVFS_UNSIGNED, pvfs_dtype);
 #ifdef DEBUG_DTYPE
 	    fprintf(stderr, "-MPI_SHORT\n");
 #endif
-	    break;
-	case MPI_UNSIGNED_LONG:
-	    ret = PVFS_Request_contiguous(1, PVFS_UNSIGNED_LONG, pvfs_dtype);  
+    }
+    else if ( MPI_UNSIGNED_LONG == *mpi_dtype )
+    {
+	    ret = PVFS_Request_contiguous(1, PVFS_UNSIGNED_LONG, pvfs_dtype);
 #ifdef DEBUG_DTYPE
 	    fprintf(stderr, "-MPI_UNSIGNED_LONG\n");
 #endif
-	    break;
-	case MPI_LONG_DOUBLE:
-	    ret = PVFS_Request_contiguous(1, PVFS_LONG_DOUBLE, pvfs_dtype);  
+    }
+    else if ( MPI_LONG_DOUBLE == *mpi_dtype )
+    {
+	    ret = PVFS_Request_contiguous(1, PVFS_LONG_DOUBLE, pvfs_dtype);
 #ifdef DEBUG_DTYPE
 	    fprintf(stderr, "-MPI_LONG_DOUBLE\n");
 #endif
-	    break;
-	default:
+    }
+    else
+    {
 	    fprintf(stderr, "convert_named: predefined type not found");
 	    return -1;
-	    break;
     }
     if (ret != 0)
 	fprintf(stderr, "convert_named: Datatype creation failed\n");

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

Summary of changes:
 src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_io_dtype.c |   94 +++++++++++++----------
 1 files changed, 52 insertions(+), 42 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list