[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2a1-11-g9e08a8b

Service Account noreply at mpich.org
Thu Sep 18 14:12:47 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  9e08a8b6ba95b38f642ca4cc2549870644192409 (commit)
       via  6b9e0dc0980125d45d54ca483371e1c217120e9a (commit)
       via  8da6ae0aa335275526680f7758ea1bbaca405793 (commit)
       via  a6c20a785547de40ec30d2bbd823c7dcee790421 (commit)
      from  30e40464c9beca4c57b4ee2153a9e0bcc8cbc77b (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/9e08a8b6ba95b38f642ca4cc2549870644192409

commit 9e08a8b6ba95b38f642ca4cc2549870644192409
Author: Rob Latham <robl at mcs.anl.gov>
Date:   Tue Sep 16 09:48:04 2014 -0500

    romio: remove allreduce in flush
    
    long ago we thought there might be more than one process flushing data,
    but that has not borne out.  the much faster MPI_Bcast will suffice, and
    we can avoid an MPI_Allreduce.
    
    Signed-off-by: Paul Coffman <pkcoff at us.ibm.com>

diff --git a/src/mpi/romio/adio/ad_gpfs/ad_gpfs_flush.c b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_flush.c
index 5f7b182..555002f 100644
--- a/src/mpi/romio/adio/ad_gpfs/ad_gpfs_flush.c
+++ b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_flush.c
@@ -42,10 +42,7 @@ void ADIOI_GPFS_Flush(ADIO_File fd, int *error_code)
 	if (err == -1) err = errno;
 	else err = 0;
     }
-    /* Just pick an errno (using unsigned MPI_MAX) from any failures.  We use
-     * MPI_Allreduce in case one day we wish to fsync from more than one
-     * process */
-    MPI_Allreduce( MPI_IN_PLACE, (unsigned*)&err, 1, MPI_UNSIGNED, MPI_MAX, fd->comm);
+    MPI_Bcast(&err, 1, MPI_UNSIGNED, fd->hints->ranklist[0], fd->comm);
     DBGV_FPRINTF(stderr,"aggregation result:fsync %s, errno %#X,\n",fd->filename, err);
 
     if (err) /* if it's non-zero, it must be an errno */

http://git.mpich.org/mpich.git/commitdiff/6b9e0dc0980125d45d54ca483371e1c217120e9a

commit 6b9e0dc0980125d45d54ca483371e1c217120e9a
Author: Rob Latham <robl at mcs.anl.gov>
Date:   Thu Sep 11 11:01:46 2014 -0500

    Remove comm_split in deferred open case
    
    comm_split might scale poorly on some systems, and we don't even use the
    resulting communicator.  it was used as a marker, but we have enough
    other information.

diff --git a/src/mpi/romio/adio/common/ad_close.c b/src/mpi/romio/adio/common/ad_close.c
index c34ffa3..7aa5ce0 100644
--- a/src/mpi/romio/adio/common/ad_close.c
+++ b/src/mpi/romio/adio/common/ad_close.c
@@ -25,7 +25,7 @@ void ADIO_Close(ADIO_File fd, int *error_code)
     }
 
     /* because of deferred open, this warants a bit of explaining.  First, if
-     * we've done aggregation (fd->agg_comm has a non-nulll communicator ),
+     * we've done aggregation,
      * then close the file.  Then, if any process left has done independent
      * i/o, close the file.  Otherwise, we'll skip the fs-specific close and
      * just say everything is a-ok.
@@ -35,7 +35,7 @@ void ADIO_Close(ADIO_File fd, int *error_code)
      * everyone who ever opened the file will close it. Is order important? Is
      * timing important?
      */
-    if (fd->agg_comm != MPI_COMM_NULL) {
+    if (fd->hints->deferred_open && fd->is_agg) {
 	    (*(fd->fns->ADIOI_xxx_Close))(fd, error_code);
     } else {
 	    if(fd->is_open)  {
@@ -101,10 +101,6 @@ void ADIO_Close(ADIO_File fd, int *error_code)
 
 
     MPI_Comm_free(&(fd->comm));
-    /* deferred open: if we created an aggregator communicator, free it */
-    if (fd->agg_comm != MPI_COMM_NULL) {
-	    MPI_Comm_free(&(fd->agg_comm));
-    }
     ADIOI_Free(fd->filename); 
 
     MPI_Type_get_envelope(fd->etype, &i, &j, &k, &combiner);
diff --git a/src/mpi/romio/adio/common/ad_open.c b/src/mpi/romio/adio/common/ad_open.c
index 190561e..d26a072 100644
--- a/src/mpi/romio/adio/common/ad_open.c
+++ b/src/mpi/romio/adio/common/ad_open.c
@@ -31,7 +31,6 @@ MPI_File ADIO_Open(MPI_Comm orig_comm,
     static char myname[] = "ADIO_OPEN";
     int  max_error_code;
     MPI_Info dupinfo;
-    MPI_Comm aggregator_comm = MPI_COMM_NULL; /* just for deferred opens */
 
     *error_code = MPI_SUCCESS;
 
@@ -156,28 +155,12 @@ MPI_File ADIO_Open(MPI_Comm orig_comm,
 	ADIOI_Info_print_keyvals(fd->info);
     }
 
-     /* deferred open: if we are an aggregator, create a new communicator.
-      * we'll use this aggregator communicator for opens and closes.
-      * otherwise, we have a NULL communicator until we try to do independent
-      * IO */
-    fd->agg_comm = MPI_COMM_NULL;
     fd->is_open = 0;
     fd->my_cb_nodes_index = -2;
     fd->is_agg = is_aggregator(rank, fd);
-    if (fd->hints->deferred_open) {
-	    /* MPI_Comm_split will create a communication group of aggregators.
-	     * for non-aggregators it will return MPI_COMM_NULL .  we rely on
-	     * fd->agg_comm == MPI_COMM_NULL for non-aggregators in several
-	     * tests in the code  */
-	    if (fd->is_agg) {
-		    MPI_Comm_split(fd->comm, 1, 0, &aggregator_comm);
-		    fd->agg_comm = aggregator_comm;
-	    } else {
-		    MPI_Comm_split(fd->comm, MPI_UNDEFINED, 0, &aggregator_comm);
-		    fd->agg_comm = aggregator_comm;
-	    }
-
-    }
+    /* deferred open used to split the communicator to create an "aggregator
+     * communicator", but we only used it as a way to indicate that deferred
+     * open happened.  fd->is_open and fd->is_agg are sufficient */
 
     /* actual opens start here */
     /* generic open: one process opens to create the file, all others open */
@@ -197,7 +180,7 @@ MPI_File ADIO_Open(MPI_Comm orig_comm,
             /* in the deferred open case, only those who have actually
                opened the file should close it */
             if (fd->hints->deferred_open)  {
-                if (fd->agg_comm != MPI_COMM_NULL) {
+                if (fd->is_agg) {
                     (*(fd->fns->ADIOI_xxx_Close))(fd, error_code);
                 }
             }
diff --git a/src/mpi/romio/adio/common/ad_opencoll.c b/src/mpi/romio/adio/common/ad_opencoll.c
index 81dc0be..467a322 100644
--- a/src/mpi/romio/adio/common/ad_opencoll.c
+++ b/src/mpi/romio/adio/common/ad_opencoll.c
@@ -67,7 +67,7 @@ void ADIOI_GEN_OpenColl(ADIO_File fd, int rank,
 
     /* if we are doing deferred open, non-aggregators should return now */
     if (fd->hints->deferred_open ) {
-        if (fd->agg_comm == MPI_COMM_NULL) {
+        if (!(fd->is_agg)) {
             /* we might have turned off EXCL for the aggregators.
              * restore access_mode that non-aggregators get the right
              * value from get_amode */
@@ -82,7 +82,7 @@ void ADIOI_GEN_OpenColl(ADIO_File fd, int rank,
 	    *error_code = MPI_SUCCESS;
 	    ADIOI_Assert(fd->blksize > 0);
 	    return;
-        }
+	}
     }
 
 /* For writing with data sieving, a read-modify-write is needed. If 
diff --git a/src/mpi/romio/adio/common/ad_opencoll_failsafe.c b/src/mpi/romio/adio/common/ad_opencoll_failsafe.c
index 78954d9..e7ac871 100644
--- a/src/mpi/romio/adio/common/ad_opencoll_failsafe.c
+++ b/src/mpi/romio/adio/common/ad_opencoll_failsafe.c
@@ -43,15 +43,13 @@ void ADIOI_FAILSAFE_OpenColl(ADIO_File fd, int rank,
 	}
     }
     /* if we are doing deferred open, non-aggregators should return now */
-    if (fd->hints->deferred_open ) {
-        if (fd->agg_comm == MPI_COMM_NULL) {
-            /* we might have turned off EXCL for the aggregators.
-             * restore access_mode that non-aggregators get the right
-             * value from get_amode */
-            fd->access_mode = orig_amode_excl;
-            *error_code = MPI_SUCCESS;
-            return;
-        }
+    if (fd->hints->deferred_open && !(fd->is_agg)) {
+	/* we might have turned off EXCL for the aggregators.
+	 * restore access_mode that non-aggregators get the right
+	 * value from get_amode */
+	fd->access_mode = orig_amode_excl;
+	*error_code = MPI_SUCCESS;
+	return;
     }
 
 /* For writing with data sieving, a read-modify-write is needed. If 
diff --git a/src/mpi/romio/adio/common/ad_opencoll_scalable.c b/src/mpi/romio/adio/common/ad_opencoll_scalable.c
index 1a68ac0..1c47201 100644
--- a/src/mpi/romio/adio/common/ad_opencoll_scalable.c
+++ b/src/mpi/romio/adio/common/ad_opencoll_scalable.c
@@ -19,11 +19,9 @@ void ADIOI_SCALEABLE_OpenColl(ADIO_File fd, int rank,
     int orig_amode_wronly;
 
     /* if we are doing deferred open, non-aggregators should return now */
-    if (fd->hints->deferred_open ) {
-        if (fd->agg_comm == MPI_COMM_NULL) {
-            *error_code = MPI_SUCCESS;
-            return;
-        }
+    if (fd->hints->deferred_open && !(fd->is_agg)) {
+	*error_code = MPI_SUCCESS;
+	return;
     } 
     
     /* For writing with data sieving, a read-modify-write is needed. If 
diff --git a/src/mpi/romio/adio/include/adio.h b/src/mpi/romio/adio/include/adio.h
index 8c33bea..90206d9 100644
--- a/src/mpi/romio/adio/include/adio.h
+++ b/src/mpi/romio/adio/include/adio.h
@@ -203,7 +203,6 @@ typedef struct ADIOI_FileD {
                                 in bytes */
     ADIOI_Fns *fns;          /* struct of I/O functions to use */
     MPI_Comm comm;           /* communicator indicating who called open */
-    MPI_Comm agg_comm;      /* deferred open: aggregators who called open */
     int is_open;	    /* deferred open: 0: not open yet 1: is open */
     int is_agg;              /* bool: if I am an aggregator */
     char *filename;          

http://git.mpich.org/mpich.git/commitdiff/8da6ae0aa335275526680f7758ea1bbaca405793

commit 8da6ae0aa335275526680f7758ea1bbaca405793
Author: Rob Latham <robl at mcs.anl.gov>
Date:   Thu Sep 11 14:40:55 2014 -0500

    fix logic in syshint processing check
    
    Ken was right: I was being too clever before.  now, simply and more
    explicitly check if anyone has a NULL systemwide-hint info object.

diff --git a/src/mpi/romio/adio/common/ad_open.c b/src/mpi/romio/adio/common/ad_open.c
index 67eb125..190561e 100644
--- a/src/mpi/romio/adio/common/ad_open.c
+++ b/src/mpi/romio/adio/common/ad_open.c
@@ -99,10 +99,16 @@ MPI_File ADIO_Open(MPI_Comm orig_comm,
      *
      * a code might do an "initialize from 0", so we can only skip hint
      * processing once everyone has particpiated in hint processing */
-    int dummy_info;
-    MPI_Allreduce(&ADIOI_syshints, &dummy_info, 1, MPI_INT, MPI_MIN, fd->comm);
-    if ((MPI_Info)dummy_info== MPI_INFO_NULL) {
-	MPI_Info_create(&ADIOI_syshints);
+    int syshints_processed, can_skip;
+    if (ADIOI_syshints == MPI_INFO_NULL)
+	syshints_processed = 0;
+    else
+	syshints_processed = 1;
+
+    MPI_Allreduce(&syshints_processed, &can_skip, 1, MPI_INT, MPI_MIN, fd->comm);
+    if (!can_skip) {
+	if (ADIOI_syshints == MPI_INFO_NULL)
+	    MPI_Info_create(&ADIOI_syshints);
 	ADIOI_process_system_hints(fd, ADIOI_syshints);
     }
 

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

commit a6c20a785547de40ec30d2bbd823c7dcee790421
Author: Rob Latham <robl at mcs.anl.gov>
Date:   Thu Sep 11 11:37:28 2014 -0500

    no reason for a huge stack in these tests

diff --git a/src/mpi/romio/test/aggregation1.c b/src/mpi/romio/test/aggregation1.c
index 5331639..dee42d6 100644
--- a/src/mpi/romio/test/aggregation1.c
+++ b/src/mpi/romio/test/aggregation1.c
@@ -88,7 +88,9 @@ write_file( char *target, int rank, MPI_Info *info ) {
     MPI_Status mpi_stat;
     int mpi_ret;
     int i;
-    char buffer[OBJ_SIZE];
+    char *buffer;
+
+    buffer = malloc(OBJ_SIZE);
 
     if ( debug ) printf( "%d writing file %s\n", rank, target );
     
@@ -116,6 +118,7 @@ write_file( char *target, int rank, MPI_Info *info ) {
         fatal_error( mpi_ret, NULL, "close for write" );
     }
     if ( debug ) printf( "%d wrote file %s\n", rank, target );
+    free(buffer);
 }
 
 static int
@@ -136,8 +139,9 @@ read_file( char *target, int rank, MPI_Info *info, int *corrupt_blocks ) {
     MPI_Status mpi_stat;
     int mpi_ret;
     int i;
-    char buffer[OBJ_SIZE];
+    char *buffer;
     char *verify_buf = NULL;
+    buffer = malloc(OBJ_SIZE);
     verify_buf = (char *)malloc(OBJ_SIZE);
 
     if ( debug ) printf( "%d reading file %s\n", rank, target );
@@ -171,6 +175,7 @@ read_file( char *target, int rank, MPI_Info *info, int *corrupt_blocks ) {
     if( (mpi_ret = MPI_File_close( &rfh ) ) != MPI_SUCCESS ) {
         fatal_error( mpi_ret, NULL, "close for read" );
     }
+    free (buffer);
     free(verify_buf);
 
 }

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

Summary of changes:
 src/mpi/romio/adio/ad_gpfs/ad_gpfs_flush.c       |    5 +--
 src/mpi/romio/adio/common/ad_close.c             |    8 +---
 src/mpi/romio/adio/common/ad_open.c              |   39 ++++++++--------------
 src/mpi/romio/adio/common/ad_opencoll.c          |    4 +-
 src/mpi/romio/adio/common/ad_opencoll_failsafe.c |   16 ++++-----
 src/mpi/romio/adio/common/ad_opencoll_scalable.c |    8 ++---
 src/mpi/romio/adio/include/adio.h                |    1 -
 src/mpi/romio/test/aggregation1.c                |    9 ++++-
 8 files changed, 36 insertions(+), 54 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list