[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.0.4-187-g470667c

mysql vizuser noreply at mpich.org
Tue May 14 10:35:46 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  470667cbd81fea954ebcad19f1a820acea61789b (commit)
      from  491957795644bf6d8edc76f8ee4cd75bf02b7d5c (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/470667cbd81fea954ebcad19f1a820acea61789b

commit 470667cbd81fea954ebcad19f1a820acea61789b
Author: Rob Latham <robl at mcs.anl.gov>
Date:   Tue May 14 09:50:48 2013 -0500

    avoid hang if subset of procs have invalid INFO
    
    In response to IBM's integration ticket 1822 (but reworked), turn
    MPIO_CHECK_INFO into a collective macro; exchange result of info
    inspection with all procs.  Now a bogus info on one proc won't cause a
    process hang.

diff --git a/src/mpi/romio/adio/include/adioi_error.h b/src/mpi/romio/adio/include/adioi_error.h
index e087055..1dd00ee 100644
--- a/src/mpi/romio/adio/include/adioi_error.h
+++ b/src/mpi/romio/adio/include/adioi_error.h
@@ -163,10 +163,17 @@ if ((fh->file_system == ADIO_PIOFS) ||					\
 
 /* Check MPI_Info object by calling MPI_Info_dup, if the info object is valid
 then the dup operation will succeed */
-#define MPIO_CHECK_INFO(info, error_code) {     \
+/* a collective check for error makes this macro collective */
+#define MPIO_CHECK_INFO_ALL(info, error_code, comm) {     \
     MPI_Info dupinfo;                           \
+    int tmp_err = MPI_SUCCESS;                  \
     error_code = MPI_Info_dup(info, &dupinfo);  \
-    if(error_code != MPI_SUCCESS) goto fn_fail; \
+    MPI_Allreduce(&error_code, &tmp_err, 1, MPI_INT, MPI_MAX, comm); \
+    if(tmp_err != MPI_SUCCESS) {                                            \
+	error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, \
+		myname, __LINE__, MPI_ERR_OTHER, "**info", 0); \
+	goto fn_fail; \
+    }                                           \
     if (dupinfo != MPI_INFO_NULL) {             \
         MPI_Info_free(&dupinfo);                \
     }                                           \
diff --git a/src/mpi/romio/mpi-io/open.c b/src/mpi/romio/mpi-io/open.c
index 14c025c..80ea26e 100644
--- a/src/mpi/romio/mpi-io/open.c
+++ b/src/mpi/romio/mpi-io/open.c
@@ -61,8 +61,7 @@ int MPI_File_open(MPI_Comm comm, const char *filename, int amode,
 
     /* --BEGIN ERROR HANDLING-- */
     MPIO_CHECK_COMM(comm, myname, error_code);
-    if(info != MPI_INFO_NULL)
-        MPIO_CHECK_INFO(info, error_code);
+    MPIO_CHECK_INFO_ALL(info, error_code, comm);
     /* --END ERROR HANDLING-- */
 
     error_code = MPI_Comm_test_inter(comm, &flag);
diff --git a/src/mpi/romio/mpi-io/set_info.c b/src/mpi/romio/mpi-io/set_info.c
index 9fe8ab6..13437cc 100644
--- a/src/mpi/romio/mpi-io/set_info.c
+++ b/src/mpi/romio/mpi-io/set_info.c
@@ -44,7 +44,7 @@ int MPI_File_set_info(MPI_File fh, MPI_Info info)
 
     /* --BEGIN ERROR HANDLING-- */
     MPIO_CHECK_FILE_HANDLE(adio_fh, myname, error_code);
-    MPIO_CHECK_INFO(info, error_code);
+    MPIO_CHECK_INFO_ALL(info, error_code, fh->comm);
     /* --END ERROR HANDLING-- */
 
     /* set new info */
diff --git a/src/mpi/romio/mpi-io/set_view.c b/src/mpi/romio/mpi-io/set_view.c
index ed5a493..77a7756 100644
--- a/src/mpi/romio/mpi-io/set_view.c
+++ b/src/mpi/romio/mpi-io/set_view.c
@@ -106,9 +106,7 @@ int MPI_File_set_view(MPI_File fh, MPI_Offset disp, MPI_Datatype etype,
 	error_code = MPIO_Err_return_file(adio_fh, error_code);
 	goto fn_exit;
     }
-    if(info != MPI_INFO_NULL){
-        MPIO_CHECK_INFO(info, error_code);
-    }
+    MPIO_CHECK_INFO_ALL(info, error_code, adio_fh->comm);
     /* --END ERROR HANDLING-- */
 
     MPI_Type_size(filetype, &filetype_size);

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

Summary of changes:
 src/mpi/romio/adio/include/adioi_error.h |   11 +++++++++--
 src/mpi/romio/mpi-io/open.c              |    3 +--
 src/mpi/romio/mpi-io/set_info.c          |    2 +-
 src/mpi/romio/mpi-io/set_view.c          |    4 +---
 4 files changed, 12 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list