diff --git a/ompi/mca/io/romio321/romio/adio/ad_gpfs/ad_gpfs_aggrs.c b/ompi/mca/io/romio321/romio/adio/ad_gpfs/ad_gpfs_aggrs.c index 3eb3d84969..f6df24748f 100644 --- a/ompi/mca/io/romio321/romio/adio/ad_gpfs/ad_gpfs_aggrs.c +++ b/ompi/mca/io/romio321/romio/adio/ad_gpfs/ad_gpfs_aggrs.c @@ -1,5 +1,5 @@ /* ---------------------------------------------------------------- */ -/* (C)Copyright IBM Corp. 2007, 2008 */ +/* (C)Copyright IBM Corp. 2007, 2008, 2019 */ /* ---------------------------------------------------------------- */ /** * \file ad_gpfs_aggrs.c @@ -663,16 +663,6 @@ void ADIOI_GPFS_Calc_others_req(ADIO_File fd, int count_my_req_procs, /* Parameters for MPI_Alltoallv */ int *scounts, *sdispls, *rcounts, *rdispls; - /* Parameters for MPI_Alltoallv. These are the buffers, which - * are later computed to be the lowest address of all buffers - * to be sent/received for offsets and lengths. Initialize to - * the highest possible address which is the current minimum. - */ - void *sendBufForOffsets=(void*)0xFFFFFFFFFFFFFFFF, - *sendBufForLens =(void*)0xFFFFFFFFFFFFFFFF, - *recvBufForOffsets=(void*)0xFFFFFFFFFFFFFFFF, - *recvBufForLens =(void*)0xFFFFFFFFFFFFFFFF; - /* first find out how much to send/recv and from/to whom */ #ifdef AGGREGATION_PROFILE MPE_Log_event (5026, 0, NULL); @@ -719,11 +709,6 @@ void ADIOI_GPFS_Calc_others_req(ADIO_File fd, int count_my_req_procs, others_req[i].lens = ADIOI_Malloc(count_others_req_per_proc[i]*sizeof(ADIO_Offset)); - if ( (MPIU_Upint)others_req[i].offsets < (MPIU_Upint)recvBufForOffsets ) - recvBufForOffsets = others_req[i].offsets; - if ( (MPIU_Upint)others_req[i].lens < (MPIU_Upint)recvBufForLens ) - recvBufForLens = others_req[i].lens; - others_req[i].mem_ptrs = (MPI_Aint *) ADIOI_Malloc(count_others_req_per_proc[i]*sizeof(MPI_Aint)); @@ -736,9 +721,6 @@ void ADIOI_GPFS_Calc_others_req(ADIO_File fd, int count_my_req_procs, others_req[i].lens = NULL; } } - /* If no recv buffer was allocated in the loop above, make it NULL */ - if ( recvBufForOffsets == (void*)0xFFFFFFFFFFFFFFFF) recvBufForOffsets = NULL; - if ( recvBufForLens == (void*)0xFFFFFFFFFFFFFFFF) recvBufForLens = NULL; /* Now send the calculated offsets and lengths to respective processes */ @@ -746,56 +728,53 @@ void ADIOI_GPFS_Calc_others_req(ADIO_File fd, int count_my_req_procs, /* Exchange the offsets */ /************************/ - /* Determine the lowest sendBufForOffsets/Lens */ - for (i=0; icomm); + for (i=0; icomm); + for (i=0; i