[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.1-245-g20ff1b2

Service Account noreply at mpich.org
Mon May 12 06:38:51 CDT 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  20ff1b2995ad8cb78f8913152074b71b19787b6f (commit)
       via  90e15e9b0cfb6bc74c9413a08826b1bd28976512 (commit)
       via  062e195182078c4ca12ac601530133d57ce9d914 (commit)
       via  86c80f9c492cac30a2a49d1a55f13928e407bb7e (commit)
      from  df15b7f3d3683d67af651d436b5816ca5f0383e1 (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/20ff1b2995ad8cb78f8913152074b71b19787b6f

commit 20ff1b2995ad8cb78f8913152074b71b19787b6f
Author: Rob Latham <robl at mcs.anl.gov>
Date:   Fri May 9 16:01:25 2014 -0500

    typo in ROMIO runtests

diff --git a/src/mpi/romio/test/runtests.in b/src/mpi/romio/test/runtests.in
index 6fb3835..2b8643e 100644
--- a/src/mpi/romio/test/runtests.in
+++ b/src/mpi/romio/test/runtests.in
@@ -381,7 +381,7 @@ $mpirun -np 2 ./types_with_zeros $FILENAME
 CleanExe types_with_zeros
 testfiles="$testfiles darray_read.out"
 \rm -f darray_read.out
-MakeExe darra_read
+MakeExe darray_read
 \rm -f $FILENAME*
 echo '**** Testing darray_read ****'
 $mpirun -np 4 ./darray_read $FILENAME

http://git.mpich.org/mpich.git/commitdiff/90e15e9b0cfb6bc74c9413a08826b1bd28976512

commit 90e15e9b0cfb6bc74c9413a08826b1bd28976512
Author: Rob Latham <robl at mcs.anl.gov>
Date:   Fri May 9 14:26:05 2014 -0500

    zero-length blocklens fix for structs
    
    If the 'array_of_blocklens' parameter to MPI_Type_create_struct contains
    zeros, those elements have no impact on the type.  However, there are
    two exceptions: if the type is MPI_LB or MPI_UB, the corresponding
    displacement is honored.
    
    See #2073 for more background
    
    Signed-off-by: Rajeev Thakur <thakur at mcs.anl.gov>

diff --git a/src/mpi/romio/adio/common/flatten.c b/src/mpi/romio/adio/common/flatten.c
index 42e827d..83e3c1d 100644
--- a/src/mpi/romio/adio/common/flatten.c
+++ b/src/mpi/romio/adio/common/flatten.c
@@ -665,15 +665,17 @@ void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat,
 /* simplest case, current type is basic or contiguous types */
         /* By using ADIO_Offset we preserve +/- sign and 
            avoid >2G integer arithmetic problems */
-		ADIO_Offset blocklength = ints[1+n];
-		j = *curr_index;
-		flat->indices[j] = st_offset + adds[n];
-		MPI_Type_size_x(types[n], &old_size);
-		flat->blocklens[j] = blocklength * old_size;
+		if (ints[1+n] > 0 || types[n] == MPI_LB || types[n] == MPI_UB) {
+		    ADIO_Offset blocklength = ints[1+n];
+		    j = *curr_index;
+		    flat->indices[j] = st_offset + adds[n];
+		    MPI_Type_size_x(types[n], &old_size);
+		    flat->blocklens[j] = blocklength * old_size;
 #ifdef FLATTEN_DEBUG
-		DBG_FPRINTF(stderr,"ADIOI_Flatten:: simple adds[%#X] "MPI_AINT_FMT_HEX_SPEC", flat->indices[%#llX] %#llX, flat->blocklens[%#llX] %#llX\n",n,adds[n],j, flat->indices[j], j, flat->blocklens[j]);
+		    DBG_FPRINTF(stderr,"ADIOI_Flatten:: simple adds[%#X] "MPI_AINT_FMT_HEX_SPEC", flat->indices[%#llX] %#llX, flat->blocklens[%#llX] %#llX\n",n,adds[n],j, flat->indices[j], j, flat->blocklens[j]);
 #endif
-		(*curr_index)++;
+		    (*curr_index)++;
+		}
 	    }
 	    else {
 /* current type made up of noncontiguous derived types */

http://git.mpich.org/mpich.git/commitdiff/062e195182078c4ca12ac601530133d57ce9d914

commit 062e195182078c4ca12ac601530133d57ce9d914
Author: Rob Latham <robl at mcs.anl.gov>
Date:   Fri May 9 11:38:36 2014 -0500

    rename indexed_zeros
    
    now that the test also tests hindexed and struct types, it needs a
    better name

diff --git a/src/mpi/romio/test/Makefile.am b/src/mpi/romio/test/Makefile.am
index 71bf7b9..caa5be9 100644
--- a/src/mpi/romio/test/Makefile.am
+++ b/src/mpi/romio/test/Makefile.am
@@ -25,7 +25,7 @@ AM_FFLAGS = $(USER_FFLAGS)
 CTESTS = simple perf async coll_test coll_perf misc file_info excl large_array \
      atomicity noncontig i_noncontig noncontig_coll split_coll shared_fp \
      large_file psimple error status noncontig_coll2 aggregation1 aggregation2 \
-     async-multiple ordered_fp hindexed external32 indexed_zeros darray_read
+     async-multiple ordered_fp hindexed external32 types_with_zeros darray_read
 FTESTS = fcoll_test fperf fmisc pfcoll_test 
 
 
diff --git a/src/mpi/romio/test/runtests.in b/src/mpi/romio/test/runtests.in
index 2aa2ebb..6fb3835 100644
--- a/src/mpi/romio/test/runtests.in
+++ b/src/mpi/romio/test/runtests.in
@@ -372,13 +372,13 @@ echo '**** Testing status.c ****'
 $mpirun -np 1 ./status -fname $FILENAME
 # CheckOutput status
 CleanExe status
-testfiles="$testfiles indexed_zeros.out"
-\rm -f indexed_zeros.out
-MakeExe indexed_zeros
+testfiles="$testfiles types_with_zeros.out"
+\rm -f types_with_zeros.out
+MakeExe types_with_zeros
 \rm -f $FILENAME*
-echo '**** Testing indexed_zeros ****'
-$mpirun -np 2 ./indexed_zeros $FILENAME
-CleanExe indexed_zeros
+echo '**** Testing types_with_zeros ****'
+$mpirun -np 2 ./types_with_zeros $FILENAME
+CleanExe types_with_zeros
 testfiles="$testfiles darray_read.out"
 \rm -f darray_read.out
 MakeExe darra_read
diff --git a/src/mpi/romio/test/indexed_zeros.c b/src/mpi/romio/test/types_with_zeros.c
similarity index 100%
rename from src/mpi/romio/test/indexed_zeros.c
rename to src/mpi/romio/test/types_with_zeros.c

http://git.mpich.org/mpich.git/commitdiff/86c80f9c492cac30a2a49d1a55f13928e407bb7e

commit 86c80f9c492cac30a2a49d1a55f13928e407bb7e
Author: Rob Latham <robl at mcs.anl.gov>
Date:   Fri May 9 11:35:48 2014 -0500

    exercise a few more datatypes
    
    the hindexed and struct datatypes also take "array of blocklen"
    parameters which we should ignore.

diff --git a/src/mpi/romio/test/indexed_zeros.c b/src/mpi/romio/test/indexed_zeros.c
index 96bd2cd..a4b0c15 100644
--- a/src/mpi/romio/test/indexed_zeros.c
+++ b/src/mpi/romio/test/indexed_zeros.c
@@ -18,13 +18,21 @@ static void handle_error(int errcode, const char *str)
 	MPI_Abort(MPI_COMM_WORLD, 1);
 }
 
-int test_indexed_with_zeros(char *filename)
+enum {
+    INDEXED,
+    HINDEXED,
+    STRUCT
+} testcases;
+
+int test_indexed_with_zeros(char *filename, int testcase)
 {
     int i, rank, np, buflen, num, err, nr_errors;
     int  nelms[MAXLEN], buf[MAXLEN], indices[MAXLEN], blocklen[MAXLEN];
     MPI_File fh;
     MPI_Status status;
     MPI_Datatype filetype;
+    MPI_Datatype types[MAXLEN];
+    MPI_Aint addrs[MAXLEN];
 
     MPI_Comm_rank(MPI_COMM_WORLD, &rank);
     MPI_Comm_size(MPI_COMM_WORLD, &np);
@@ -47,15 +55,32 @@ int test_indexed_with_zeros(char *filename)
     }
     MPI_Barrier(MPI_COMM_WORLD);
 
-    /* define a filetype using indexed constructor */
+    /* define a filetype with spurious leading zeros */
     buflen = num = 0;
     for (i=0; i<MAXLEN; i++) {
         buflen       += nelms[i];
         indices[num]  = i;
+        addrs[num] = i*sizeof(int);
         blocklen[num] = nelms[i];
+        types[num] = MPI_INT;
         num++;
     }
-    MPI_Type_indexed(num, blocklen, indices, MPI_INT, &filetype);
+    switch (testcase) {
+	case INDEXED:
+	    MPI_Type_indexed(num, blocklen, indices, MPI_INT, &filetype);
+	    break;
+	case HINDEXED:
+	    MPI_Type_hindexed(num, blocklen, addrs, MPI_INT, &filetype);
+	    break;
+	case STRUCT:
+	    MPI_Type_create_struct(num, blocklen, addrs, types, &filetype);
+	    break;
+	default:
+	    fprintf(stderr, "unknown testcase!\n");
+	    return(-100);
+
+    }
+
     MPI_Type_commit(&filetype);
 
     /* initialize write buffer and write to file*/
@@ -81,7 +106,8 @@ int test_indexed_with_zeros(char *filename)
         for (i=0; i<MAXLEN; i++) {
             if (buf[i] < 0) {
 		nr_errors++;
-                printf("Error: unexpected value at buf[%d] == %d\n",i,buf[i]);
+                printf("Error: unexpected value for case %d at buf[%d] == %d\n",
+			testcase,i,buf[i]);
 	    }
 	}
     }
@@ -101,7 +127,9 @@ int main(int argc, char **argv)
         if (rank == 0) fprintf(stderr,"Must run on 2 MPI processes\n");
         MPI_Finalize(); return 1;
     }
-    nr_errors += test_indexed_with_zeros(argv[1]);
+    nr_errors += test_indexed_with_zeros(argv[1], INDEXED);
+    nr_errors += test_indexed_with_zeros(argv[1], HINDEXED);
+    nr_errors += test_indexed_with_zeros(argv[1], STRUCT);
 
     if (rank == 0 && nr_errors == 0) printf(" No Errors\n");
 

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

Summary of changes:
 src/mpi/romio/adio/common/flatten.c                |   16 +++++----
 src/mpi/romio/test/Makefile.am                     |    2 +-
 src/mpi/romio/test/runtests.in                     |   14 ++++----
 .../test/{indexed_zeros.c => types_with_zeros.c}   |   38 +++++++++++++++++---
 4 files changed, 50 insertions(+), 20 deletions(-)
 rename src/mpi/romio/test/{indexed_zeros.c => types_with_zeros.c} (76%)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list