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

Service Account noreply at mpich.org
Fri Nov 13 13:52:00 CST 2015


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  538f8abb47d47dd3bb39e648e771ac705b2bf274 (commit)
      from  acb04026d4804f95263c3d9ba6a6f45ecb9c8262 (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/538f8abb47d47dd3bb39e648e771ac705b2bf274

commit 538f8abb47d47dd3bb39e648e771ac705b2bf274
Author: Rob Latham <robl at mcs.anl.gov>
Date:   Wed Nov 11 13:45:29 2015 -0600

    avoid rare but possible divide-by-zero
    
    Signed-off-by: Halim Amer <aamer at anl.gov>

diff --git a/src/mpi/romio/adio/ad_lustre/ad_lustre_aggregate.c b/src/mpi/romio/adio/ad_lustre/ad_lustre_aggregate.c
index cd55282..da54d71 100644
--- a/src/mpi/romio/adio/ad_lustre/ad_lustre_aggregate.c
+++ b/src/mpi/romio/adio/ad_lustre/ad_lustre_aggregate.c
@@ -310,8 +310,13 @@ int ADIOI_LUSTRE_Docollect(ADIO_File fd, int contig_access_count,
                fd->comm);
     MPI_Allreduce(&contig_access_count, &total_access_count, 1, MPI_INT, MPI_SUM,
                fd->comm);
-    /* estimate average req_size */
-    avg_req_size = (int)(total_req_size / total_access_count);
+    /* avoid possible divide-by-zero) */
+    if (total_access_count != 0) {
+	/* estimate average req_size */
+	avg_req_size = (int)(total_req_size / total_access_count);
+    } else {
+	avg_req_size = 0;
+    }
     /* get hint of big_req_size */
     big_req_size = fd->hints->fs_hints.lustre.coll_threshold;
     /* Don't perform collective I/O if there are big requests */

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

Summary of changes:
 src/mpi/romio/adio/ad_lustre/ad_lustre_aggregate.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list