[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.1.2-12-ga3fc775
Service Account
noreply at mpich.org
Mon Jul 28 16:06:25 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 a3fc775402614eda55b34b6d5db51d1555e36653 (commit)
from 276ca460ec7a6b7f71ab53b46268eb07a2522a83 (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/a3fc775402614eda55b34b6d5db51d1555e36653
commit a3fc775402614eda55b34b6d5db51d1555e36653
Author: Rob Latham <robl at mcs.anl.gov>
Date: Wed Jul 23 14:24:33 2014 -0500
generated too-long a value for MPI Info key
large numbers of I/O aggregators would result in a value longer than
MPI_MAX_INFO_VAL. A guard was in place but my logic for limiting the
length of the array was incorrect.
Signed-off-by: Wesley Bland <wbland at anl.gov>
diff --git a/src/mpi/romio/adio/common/cb_config_list.c b/src/mpi/romio/adio/common/cb_config_list.c
index 64ad7ed..0eebc43 100644
--- a/src/mpi/romio/adio/common/cb_config_list.c
+++ b/src/mpi/romio/adio/common/cb_config_list.c
@@ -94,9 +94,15 @@ int ADIOI_cb_bcast_rank_map(ADIO_File fd)
ADIOI_Info_set(fd->info, "cb_nodes", value);
char *p = value;
int i;
+ /* the (by MPI rank) list of aggregators can be larger than
+ * MPI_MAX_INFO_VAL, so we will simply truncate when we reach capacity. I
+ * wasn't clever enough to figure out how to rewind and put '...' at the
+ * end in the truncate case */
for (i=0; i< fd->hints->cb_nodes; i++) {
- p += ADIOI_Snprintf(p, MPI_MAX_INFO_VAL+1, "%d ", fd->hints->ranklist[i]);
- if (p - value > MPI_MAX_INFO_VAL+1) break;
+ int incr, remain = (MPI_MAX_INFO_VAL) - (p-value);
+ incr = ADIOI_Snprintf(p, remain, "%d ", fd->hints->ranklist[i]);
+ if (incr >= remain) break;
+ p += incr;
}
ADIOI_Info_set(fd->info, "romio_aggregator_list", value);
ADIOI_Free(value);
-----------------------------------------------------------------------
Summary of changes:
src/mpi/romio/adio/common/cb_config_list.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
hooks/post-receive
--
MPICH primary repository
More information about the commits
mailing list