Skip to content

Commit

Permalink
romio: fix buffer type mismatch
Browse files Browse the repository at this point in the history
Reported by Cray, parts of ROMIO expected the "buf_idx" array to be an
array of MPI_Aints, but another part was still declaring and using it
like an array of ints.
  • Loading branch information
roblatham00 committed Oct 3, 2019
1 parent 9b63432 commit 7a3ad05
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ static void ADIOI_Read_and_exch(ADIO_File fd, void *buf, MPI_Datatype
ADIO_Offset
min_st_offset, ADIO_Offset fd_size,
ADIO_Offset * fd_start, ADIO_Offset * fd_end,
int *buf_idx, int *error_code);
MPI_Aint * buf_idx, int *error_code);
static void ADIOI_R_Exchange_data(ADIO_File fd, void *buf, ADIOI_Flatlist_node
* flat_buf, ADIO_Offset * offset_list, ADIO_Offset
* len_list, int *send_size, int *recv_size,
Expand All @@ -51,7 +51,7 @@ static void ADIOI_R_Exchange_data(ADIO_File fd, void *buf, ADIOI_Flatlist_node
ADIO_Offset fd_size,
ADIO_Offset * fd_start, ADIO_Offset * fd_end,
ADIOI_Access * others_req,
int iter, MPI_Aint buftype_extent, int *buf_idx);
int iter, MPI_Aint buftype_extent, MPI_Aint * buf_idx);
static void ADIOI_R_Exchange_data_alltoallv(ADIO_File fd, void *buf, ADIOI_Flatlist_node
* flat_buf, ADIO_Offset * offset_list, ADIO_Offset
* len_list, int *send_size, int *recv_size,
Expand All @@ -64,7 +64,7 @@ static void ADIOI_R_Exchange_data_alltoallv(ADIO_File fd, void *buf, ADIOI_Flatl
ADIO_Offset fd_size,
ADIO_Offset * fd_start, ADIO_Offset * fd_end,
ADIOI_Access * others_req,
int iter, MPI_Aint buftype_extent, int *buf_idx);
int iter, MPI_Aint buftype_extent, MPI_Aint * buf_idx);
static void ADIOI_Fill_user_buffer(ADIO_File fd, void *buf, ADIOI_Flatlist_node
* flat_buf, char **recv_buf, ADIO_Offset
* offset_list, ADIO_Offset * len_list,
Expand Down Expand Up @@ -114,7 +114,7 @@ void ADIOI_GPFS_ReadStridedColl(ADIO_File fd, void *buf, int count,
ADIO_Offset *count_sizes;
int ii;
ADIO_Offset *len_list = NULL;
int *buf_idx = NULL;
MPI_Aint *buf_idx = NULL;

GPFSMPIO_T_CIO_RESET(r);

Expand Down Expand Up @@ -459,7 +459,7 @@ static void ADIOI_Read_and_exch(ADIO_File fd, void *buf, MPI_Datatype
ADIO_Offset * len_list, int contig_access_count, ADIO_Offset
min_st_offset, ADIO_Offset fd_size,
ADIO_Offset * fd_start, ADIO_Offset * fd_end,
int *buf_idx, int *error_code)
MPI_Aint * buf_idx, int *error_code)
{
/* Read in sizes of no more than coll_bufsize, an info parameter.
Send data to appropriate processes.
Expand Down Expand Up @@ -795,7 +795,7 @@ static void ADIOI_R_Exchange_data(ADIO_File fd, void *buf, ADIOI_Flatlist_node
ADIO_Offset min_st_offset, ADIO_Offset fd_size,
ADIO_Offset * fd_start, ADIO_Offset * fd_end,
ADIOI_Access * others_req,
int iter, MPI_Aint buftype_extent, int *buf_idx)
int iter, MPI_Aint buftype_extent, MPI_Aint * buf_idx)
{
int i, j, k = 0, tmp = 0, nprocs_recv, nprocs_send;
char **recv_buf = NULL;
Expand Down Expand Up @@ -1089,7 +1089,7 @@ static void ADIOI_R_Exchange_data_alltoallv(ADIO_File fd, void *buf, ADIOI_Flatl
ADIO_Offset min_st_offset, ADIO_Offset fd_size,
ADIO_Offset * fd_start, ADIO_Offset * fd_end,
ADIOI_Access * others_req,
int iter, MPI_Aint buftype_extent, int *buf_idx)
int iter, MPI_Aint buftype_extent, MPI_Aint * buf_idx)
{
int i, j, k = 0, tmp = 0, nprocs_recv, nprocs_send;
char **recv_buf = NULL;
Expand Down
14 changes: 7 additions & 7 deletions src/mpi/romio/adio/ad_gpfs/ad_gpfs_wrcoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ static void ADIOI_Exch_and_write(ADIO_File fd, const void *buf, MPI_Datatype
ADIO_Offset * len_list, int contig_access_count, ADIO_Offset
min_st_offset, ADIO_Offset fd_size,
ADIO_Offset * fd_start, ADIO_Offset * fd_end,
int *buf_idx, int *error_code);
MPI_Aint * buf_idx, int *error_code);
static void ADIOI_W_Exchange_data(ADIO_File fd, const void *buf, char *write_buf,
ADIOI_Flatlist_node * flat_buf, ADIO_Offset
* offset_list, ADIO_Offset * len_list, int *send_size,
Expand All @@ -59,12 +59,12 @@ static void ADIOI_W_Exchange_data(ADIO_File fd, const void *buf, char *write_buf
ADIOI_Access * others_req,
int *send_buf_idx, int *curr_to_proc,
int *done_to_proc, int *hole, int iter,
MPI_Aint buftype_extent, int *buf_idx, int *error_code);
MPI_Aint buftype_extent, MPI_Aint * buf_idx, int *error_code);
static void ADIOI_W_Exchange_data_alltoallv(ADIO_File fd, const void *buf, char *write_buf, /* 1 */
ADIOI_Flatlist_node * flat_buf, ADIO_Offset * offset_list, ADIO_Offset * len_list, int *send_size, int *recv_size, ADIO_Offset off, int size, /* 2 */
int *count, int *start_pos, int *partial_recv, int *sent_to_proc, int nprocs, int myrank, int buftype_is_contig, int contig_access_count, ADIO_Offset min_st_offset, ADIO_Offset fd_size, ADIO_Offset * fd_start, ADIO_Offset * fd_end, ADIOI_Access * others_req, int *send_buf_idx, int *curr_to_proc, /* 3 */
int *done_to_proc, int *hole, /* 4 */
int iter, MPI_Aint buftype_extent, int *buf_idx,
int iter, MPI_Aint buftype_extent, MPI_Aint * buf_idx,
int *error_code);
static void ADIOI_Fill_send_buffer(ADIO_File fd, const void *buf, ADIOI_Flatlist_node
* flat_buf, char **send_buf, ADIO_Offset
Expand Down Expand Up @@ -120,7 +120,7 @@ void ADIOI_GPFS_WriteStridedColl(ADIO_File fd, const void *buf, int count,
ADIO_Offset *count_sizes;
int ii;

int *buf_idx = NULL;
MPI_Aint *buf_idx = NULL;
ADIO_Offset *len_list = NULL;
GPFSMPIO_T_CIO_RESET(w)
#ifdef PROFILE
Expand Down Expand Up @@ -578,7 +578,7 @@ static void ADIOI_Exch_and_write(ADIO_File fd, const void *buf, MPI_Datatype
ADIO_Offset * len_list, int contig_access_count,
ADIO_Offset min_st_offset, ADIO_Offset fd_size,
ADIO_Offset * fd_start, ADIO_Offset * fd_end,
int *buf_idx, int *error_code)
MPI_Aint * buf_idx, int *error_code)
{
/* Send data to appropriate processes and write in sizes of no more
than coll_bufsize.
Expand Down Expand Up @@ -972,7 +972,7 @@ static void ADIOI_W_Exchange_data(ADIO_File fd, const void *buf, char *write_buf
ADIOI_Access * others_req,
int *send_buf_idx, int *curr_to_proc,
int *done_to_proc, int *hole, int iter,
MPI_Aint buftype_extent, int *buf_idx, int *error_code)
MPI_Aint buftype_extent, MPI_Aint * buf_idx, int *error_code)
{
int i, j, k, *tmp_len, nprocs_recv, nprocs_send, err;
char **send_buf = NULL;
Expand Down Expand Up @@ -1476,7 +1476,7 @@ static void ADIOI_W_Exchange_data_alltoallv(ADIO_File fd, const void *buf, char
ADIOI_Flatlist_node * flat_buf, ADIO_Offset * offset_list, ADIO_Offset * len_list, int *send_size, int *recv_size, ADIO_Offset off, int size, /* 2 */
int *count, int *start_pos, int *partial_recv, int *sent_to_proc, int nprocs, int myrank, int buftype_is_contig, int contig_access_count, ADIO_Offset min_st_offset, ADIO_Offset fd_size, ADIO_Offset * fd_start, ADIO_Offset * fd_end, ADIOI_Access * others_req, int *send_buf_idx, int *curr_to_proc, /* 3 */
int *done_to_proc, int *hole, /* 4 */
int iter, MPI_Aint buftype_extent, int *buf_idx,
int iter, MPI_Aint buftype_extent, MPI_Aint * buf_idx,
int *error_code)
{
int i, j, k = 0, nprocs_recv, nprocs_send, *tmp_len, err;
Expand Down

0 comments on commit 7a3ad05

Please sign in to comment.