[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2-351-gea008be

Service Account noreply at mpich.org
Mon Jul 25 11:17:18 CDT 2016


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  ea008be1976a301092ccb7a35b3ee1f9a4ec4d07 (commit)
       via  c46336bb6ce6a2a70e4bcd99478a8faa068abde0 (commit)
      from  e64f798aeb003aed58cb4deebda9a9ef7473fb0a (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/ea008be1976a301092ccb7a35b3ee1f9a4ec4d07

commit ea008be1976a301092ccb7a35b3ee1f9a4ec4d07
Author: Rob Latham <robl at mcs.anl.gov>
Date:   Fri Jul 1 09:54:56 2016 -0500

    clean up romio tests a bit
    
    give the ROMIO tests better error handling.  While here, removed
    whitespace and fixed error reporting of errors in hindexed test.  clean
    up open files in error case remove whitepsace and properly format
    unexpected output
    
    No Reviewer

diff --git a/src/mpi/romio/test/atomicity.c b/src/mpi/romio/test/atomicity.c
index 7797075..e2cd0c6 100644
--- a/src/mpi/romio/test/atomicity.c
+++ b/src/mpi/romio/test/atomicity.c
@@ -84,7 +84,8 @@ int main(int argc, char **argv)
     err = MPI_File_set_atomicity(fh, 1);
     if (err != MPI_SUCCESS) {
 	fprintf(stderr, "Atomic mode not supported on this file system.\n");fflush(stderr);
-	MPI_Abort(MPI_COMM_WORLD, 1);
+	errs++;
+	goto fn_exit;
     }
 
     MPI_Barrier(MPI_COMM_WORLD);
@@ -102,7 +103,7 @@ int main(int argc, char **argv)
 		    if (readbuf[i] != 0) {
 			errs++;
 			fprintf(stderr, "Process %d: readbuf[%d] is %d, should be 0\n", mynod, i, readbuf[i]);
-			MPI_Abort(MPI_COMM_WORLD, 1);
+			goto fn_exit;
 		    }
 	    }
 	    else if (readbuf[0] == 10) { /* the rest must also be 10 */
@@ -110,7 +111,7 @@ int main(int argc, char **argv)
 		    if (readbuf[i] != 10) {
 			errs++;
 			fprintf(stderr, "Process %d: readbuf[%d] is %d, should be 10\n", mynod, i, readbuf[i]);
-			MPI_Abort(MPI_COMM_WORLD, 1);
+			goto fn_exit;
 		    }
 	    }
 	    else {
@@ -168,7 +169,7 @@ int main(int argc, char **argv)
 		    if (readbuf[i] != 0) {
 			errs++;
 			fprintf(stderr, "Process %d: readbuf[%d] is %d, should be 0\n", mynod, i, readbuf[i]);
-			MPI_Abort(MPI_COMM_WORLD, 1);
+			goto fn_exit;
 		    }
 	    }
 	    else if (readbuf[0] == 10) {
@@ -176,7 +177,7 @@ int main(int argc, char **argv)
 		    if (readbuf[i] != 10) {
 			errs++;
 			fprintf(stderr, "Process %d: readbuf[%d] is %d, should be 10\n", mynod, i, readbuf[i]);
-			MPI_Abort(MPI_COMM_WORLD, 1);
+			goto fn_exit;
 		    }
 	    }
 	    else {
@@ -186,6 +187,9 @@ int main(int argc, char **argv)
 	}
     }
 
+    MPI_Type_free(&newtype);
+    MPI_Info_free(&info);
+fn_exit:
     MPI_File_close(&fh);
 	
     MPI_Barrier(MPI_COMM_WORLD);
@@ -199,8 +203,6 @@ int main(int argc, char **argv)
 	    fprintf( stdout, " No Errors\n" );
 	}
     }
-    MPI_Type_free(&newtype);
-    MPI_Info_free(&info);
     free(writebuf);
     free(readbuf);
     free(filename);
diff --git a/src/mpi/romio/test/excl.c b/src/mpi/romio/test/excl.c
index e48bb3d..b531acc 100644
--- a/src/mpi/romio/test/excl.c
+++ b/src/mpi/romio/test/excl.c
@@ -10,6 +10,13 @@
 
 /* tests MPI_MODE_EXCL */
 
+static void handle_error(int errcode, const char *str)
+{
+	char msg[MPI_MAX_ERROR_STRING];
+	int resultlen;
+	MPI_Error_string(errcode, msg, &resultlen);
+	fprintf(stderr, "%s: %s\n", str, msg);
+}
 int main(int argc, char **argv)
 {
     MPI_File fh;
@@ -53,6 +60,7 @@ int main(int argc, char **argv)
     err = MPI_File_open(MPI_COMM_WORLD, filename, 
          MPI_MODE_CREATE | MPI_MODE_EXCL | MPI_MODE_RDWR, MPI_INFO_NULL , &fh);
     if (err != MPI_SUCCESS) {
+	handle_error(err, "MPI_File_open");
 	errs++;
 	fprintf(stderr, "Process %d: open failed when it should have succeeded\n", rank);
     }
@@ -66,6 +74,7 @@ int main(int argc, char **argv)
     if (err == MPI_SUCCESS) {
 	errs++;
 	fprintf(stderr, "Process %d: open succeeded when it should have failed\n", rank);
+	MPI_File_close(&fh);
     }
 
     MPI_Allreduce( &errs, &toterrs, 1, MPI_INT, MPI_SUM, MPI_COMM_WORLD );
diff --git a/src/mpi/romio/test/hindexed.c b/src/mpi/romio/test/hindexed.c
index ebc0ae8..9fff194 100644
--- a/src/mpi/romio/test/hindexed.c
+++ b/src/mpi/romio/test/hindexed.c
@@ -109,29 +109,29 @@ int main(int argc, char **argv) {
 
    P0's 's layout                               P1's layout
    [ 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9] | [ 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9]
-[ 0] 0 1 2     3 4 5                          |                       D E F     G H I    
-[ 1]                                          |                                          
-[ 2] 6 7 8     9 : ;                          |                       J K L     M N O    
-[ 3]                                          |                                          
-[ 4]                                          |                                          
-[ 5]                                          |                                          
-[ 6]                                          |                                          
-[ 7]                                          |                                          
-[ 8]                                          |                                          
-[ 9]                                          |                                          
+[ 0] 0 1 2     3 4 5                          |                       D E F     G H I
+[ 1]                                          |
+[ 2] 6 7 8     9 : ;                          |                       J K L     M N O
+[ 3]                                          |
+[ 4]                                          |
+[ 5]                                          |
+[ 6]                                          |
+[ 7]                                          |
+[ 8]                                          |
+[ 9]                                          |
 
    P2's 's layout                               P3's layout
    [ 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9] | [ 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9]
-[ 0]                                          |                                          
-[ 1]                                          |                                          
-[ 2]                                          |                                          
-[ 3]                                          |                                          
-[ 4]                                          |                                          
-[ 5] X Y Z     [ \ ]                          |                       l m n     o p q    
-[ 6]                                          |                                          
-[ 7] ^ _ `     a b c                          |                       r s t     u v w    
-[ 8]                                          |                                          
-[ 9]                                          |                                          
+[ 0]                                          |
+[ 1]                                          |
+[ 2]                                          |
+[ 3]                                          |
+[ 4]                                          |
+[ 5] X Y Z     [ \ ]                          |                       l m n     o p q
+[ 6]                                          |
+[ 7] ^ _ `     a b c                          |                       r s t     u v w
+[ 8]                                          |
+[ 9]                                          |
 */
 
     /* initialize the write buffer */
@@ -205,7 +205,7 @@ int main(int argc, char **argv) {
         for(i=0; i<2*YLEN*num_io; i++) {
 	    for(j=0; j<2*XLEN; j++) {
 		if( *ptr != compare_buf[i][j]) {
-			fprintf(stderr, "expected %d got %d at [%d][%d]\n", 
+			fprintf(stderr, "expected %c got %c at [%d][%d]\n", 
 					*ptr, compare_buf[i][j], i, j);
 			nr_errors++;
 		}
@@ -235,26 +235,26 @@ int main(int argc, char **argv) {
    [ 0 1 2 3 4 5 6 7 8 9  0 1 2 3 4 5 6 7 8 9 ]
 
 [ 0] 0 1 2     3 4 5      D E F     G H I    
-[ 1]                                         
+[ 1]
 [ 2] 6 7 8     9 : ;      J K L     M N O    
-[ 3]                                         
-[ 4]                                         
+[ 3]
+[ 4]
 [ 5] X Y Z     [ \ ]      l m n     o p q    
-[ 6]                                         
+[ 6]
 [ 7] ^ _ `     a b c      r s t     u v w    
-[ 8]                                         
-[ 9]                                         
+[ 8]
+[ 9]
 
 [10] 0 1 2     3 4 5      D E F     G H I    
-[11]                                         
+[11]
 [12] 6 7 8     9 : ;      J K L     M N O    
-[13]                                         
-[14]                                         
+[13]
+[14]
 [15] X Y Z     [ \ ]      l m n     o p q    
-[16]                                         
+[16]
 [17] ^ _ `     a b c      r s t     u v w    
-[18]                                         
-[19]                                         
+[18]
+[19]
 
 */
 
diff --git a/src/mpi/romio/test/ordered_fp.c b/src/mpi/romio/test/ordered_fp.c
index 8090e1f..36eea93 100644
--- a/src/mpi/romio/test/ordered_fp.c
+++ b/src/mpi/romio/test/ordered_fp.c
@@ -19,7 +19,6 @@ void handle_error(int errcode, const char *str)
 	int resultlen;
 	MPI_Error_string(errcode, msg, &resultlen);
 	fprintf(stderr, "%s: %s\n", str, msg);
-	MPI_Abort(MPI_COMM_WORLD, 1);
 }
 
 /* tests shared file pointer functions */
diff --git a/src/mpi/romio/test/shared_fp.c b/src/mpi/romio/test/shared_fp.c
index df41bdd..62174b3 100644
--- a/src/mpi/romio/test/shared_fp.c
+++ b/src/mpi/romio/test/shared_fp.c
@@ -18,7 +18,6 @@ void handle_error(int errcode, const char *str)
 	int resultlen;
 	MPI_Error_string(errcode, msg, &resultlen);
 	fprintf(stderr, "%s: %s\n", str, msg);
-	MPI_Abort(MPI_COMM_WORLD, 1);
 }
 
 /* tests shared file pointer functions */
@@ -70,11 +69,13 @@ int main(int argc, char **argv)
 		    MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh);
     if (errcode != MPI_SUCCESS) {
 	    handle_error(errcode, "MPI_File_open");
+	    errs++;
     }
 
     errcode = MPI_File_write_shared(fh, buf, COUNT, MPI_INT, &status);
     if (errcode != MPI_SUCCESS) {
 	    handle_error(errcode, "MPI_File_write_shared");
+	    errs++;
     }
 
     for (i=0; i<COUNT; i++) buf[i] = 0;
@@ -84,11 +85,13 @@ int main(int argc, char **argv)
     errcode = MPI_File_seek_shared(fh, 0, MPI_SEEK_SET);
     if (errcode != MPI_SUCCESS) {
 	    handle_error(errcode, "MPI_File_seek_shared");
+	    errs++;
     }
 
     errcode = MPI_File_read_shared(fh, buf, COUNT, MPI_INT, &status);
     if (errcode != MPI_SUCCESS) {
 	    handle_error(errcode, "MPI_File_read_shared");
+	    errs++;
     }
 
     MPI_File_close(&fh);

http://git.mpich.org/mpich.git/commitdiff/c46336bb6ce6a2a70e4bcd99478a8faa068abde0

commit c46336bb6ce6a2a70e4bcd99478a8faa068abde0
Author: Rob Latham <robl at mcs.anl.gov>
Date:   Wed Jun 8 10:48:14 2016 -0500

    ensure drivers which communicate get only comm self
    
    e.g. say fs-specific code wants to dup a communicator.  ensure
    fs-specific open does not try to dup the whole communicator by itself
    (it will wait forever...)
    
    No Reviewer

diff --git a/src/mpi/romio/adio/common/ad_opencoll_failsafe.c b/src/mpi/romio/adio/common/ad_opencoll_failsafe.c
index e7ac871..962f191 100644
--- a/src/mpi/romio/adio/common/ad_opencoll_failsafe.c
+++ b/src/mpi/romio/adio/common/ad_opencoll_failsafe.c
@@ -15,6 +15,7 @@
 void ADIOI_FAILSAFE_OpenColl(ADIO_File fd, int rank, 
 	int access_mode, int *error_code)
 {
+    MPI_Comm tmp_comm;
     int orig_amode_excl, orig_amode_wronly;
 
     orig_amode_excl = access_mode;
@@ -25,12 +26,20 @@ void ADIOI_FAILSAFE_OpenColl(ADIO_File fd, int rank,
 	 * and others who reach later will return error. */ 
 	if(rank == fd->hints->ranklist[0]) {
 	    fd->access_mode = access_mode;
+
+	    /* if the lower-level file system tries to communicate, COMM_SELF
+	     * will ensure it doesn't get stuck waiting for non-existant
+	     * participants */
+	    tmp_comm = fd->comm;
+	    fd->comm = MPI_COMM_SELF;
 	    (*(fd->fns->ADIOI_xxx_Open))(fd, error_code);
 	    MPI_Bcast(error_code, 1, MPI_INT, \
-		    fd->hints->ranklist[0], fd->comm);
+		    fd->hints->ranklist[0], tmp_comm);
 	    /* if no error, close the file and reopen normally below */
 	    if (*error_code == MPI_SUCCESS)
 		(*(fd->fns->ADIOI_xxx_Close))(fd, error_code);
+	    /* and put it all back the way we found it for subsequent code */
+	    fd->comm = tmp_comm;
 	}
 	else MPI_Bcast(error_code, 1, MPI_INT,
 		fd->hints->ranklist[0], fd->comm);

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

Summary of changes:
 src/mpi/romio/adio/common/ad_opencoll_failsafe.c |   11 +++-
 src/mpi/romio/test/atomicity.c                   |   16 +++--
 src/mpi/romio/test/excl.c                        |    9 +++
 src/mpi/romio/test/hindexed.c                    |   66 +++++++++++-----------
 src/mpi/romio/test/ordered_fp.c                  |    1 -
 src/mpi/romio/test/shared_fp.c                   |    5 +-
 6 files changed, 65 insertions(+), 43 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list