Skip to content

Commit

Permalink
coll: use MPI_Aint for count parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
hzhou committed Feb 2, 2021
1 parent a6431e9 commit 1465ff5
Show file tree
Hide file tree
Showing 203 changed files with 1,091 additions and 1,017 deletions.
912 changes: 475 additions & 437 deletions src/include/mpir_coll.h

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions src/mpi/coll/allgather/allgather.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@
*/

int MPIR_Allgather_allcomm_auto(const void *sendbuf,
int sendcount,
MPI_Aint sendcount,
MPI_Datatype sendtype,
void *recvbuf,
int recvcount,
MPI_Aint recvcount,
MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
MPIR_Errflag_t * errflag)
{
Expand Down Expand Up @@ -143,8 +143,8 @@ int MPIR_Allgather_allcomm_auto(const void *sendbuf,
return mpi_errno;
}

int MPIR_Allgather_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf, int recvcount, MPI_Datatype recvtype,
int MPIR_Allgather_impl(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype,
void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype,
MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag)
{
int mpi_errno = MPI_SUCCESS;
Expand Down Expand Up @@ -211,8 +211,8 @@ int MPIR_Allgather_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtyp
goto fn_exit;
}

int MPIR_Allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf, int recvcount, MPI_Datatype recvtype,
int MPIR_Allgather(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype,
void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype,
MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag)
{
int mpi_errno = MPI_SUCCESS;
Expand Down
4 changes: 2 additions & 2 deletions src/mpi/coll/allgather/allgather_allcomm_nb.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

#include "mpiimpl.h"

int MPIR_Allgather_allcomm_nb(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf, int recvcount, MPI_Datatype recvtype,
int MPIR_Allgather_allcomm_nb(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype,
void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype,
MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag)
{
int mpi_errno = MPI_SUCCESS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
* broadcast.
*/

int MPIR_Allgather_inter_local_gather_remote_bcast(const void *sendbuf, int sendcount,
int MPIR_Allgather_inter_local_gather_remote_bcast(const void *sendbuf, MPI_Aint sendcount,
MPI_Datatype sendtype, void *recvbuf,
int recvcount, MPI_Datatype recvtype,
MPI_Aint recvcount, MPI_Datatype recvtype,
MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag)
{
int rank, local_size, remote_size, mpi_errno = MPI_SUCCESS, root;
Expand Down
4 changes: 2 additions & 2 deletions src/mpi/coll/allgather/allgather_intra_brucks.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
* where n is total size of data gathered on each process.
*/
int MPIR_Allgather_intra_brucks(const void *sendbuf,
int sendcount,
MPI_Aint sendcount,
MPI_Datatype sendtype,
void *recvbuf,
int recvcount,
MPI_Aint recvcount,
MPI_Datatype recvtype,
MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag)
{
Expand Down
4 changes: 2 additions & 2 deletions src/mpi/coll/allgather/allgather_intra_recursive_doubling.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
* PVM/MPI 2003).
*/
int MPIR_Allgather_intra_recursive_doubling(const void *sendbuf,
int sendcount,
MPI_Aint sendcount,
MPI_Datatype sendtype,
void *recvbuf,
int recvcount,
MPI_Aint recvcount,
MPI_Datatype recvtype,
MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag)
{
Expand Down
4 changes: 2 additions & 2 deletions src/mpi/coll/allgather/allgather_intra_ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
* Myrinet and IBM SP).
*/
int MPIR_Allgather_intra_ring(const void *sendbuf,
int sendcount,
MPI_Aint sendcount,
MPI_Datatype sendtype,
void *recvbuf,
int recvcount,
MPI_Aint recvcount,
MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag)
{
int comm_size, rank;
Expand Down
6 changes: 3 additions & 3 deletions src/mpi/coll/allgatherv/allgatherv.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
*/

int MPIR_Allgatherv_allcomm_auto(const void *sendbuf,
int sendcount,
MPI_Aint sendcount,
MPI_Datatype sendtype,
void *recvbuf,
const int *recvcounts,
Expand Down Expand Up @@ -136,7 +136,7 @@ int MPIR_Allgatherv_allcomm_auto(const void *sendbuf,
goto fn_exit;
}

int MPIR_Allgatherv_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
int MPIR_Allgatherv_impl(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype,
void *recvbuf, const int *recvcounts, const int *displs,
MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag)
{
Expand Down Expand Up @@ -205,7 +205,7 @@ int MPIR_Allgatherv_impl(const void *sendbuf, int sendcount, MPI_Datatype sendty
goto fn_exit;
}

int MPIR_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
int MPIR_Allgatherv(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype,
void *recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype,
MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag)
{
Expand Down
2 changes: 1 addition & 1 deletion src/mpi/coll/allgatherv/allgatherv_allcomm_nb.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include "mpiimpl.h"

int MPIR_Allgatherv_allcomm_nb(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
int MPIR_Allgatherv_allcomm_nb(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype,
void *recvbuf, const int *recvcounts, const int *displs,
MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
MPIR_Errflag_t * errflag)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* intracommunicator broadcast.
*/

int MPIR_Allgatherv_inter_remote_gather_local_bcast(const void *sendbuf, int sendcount,
int MPIR_Allgatherv_inter_remote_gather_local_bcast(const void *sendbuf, MPI_Aint sendcount,
MPI_Datatype sendtype, void *recvbuf,
const int *recvcounts, const int
*displs, MPI_Datatype recvtype,
Expand Down
2 changes: 1 addition & 1 deletion src/mpi/coll/allgatherv/allgatherv_intra_brucks.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

int MPIR_Allgatherv_intra_brucks(const void *sendbuf,
int sendcount,
MPI_Aint sendcount,
MPI_Datatype sendtype,
void *recvbuf,
const int *recvcounts,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/

int MPIR_Allgatherv_intra_recursive_doubling(const void *sendbuf,
int sendcount,
MPI_Aint sendcount,
MPI_Datatype sendtype,
void *recvbuf,
const int *recvcounts,
Expand Down
2 changes: 1 addition & 1 deletion src/mpi/coll/allgatherv/allgatherv_intra_ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/

int MPIR_Allgatherv_intra_ring(const void *sendbuf,
int sendcount,
MPI_Aint sendcount,
MPI_Datatype sendtype,
void *recvbuf,
const int *recvcounts,
Expand Down
6 changes: 3 additions & 3 deletions src/mpi/coll/allreduce/allreduce.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ MPIR_Op_check_dtype_fn *MPIR_Op_check_dtype_table[] = {
};


int MPIR_Allreduce_allcomm_auto(const void *sendbuf, void *recvbuf, int count,
int MPIR_Allreduce_allcomm_auto(const void *sendbuf, void *recvbuf, MPI_Aint count,
MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
MPIR_Errflag_t * errflag)
{
Expand Down Expand Up @@ -159,7 +159,7 @@ int MPIR_Allreduce_allcomm_auto(const void *sendbuf, void *recvbuf, int count,
goto fn_exit;
}

int MPIR_Allreduce_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
int MPIR_Allreduce_impl(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype,
MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag)
{
int mpi_errno = MPI_SUCCESS;
Expand Down Expand Up @@ -222,7 +222,7 @@ int MPIR_Allreduce_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datat
goto fn_exit;
}

int MPIR_Allreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
int MPIR_Allreduce(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype,
MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag)
{
int mpi_errno = MPI_SUCCESS;
Expand Down
5 changes: 3 additions & 2 deletions src/mpi/coll/allreduce/allreduce_allcomm_nb.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@

#include "mpiimpl.h"

int MPIR_Allreduce_allcomm_nb(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag)
int MPIR_Allreduce_allcomm_nb(const void *sendbuf, void *recvbuf, MPI_Aint count,
MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
MPIR_Errflag_t * errflag)
{
int mpi_errno = MPI_SUCCESS;
MPI_Request req = MPI_REQUEST_NULL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

int MPIR_Allreduce_intra_recursive_doubling(const void *sendbuf,
void *recvbuf,
int count,
MPI_Aint count,
MPI_Datatype datatype,
MPI_Op op,
MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

int MPIR_Allreduce_intra_reduce_scatter_allgather(const void *sendbuf,
void *recvbuf,
int count,
MPI_Aint count,
MPI_Datatype datatype,
MPI_Op op,
MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag)
Expand Down
2 changes: 1 addition & 1 deletion src/mpi/coll/allreduce/allreduce_intra_smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include "mpiimpl.h"

int MPIR_Allreduce_intra_smp(const void *sendbuf, void *recvbuf, int count,
int MPIR_Allreduce_intra_smp(const void *sendbuf, void *recvbuf, MPI_Aint count,
MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
MPIR_Errflag_t * errflag)
{
Expand Down
4 changes: 2 additions & 2 deletions src/mpi/coll/allreduce_group/allreduce_group.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
MPIR_Assert((cr_) != MPI_UNDEFINED); \
} while (0)

int MPII_Allreduce_group_intra(void *sendbuf, void *recvbuf, int count,
int MPII_Allreduce_group_intra(void *sendbuf, void *recvbuf, MPI_Aint count,
MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
MPIR_Group * group_ptr, int tag, MPIR_Errflag_t * errflag)
{
Expand Down Expand Up @@ -337,7 +337,7 @@ int MPII_Allreduce_group_intra(void *sendbuf, void *recvbuf, int count,
goto fn_exit;
}

int MPII_Allreduce_group(void *sendbuf, void *recvbuf, int count,
int MPII_Allreduce_group(void *sendbuf, void *recvbuf, MPI_Aint count,
MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
MPIR_Group * group_ptr, int tag, MPIR_Errflag_t * errflag)
{
Expand Down
4 changes: 2 additions & 2 deletions src/mpi/coll/allreduce_group/allreduce_group.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
#ifndef ALLREDUCE_GROUP_H_INCLUDED
#define ALLREDUCE_GROUP_H_INCLUDED

int MPII_Allreduce_group(void *sendbuf, void *recvbuf, int count,
int MPII_Allreduce_group(void *sendbuf, void *recvbuf, MPI_Aint count,
MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
MPIR_Group * group_ptr, int tag, MPIR_Errflag_t * errflag);
int MPII_Allreduce_group_intra(void *sendbuf, void *recvbuf, int count,
int MPII_Allreduce_group_intra(void *sendbuf, void *recvbuf, MPI_Aint count,
MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
MPIR_Group * group_ptr, int tag, MPIR_Errflag_t * errflag);

Expand Down
12 changes: 6 additions & 6 deletions src/mpi/coll/alltoall/alltoall.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ categories :
*/

int MPIR_Alltoall_allcomm_auto(const void *sendbuf,
int sendcount,
MPI_Aint sendcount,
MPI_Datatype sendtype,
void *recvbuf,
int recvcount,
MPI_Aint recvcount,
MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
MPIR_Errflag_t * errflag)
{
Expand Down Expand Up @@ -172,8 +172,8 @@ int MPIR_Alltoall_allcomm_auto(const void *sendbuf,
goto fn_exit;
}

int MPIR_Alltoall_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf, int recvcount, MPI_Datatype recvtype,
int MPIR_Alltoall_impl(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype,
void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype,
MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag)
{
int mpi_errno = MPI_SUCCESS;
Expand Down Expand Up @@ -245,8 +245,8 @@ int MPIR_Alltoall_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype
goto fn_exit;
}

int MPIR_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf, int recvcount, MPI_Datatype recvtype,
int MPIR_Alltoall(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype,
void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype,
MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag)
{
int mpi_errno = MPI_SUCCESS;
Expand Down
4 changes: 2 additions & 2 deletions src/mpi/coll/alltoall/alltoall_allcomm_nb.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

#include "mpiimpl.h"

int MPIR_Alltoall_allcomm_nb(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf, int recvcount, MPI_Datatype recvtype,
int MPIR_Alltoall_allcomm_nb(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype,
void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype,
MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag)
{
int mpi_errno = MPI_SUCCESS;
Expand Down
4 changes: 2 additions & 2 deletions src/mpi/coll/alltoall/alltoall_inter_pairwise_exchange.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* max_size if dst < remote_size.
*/

int MPIR_Alltoall_inter_pairwise_exchange(const void *sendbuf, int sendcount,
MPI_Datatype sendtype, void *recvbuf, int recvcount,
int MPIR_Alltoall_inter_pairwise_exchange(const void *sendbuf, MPI_Aint sendcount,
MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount,
MPI_Datatype recvtype, MPIR_Comm * comm_ptr,
MPIR_Errflag_t * errflag)
{
Expand Down
4 changes: 2 additions & 2 deletions src/mpi/coll/alltoall/alltoall_intra_brucks.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
* other processes.
*/
int MPIR_Alltoall_intra_brucks(const void *sendbuf,
int sendcount,
MPI_Aint sendcount,
MPI_Datatype sendtype,
void *recvbuf,
int recvcount,
MPI_Aint recvcount,
MPI_Datatype recvtype,
MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag)
{
Expand Down
4 changes: 2 additions & 2 deletions src/mpi/coll/alltoall/alltoall_intra_pairwise.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
* other processes.
*/
int MPIR_Alltoall_intra_pairwise(const void *sendbuf,
int sendcount,
MPI_Aint sendcount,
MPI_Datatype sendtype,
void *recvbuf,
int recvcount,
MPI_Aint recvcount,
MPI_Datatype recvtype,
MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
* MADRE is probably the best solution for the MPI_IN_PLACE scenario.
*/
int MPIR_Alltoall_intra_pairwise_sendrecv_replace(const void *sendbuf,
int sendcount,
MPI_Aint sendcount,
MPI_Datatype sendtype,
void *recvbuf,
int recvcount,
MPI_Aint recvcount,
MPI_Datatype recvtype,
MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag)
{
Expand Down
4 changes: 2 additions & 2 deletions src/mpi/coll/alltoall/alltoall_intra_scattered.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
*/

int MPIR_Alltoall_intra_scattered(const void *sendbuf,
int sendcount,
MPI_Aint sendcount,
MPI_Datatype sendtype,
void *recvbuf,
int recvcount,
MPI_Aint recvcount,
MPI_Datatype recvtype,
MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag)
{
Expand Down
Loading

0 comments on commit 1465ff5

Please sign in to comment.