From 7a3ad0531583fbeb54a072384e9940deb61a0593 Mon Sep 17 00:00:00 2001 From: Rob Latham Date: Wed, 2 Oct 2019 13:21:10 -0500 Subject: [PATCH] romio: fix buffer type mismatch 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. --- src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c | 14 +++++++------- src/mpi/romio/adio/ad_gpfs/ad_gpfs_wrcoll.c | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) 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 0af9cfb362f..10514802219 100644 --- a/src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c +++ b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c @@ -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, @@ -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, @@ -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, @@ -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); @@ -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. @@ -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; @@ -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; 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 a0a0c9fbeba..a2abba3d3d8 100644 --- a/src/mpi/romio/adio/ad_gpfs/ad_gpfs_wrcoll.c +++ b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_wrcoll.c @@ -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, @@ -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 @@ -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 @@ -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. @@ -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; @@ -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;