[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.1.1-110-g006a54b

Service Account noreply at mpich.org
Wed Jul 16 10:58:29 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  006a54bd1d330d16f9491dbd59dd3e8486cf7ae2 (commit)
       via  5b6a4eee85eca234fcc7a3886ad17c45ac3aaf5d (commit)
       via  3131496aab92a8ec2bd510f82c04452f55ab72ea (commit)
       via  7ab2a21fa340c71e7e0cc8ca3bf8d50d710585e7 (commit)
      from  1cc48e34f182c08ada0ce554fce35c545d336817 (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/006a54bd1d330d16f9491dbd59dd3e8486cf7ae2

commit 006a54bd1d330d16f9491dbd59dd3e8486cf7ae2
Author: Paul Coffman <pkcoff at us.ibm.com>
Date:   Tue Jul 15 15:47:32 2014 -0500

    BALANCECONTIG cleanups/fixes
    
    use ADIOI_Assert to guard againt infinite loop;  simpler easier-to-read
    code for fd_size assignment
    
    Signed-off-by: Rob Latham <robl at mcs.anl.gov>

diff --git a/src/mpi/romio/adio/ad_gpfs/ad_gpfs_aggrs.c b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_aggrs.c
index dc2b22e..48f98b8 100644
--- a/src/mpi/romio/adio/ad_gpfs/ad_gpfs_aggrs.c
+++ b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_aggrs.c
@@ -331,6 +331,7 @@ void ADIOI_GPFS_Calc_file_domains(ADIO_File fd,
 	 * ion as well */
 	for (j=0;j<naggs_large;j++) {
 	    int foundbridge = 0;
+	    int numbridgelistpasses = 0;
 	    while (!foundbridge) {
 		if (tmpbridgelistnum[bridgeiter] > 0) {
 		    foundbridge = 1;
@@ -339,12 +340,21 @@ void ADIOI_GPFS_Calc_file_domains(ADIO_File fd,
 		       printf("naggs is %d bridgeiter is %d bridgelistoffset[bridgeiter] is %d tmpbridgelistnum[bridgeiter] is %d\n",naggs, bridgeiter,bridgelistoffset[bridgeiter],tmpbridgelistnum[bridgeiter]);
 		       printf("naggs is %d bridgeiter is %d setting fd_size[%d]\n",naggs, bridgeiter,bridgelistoffset[bridgeiter]+(fd->hints->bridgelistnum[bridgeiter]-tmpbridgelistnum[bridgeiter]));
 		     */
-		    fd_size[bridgelistoffset[bridgeiter]+(fd->hints->fs_hints.bg.bridgelistnum[bridgeiter]-tmpbridgelistnum[bridgeiter])] =
-			(nb_cn_small+1) * blksize;
+		    int currentbridgelistnum =
+			(fd->hints->fs_hints.bg.bridgelistnum[bridgeiter]-
+			 tmpbridgelistnum[bridgeiter]);
+		    int currentfdsizeindex = bridgelistoffset[bridgeiter] +
+			currentbridgelistnum;
+		    fd_size[currentfdsizeindex] = (nb_cn_small+1) * blksize;
 		    tmpbridgelistnum[bridgeiter]--;
 		}
-		if (bridgeiter == (fd->hints->fs_hints.bg.numbridges-1))
+		if (bridgeiter == (fd->hints->fs_hints.bg.numbridges-1)) {
+		    /* guard against infinite loop - should only ever make 1 pass
+ 		     * thru bridgelist */
+		    ADIOI_Assert(numbridgelistpasses == 0);
+		    numbridgelistpasses++;
 		    bridgeiter = 0;
+		}
 		else
 		    bridgeiter++;
 	    }

http://git.mpich.org/mpich.git/commitdiff/5b6a4eee85eca234fcc7a3886ad17c45ac3aaf5d

commit 5b6a4eee85eca234fcc7a3886ad17c45ac3aaf5d
Author: Paul Coffman <pkcoff at us.ibm.com>
Date:   Fri Jul 11 23:53:22 2014 -0500

    resource cleanup in p2pcontig case
    
    P2PCONTIG memory leak fixes - MPI_Request cleanups via MPI_Wait for MPI_Isends
    
    Signed-off-by: Rob Latham <robl at mcs.anl.gov>

diff --git a/src/mpi/romio/adio/common/p2p_aggregation.c b/src/mpi/romio/adio/common/p2p_aggregation.c
index 20caf8d..b8e00e8 100644
--- a/src/mpi/romio/adio/common/p2p_aggregation.c
+++ b/src/mpi/romio/adio/common/p2p_aggregation.c
@@ -146,6 +146,7 @@ void ADIOI_P2PContigWriteAggregation(ADIO_File fd,
 
     MPI_Request *mpiSendDataToTargetAggRequest = (MPI_Request *) ADIOI_Malloc(numTargetAggs * sizeof(MPI_Request));
     MPI_Status mpiWaitAnyStatusFromTargetAggs,mpiWaitAnyStatusFromSourceProcs;
+    MPI_Status mpiIsendStatusForSize,  mpiIsendStatusForData;
 
     // use the write buffer allocated in the file_open
     char *write_buf0 = fd->io_buf;
@@ -176,6 +177,7 @@ void ADIOI_P2PContigWriteAggregation(ADIO_File fd,
 
     int *dataSizeGottenThisRoundPerProc = (int *)ADIOI_Malloc(numSourceProcs * sizeof(int));
     int *mpiRequestMapPerProc = (int *)ADIOI_Malloc(numSourceProcs * sizeof(int));
+    int *mpiSendRequestMapPerProc = (int *)ADIOI_Malloc(numTargetAggs * sizeof(int));
 
 #ifdef ROMIO_GPFS
     endTimeBase = MPI_Wtime();
@@ -201,7 +203,7 @@ void ADIOI_P2PContigWriteAggregation(ADIO_File fd,
 	}
 
 	int numRecvToWaitFor = 0;
-	int irecv;
+	int irecv,isend;
 
 	/* the source procs receive the amount of data the aggs want them to send */
 #ifdef ROMIO_GPFS
@@ -242,7 +244,9 @@ void ADIOI_P2PContigWriteAggregation(ADIO_File fd,
 
 	}
 
-	// the source procs send the requested data to the aggs - only send if requested more than 0 bytes
+        int numDataSendToWaitFor = 0;
+	/* the source procs send the requested data to the aggs - only send if
+	 * requested more than 0 bytes */
 	for (i = 0; i < numRecvToWaitFor; i++) {
 	    MPI_Waitany(numRecvToWaitFor,mpiSizeToSendRequest,&irecv,&mpiWaitAnyStatusFromTargetAggs);
 
@@ -255,6 +259,8 @@ void ADIOI_P2PContigWriteAggregation(ADIO_File fd,
 			targetAggsForMyData[irecv],0,fd->comm,&mpiSendDataToTargetAggRequest[irecv]);
 		totalAmountDataSent += amountOfDataReqestedByTargetAgg[irecv];
 		bufferOffsetToSendPerTargetAgg[irecv] += amountOfDataReqestedByTargetAgg[irecv];
+                mpiSendRequestMapPerProc[numDataSendToWaitFor] = irecv;
+                numDataSendToWaitFor++;
 	    }
 
 	}
@@ -308,6 +314,14 @@ void ADIOI_P2PContigWriteAggregation(ADIO_File fd,
 
 	}
 
+	/* clean up the MPI_Request object for the MPI_Isend which told the
+	 * source procs how much data to send */
+        for (i=0;i<numSourceProcs;i++) {
+           MPI_Waitany(numSourceProcs,mpiSendDataSizeRequest,
+		   &isend,&mpiIsendStatusForSize);
+        }
+
+
 #ifdef ROMIO_GPFS
         endTimeBase = MPI_Wtime();
 	gpfsmpio_prof_cw[GPFSMPIO_CIO_T_DEXCH_NET] += (endTimeBase-startTimeBase);
@@ -361,6 +375,10 @@ void ADIOI_P2PContigWriteAggregation(ADIO_File fd,
 
 	if (iAmUsedAgg)
 	    currentRoundFDStart += coll_bufsize;
+        for (i = 0; i < numDataSendToWaitFor; i++) {
+          MPI_Wait(&mpiSendDataToTargetAggRequest[mpiSendRequestMapPerProc[i]],
+		  &mpiIsendStatusForData);
+        }
 
     } // for-loop roundIter
 
@@ -396,6 +414,7 @@ void ADIOI_P2PContigWriteAggregation(ADIO_File fd,
     ADIOI_Free(mpiSendDataToTargetAggRequest);
     ADIOI_Free(dataSizeGottenThisRoundPerProc);
     ADIOI_Free(mpiRequestMapPerProc);
+    ADIOI_Free(mpiSendRequestMapPerProc);
 
     /* TODO: still need a barrier here? */
     MPI_Barrier(fd->comm);
@@ -544,7 +563,7 @@ void ADIOI_P2PContigReadAggregation(ADIO_File fd,
     MPI_Request *mpiSendDataSizeRequest = (MPI_Request *) ADIOI_Malloc(numTargetProcs * sizeof(MPI_Request));
 
     MPI_Request *mpiSendDataToTargetProcRequest = (MPI_Request *) ADIOI_Malloc(numTargetProcs * sizeof(MPI_Request));
-    MPI_Status mpiWaitAnyStatusFromTargetAggs,mpiWaitAnyStatusFromSourceProcs;
+    MPI_Status mpiWaitAnyStatusFromTargetAggs,mpiWaitAnyStatusFromSourceProcs,mpiIsendStatusForSize,mpiIsendStatusForData;
 
     /* use the two-phase buffer allocated in the file_open - no app should ever
      * be both reading and writing at the same time */
@@ -590,7 +609,7 @@ void ADIOI_P2PContigReadAggregation(ADIO_File fd,
     int roundIter;
     for (roundIter=0;roundIter<numberOfRounds;roundIter++) {
 
-	int irecv;
+	int irecv,isend;
 	// determine what offsets define the portion of the file domain the agg is reading this round
 	if (iAmUsedAgg) {
 
@@ -768,6 +787,16 @@ void ADIOI_P2PContigReadAggregation(ADIO_File fd,
 
 	nextRoundFDStart = currentRoundFDStart + coll_bufsize;
 
+
+        // clean up the MPI_Isend MPI_Requests
+        for (i=0;i<numTargetProcs;i++) {
+          MPI_Waitany(numTargetProcs,mpiSendDataSizeRequest,
+		  &isend,&mpiIsendStatusForSize);
+          if (dataSizeSentThisRoundPerProc[isend] > 0) {
+            MPI_Wait(&mpiSendDataToTargetProcRequest[isend],&mpiIsendStatusForData);
+          }
+        }
+
 	MPI_Barrier(fd->comm); // need to sync up the source aggs which did the isend with the target procs which did the irecvs to give the target procs time to get the data before overwriting with next round readcontig
 
     } // for-loop roundIter

http://git.mpich.org/mpich.git/commitdiff/3131496aab92a8ec2bd510f82c04452f55ab72ea

commit 3131496aab92a8ec2bd510f82c04452f55ab72ea
Author: Paul Coffman <pkcoff at us.ibm.com>
Date:   Fri Jul 11 14:27:53 2014 -0500

    small memory leak on Blue Gene
    
    The BGQPLATFORM bridgelist and bridgelistnum hints need to be freed in
    ADIOI_Close because of the way the "create on one, reopen on all" logic
    and the hint processing logic interact.
    
    Signed-off-by: Rob Latham <robl at mcs.anl.gov>

diff --git a/src/mpi/romio/adio/common/ad_close.c b/src/mpi/romio/adio/common/ad_close.c
index 62e18f9..c34ffa3 100644
--- a/src/mpi/romio/adio/common/ad_close.c
+++ b/src/mpi/romio/adio/common/ad_close.c
@@ -64,6 +64,20 @@ void ADIO_Close(ADIO_File fd, int *error_code)
     if (fd->hints && fd->hints->ranklist) ADIOI_Free(fd->hints->ranklist);
     if (fd->hints && fd->hints->cb_config_list) ADIOI_Free(fd->hints->cb_config_list);
 
+    /* This BlueGene platform-specific free must be done in the common code
+     * because the malloc's for these hint data structures are done at the
+     * scope of ADIO_Open within the SetInfo call (ADIOI_GPFS_SetInfo which
+     * calls ADIOI_BG_gen_agg_ranklist).  They cannot be done in the
+     * ADIOI_GPFS_Close because of the file creation case where the
+     * ADIOI_GPFS_Close and re-open via ADIOI_GPFS_Open are done which results
+     * in a double-free - ADIOI_GPFS_Open does not redo the SetInfo...  */
+#ifdef BGQPLATFORM
+    if (fd->hints && fd->hints->fs_hints.bg.bridgelist)
+      ADIOI_Free(fd->hints->fs_hints.bg.bridgelist);
+    if (fd->hints && fd->hints->fs_hints.bg.bridgelistnum)
+      ADIOI_Free(fd->hints->fs_hints.bg.bridgelistnum);
+#endif
+
     /* Persistent File Realms */
     if (fd->hints->cb_pfr == ADIOI_HINT_ENABLE) {
 	/* AAR, FSIZE, and User provided uniform File realms */

http://git.mpich.org/mpich.git/commitdiff/7ab2a21fa340c71e7e0cc8ca3bf8d50d710585e7

commit 7ab2a21fa340c71e7e0cc8ca3bf8d50d710585e7
Author: Paul Coffman <pkcoff at us.ibm.com>
Date:   Mon Jul 7 20:27:30 2014 -0500

    clean up resources if P2PContig selected
    
    After a call to ADIOI_P2PContig(Write/Read)Aggregation, code exits early
    from ADIOI_GPFS_(Write/Read)StridedColl and was not freeing some data
    structures
    
    Signed-off-by: Rob Latham <robl at mcs.anl.gov>

diff --git a/src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c
index 938a133..71ddb9a 100644
--- a/src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c
+++ b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c
@@ -292,6 +292,14 @@ void ADIOI_GPFS_ReadStridedColl(ADIO_File fd, void *buf, int count,
 
 	    /* NOTE: we are skipping the rest of two-phase in this path */
             GPFSMPIO_T_CIO_REPORT( 0, fd, myrank, nprocs)
+
+            ADIOI_Free(offset_list);
+            ADIOI_Free(len_list);
+            ADIOI_Free(st_offsets);
+            ADIOI_Free(end_offsets);
+            ADIOI_Free(fd_start);
+            ADIOI_Free(fd_end);
+
 	    return;
 	}
     }
diff --git a/src/mpi/romio/adio/ad_gpfs/ad_gpfs_wrcoll.c b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_wrcoll.c
index eef476d..436d01d 100644
--- a/src/mpi/romio/adio/ad_gpfs/ad_gpfs_wrcoll.c
+++ b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_wrcoll.c
@@ -278,6 +278,14 @@ void ADIOI_GPFS_WriteStridedColl(ADIO_File fd, const void *buf, int count,
 		    error_code, st_offsets, end_offsets, fd_start, fd_end);
 	    /* NOTE: we are skipping the rest of two-phase in this path */
             GPFSMPIO_T_CIO_REPORT( 1, fd, myrank, nprocs)
+
+            ADIOI_Free(offset_list);
+            ADIOI_Free(len_list);
+            ADIOI_Free(st_offsets);
+            ADIOI_Free(end_offsets);
+            ADIOI_Free(fd_start);
+            ADIOI_Free(fd_end);
+
 	    return;
 	}
     }

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

Summary of changes:
 src/mpi/romio/adio/ad_gpfs/ad_gpfs_aggrs.c  |   16 +++++++++--
 src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c |    8 ++++++
 src/mpi/romio/adio/ad_gpfs/ad_gpfs_wrcoll.c |    8 ++++++
 src/mpi/romio/adio/common/ad_close.c        |   14 ++++++++++
 src/mpi/romio/adio/common/p2p_aggregation.c |   37 ++++++++++++++++++++++++---
 5 files changed, 76 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list