[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.1.3-208-g3f060b9
Service Account
noreply at mpich.org
Thu Nov 13 19:46:01 CST 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 3f060b9f7da8a534fdd258a9b1dd490af4fcf3c4 (commit)
from b2c8d888caf4e3b45ec29fbff34b469ceceba549 (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/3f060b9f7da8a534fdd258a9b1dd490af4fcf3c4
commit 3f060b9f7da8a534fdd258a9b1dd490af4fcf3c4
Author: Sangmin Seo <sseo at anl.gov>
Date: Thu Nov 13 15:00:00 2014 -0600
Fix incorrect sendbufs used in MPI_Iallgather.
Stack variables should not have been used as sendbuf for MPI_Iallgather
because we do not wait the completion of MPI_Iallgather in caller
functions. This fix moved them to the struct used for keeping track
of operation state and uses variables in the struct for MPI_Iallgather.
Signed-off-by: Rob Latham <robl at mcs.anl.gov>
diff --git a/src/mpi/romio/adio/common/ad_iread_coll.c b/src/mpi/romio/adio/common/ad_iread_coll.c
index 8a0b7a1..023a142 100644
--- a/src/mpi/romio/adio/common/ad_iread_coll.c
+++ b/src/mpi/romio/adio/common/ad_iread_coll.c
@@ -47,6 +47,8 @@ struct ADIOI_GEN_IreadStridedColl_vars {
int *count_my_req_per_proc;
int count_my_req_procs;
int count_others_req_procs;
+ ADIO_Offset start_offset;
+ ADIO_Offset end_offset;
ADIO_Offset orig_fp;
ADIO_Offset fd_size;
ADIO_Offset min_st_offset;
@@ -210,7 +212,6 @@ void ADIOI_GEN_IreadStridedColl(ADIO_File fd, void *buf, int count,
#ifdef RDCOLL_DEBUG
int i;
#endif
- ADIO_Offset start_offset, end_offset;
/* FIXME: need an implementation of ADIOI_IOIstridedColl
if (fd->hints->cb_pfr != ADIOI_HINT_DISABLE) {
@@ -266,7 +267,7 @@ void ADIOI_GEN_IreadStridedColl(ADIO_File fd, void *buf, int count,
ADIOI_Calc_my_off_len(fd, count, datatype, file_ptr_type, offset,
&vars->offset_list, &vars->len_list,
- &start_offset, &end_offset,
+ &vars->start_offset, &vars->end_offset,
&vars->contig_access_count);
#ifdef RDCOLL_DEBUG
@@ -283,11 +284,11 @@ void ADIOI_GEN_IreadStridedColl(ADIO_File fd, void *buf, int count,
vars->st_offsets = (ADIO_Offset *)ADIOI_Malloc(nprocs*sizeof(ADIO_Offset));
vars->end_offsets = (ADIO_Offset *)ADIOI_Malloc(nprocs*sizeof(ADIO_Offset));
- *error_code = MPI_Iallgather(&start_offset, 1, ADIO_OFFSET,
+ *error_code = MPI_Iallgather(&vars->start_offset, 1, ADIO_OFFSET,
vars->st_offsets, 1, ADIO_OFFSET,
fd->comm, &vars->req_offset[0]);
if (*error_code != MPI_SUCCESS) return;
- *error_code = MPI_Iallgather(&end_offset, 1, ADIO_OFFSET,
+ *error_code = MPI_Iallgather(&vars->end_offset, 1, ADIO_OFFSET,
vars->end_offsets, 1, ADIO_OFFSET,
fd->comm, &vars->req_offset[1]);
diff --git a/src/mpi/romio/adio/common/ad_iwrite_coll.c b/src/mpi/romio/adio/common/ad_iwrite_coll.c
index 71dd93a..7fa423f 100644
--- a/src/mpi/romio/adio/common/ad_iwrite_coll.c
+++ b/src/mpi/romio/adio/common/ad_iwrite_coll.c
@@ -45,6 +45,8 @@ struct ADIOI_GEN_IwriteStridedColl_vars {
int *count_my_req_per_proc;
int count_my_req_procs;
int count_others_req_procs;
+ ADIO_Offset start_offset;
+ ADIO_Offset end_offset;
ADIO_Offset orig_fp;
ADIO_Offset fd_size;
ADIO_Offset min_st_offset;
@@ -230,7 +232,6 @@ void ADIOI_GEN_IwriteStridedColl(ADIO_File fd, const void *buf, int count,
ADIOI_NBC_Request *nbc_req = NULL;
ADIOI_GEN_IwriteStridedColl_vars *vars = NULL;
int nprocs, myrank;
- ADIO_Offset start_offset, end_offset;
#if 0
/* FIXME: need an implementation of ADIOI_IOIstridedColl */
@@ -291,7 +292,7 @@ void ADIOI_GEN_IwriteStridedColl(ADIO_File fd, const void *buf, int count,
ADIOI_Calc_my_off_len(fd, count, datatype, file_ptr_type, offset,
&vars->offset_list, &vars->len_list,
- &start_offset, &end_offset,
+ &vars->start_offset, &vars->end_offset,
&vars->contig_access_count);
/* each process communicates its start and end offsets to other
@@ -301,11 +302,11 @@ void ADIOI_GEN_IwriteStridedColl(ADIO_File fd, const void *buf, int count,
vars->st_offsets = (ADIO_Offset *)ADIOI_Malloc(nprocs*sizeof(ADIO_Offset));
vars->end_offsets = (ADIO_Offset *)ADIOI_Malloc(nprocs*sizeof(ADIO_Offset));
- *error_code = MPI_Iallgather(&start_offset, 1, ADIO_OFFSET,
+ *error_code = MPI_Iallgather(&vars->start_offset, 1, ADIO_OFFSET,
vars->st_offsets, 1, ADIO_OFFSET,
fd->comm, &vars->req_offset[0]);
if (*error_code != MPI_SUCCESS) return;
- *error_code = MPI_Iallgather(&end_offset, 1, ADIO_OFFSET,
+ *error_code = MPI_Iallgather(&vars->end_offset, 1, ADIO_OFFSET,
vars->end_offsets, 1, ADIO_OFFSET,
fd->comm, &vars->req_offset[1]);
-----------------------------------------------------------------------
Summary of changes:
src/mpi/romio/adio/common/ad_iread_coll.c | 9 +++++----
src/mpi/romio/adio/common/ad_iwrite_coll.c | 9 +++++----
2 files changed, 10 insertions(+), 8 deletions(-)
hooks/post-receive
--
MPICH primary repository
More information about the commits
mailing list