Commit 68f8c7aa authored by Rob Latham's avatar Rob Latham
Browse files

promote more types to larger versions



The ongoing march towards 64-bit clean continues.  Address areas where large
product of two ints might have overflowed.

Ref: #1767
Signed-off-by: Pavan Balaji's avatarPavan Balaji <balaji@anl.gov>
parent 5e67e482
...@@ -2850,7 +2850,7 @@ int MPID_Comm_revoke(MPID_Comm *comm, int is_remote); ...@@ -2850,7 +2850,7 @@ int MPID_Comm_revoke(MPID_Comm *comm, int is_remote);
Communication Communication
@*/ @*/
int MPID_Send( const void *buf, int count, MPI_Datatype datatype, int MPID_Send( const void *buf, MPI_Aint count, MPI_Datatype datatype,
int dest, int tag, MPID_Comm *comm, int context_offset, int dest, int tag, MPID_Comm *comm, int context_offset,
MPID_Request **request ); MPID_Request **request );
...@@ -2900,7 +2900,7 @@ int MPID_Rsend( const void *buf, int count, MPI_Datatype datatype, ...@@ -2900,7 +2900,7 @@ int MPID_Rsend( const void *buf, int count, MPI_Datatype datatype,
Communication Communication
@*/ @*/
int MPID_Ssend( const void *buf, int count, MPI_Datatype datatype, int MPID_Ssend( const void *buf, MPI_Aint count, MPI_Datatype datatype,
int dest, int tag, MPID_Comm *comm, int context_offset, int dest, int tag, MPID_Comm *comm, int context_offset,
MPID_Request **request ); MPID_Request **request );
...@@ -2955,7 +2955,7 @@ int MPID_tBsend( const void *buf, int count, MPI_Datatype datatype, ...@@ -2955,7 +2955,7 @@ int MPID_tBsend( const void *buf, int count, MPI_Datatype datatype,
Communication Communication
@*/ @*/
int MPID_Isend( const void *buf, int count, MPI_Datatype datatype, int MPID_Isend( const void *buf, MPI_Aint count, MPI_Datatype datatype,
int dest, int tag, MPID_Comm *comm, int context_offset, int dest, int tag, MPID_Comm *comm, int context_offset,
MPID_Request **request ); MPID_Request **request );
...@@ -3015,7 +3015,7 @@ int MPID_Issend( const void *buf, int count, MPI_Datatype datatype, ...@@ -3015,7 +3015,7 @@ int MPID_Issend( const void *buf, int count, MPI_Datatype datatype,
Communication Communication
@*/ @*/
int MPID_Recv( void *buf, int count, MPI_Datatype datatype, int MPID_Recv( void *buf, MPI_Aint count, MPI_Datatype datatype,
int source, int tag, MPID_Comm *comm, int context_offset, int source, int tag, MPID_Comm *comm, int context_offset,
MPI_Status *status, MPID_Request **request ); MPI_Status *status, MPID_Request **request );
...@@ -3035,7 +3035,7 @@ int MPID_Recv( void *buf, int count, MPI_Datatype datatype, ...@@ -3035,7 +3035,7 @@ int MPID_Recv( void *buf, int count, MPI_Datatype datatype,
Communication Communication
@*/ @*/
int MPID_Irecv( void *buf, int count, MPI_Datatype datatype, int MPID_Irecv( void *buf, MPI_Aint count, MPI_Datatype datatype,
int source, int tag, MPID_Comm *comm, int context_offset, int source, int tag, MPID_Comm *comm, int context_offset,
MPID_Request **request ); MPID_Request **request );
...@@ -3905,20 +3905,20 @@ int MPID_VCR_Get_lpid(MPID_VCR vcr, int * lpid_ptr); ...@@ -3905,20 +3905,20 @@ int MPID_VCR_Get_lpid(MPID_VCR vcr, int * lpid_ptr);
other internal operations. They are wrappers around MPID send/recv other internal operations. They are wrappers around MPID send/recv
functions. They do sends/receives by setting the context offset to functions. They do sends/receives by setting the context offset to
MPID_CONTEXT_INTRA(INTER)_COLL. */ MPID_CONTEXT_INTRA(INTER)_COLL. */
int MPIR_Localcopy(const void *sendbuf, int sendcount, MPI_Datatype sendtype, int MPIR_Localcopy(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype,
void *recvbuf, int recvcount, MPI_Datatype recvtype); void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype);
int MPIC_Wait(MPID_Request * request_ptr, mpir_errflag_t *errflag); int MPIC_Wait(MPID_Request * request_ptr, mpir_errflag_t *errflag);
int MPIC_Probe(int source, int tag, MPI_Comm comm, MPI_Status *status); int MPIC_Probe(int source, int tag, MPI_Comm comm, MPI_Status *status);
/* FT versions of te MPIC_ functions */ /* FT versions of te MPIC_ functions */
int MPIC_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, int MPIC_Send(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag,
MPID_Comm *comm_ptr, mpir_errflag_t *errflag); MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
int MPIC_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag, int MPIC_Recv(void *buf, MPI_Aint count, MPI_Datatype datatype, int source, int tag,
MPID_Comm *comm_ptr, MPI_Status *status, mpir_errflag_t *errflag); MPID_Comm *comm_ptr, MPI_Status *status, mpir_errflag_t *errflag);
int MPIC_Ssend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, int MPIC_Ssend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag,
MPID_Comm *comm_ptr, mpir_errflag_t *errflag); MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
int MPIC_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, int MPIC_Sendrecv(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype,
int dest, int sendtag, void *recvbuf, int recvcount, int dest, int sendtag, void *recvbuf, MPI_Aint recvcount,
MPI_Datatype recvtype, int source, int recvtag, MPI_Datatype recvtype, int source, int recvtag,
MPID_Comm *comm_ptr, MPI_Status *status, mpir_errflag_t *errflag); MPID_Comm *comm_ptr, MPI_Status *status, mpir_errflag_t *errflag);
int MPIC_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype, int MPIC_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype,
...@@ -4474,7 +4474,7 @@ int MPIR_Type_indexed_impl(int count, const int blocklens[], const int indices[] ...@@ -4474,7 +4474,7 @@ int MPIR_Type_indexed_impl(int count, const int blocklens[], const int indices[]
void MPIR_Type_free_impl(MPI_Datatype *datatype); void MPIR_Type_free_impl(MPI_Datatype *datatype);
int MPIR_Type_vector_impl(int count, int blocklength, int stride, MPI_Datatype old_type, MPI_Datatype *newtype_p); int MPIR_Type_vector_impl(int count, int blocklength, int stride, MPI_Datatype old_type, MPI_Datatype *newtype_p);
int MPIR_Type_struct_impl(int count, const int blocklens[], const MPI_Aint indices[], const MPI_Datatype old_types[], MPI_Datatype *newtype); int MPIR_Type_struct_impl(int count, const int blocklens[], const MPI_Aint indices[], const MPI_Datatype old_types[], MPI_Datatype *newtype);
int MPIR_Pack_impl(const void *inbuf, int incount, MPI_Datatype datatype, void *outbuf, MPI_Aint outcount, MPI_Aint *position); int MPIR_Pack_impl(const void *inbuf, MPI_Aint incount, MPI_Datatype datatype, void *outbuf, MPI_Aint outcount, MPI_Aint *position);
void MPIR_Pack_size_impl(int incount, MPI_Datatype datatype, MPI_Aint *size); void MPIR_Pack_size_impl(int incount, MPI_Datatype datatype, MPI_Aint *size);
int MPIR_Unpack_impl(const void *inbuf, MPI_Aint insize, MPI_Aint *position, int MPIR_Unpack_impl(const void *inbuf, MPI_Aint insize, MPI_Aint *position,
void *outbuf, int outcount, MPI_Datatype datatype); void *outbuf, int outcount, MPI_Datatype datatype);
......
...@@ -92,10 +92,12 @@ int MPIR_Gather_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype, ...@@ -92,10 +92,12 @@ int MPIR_Gather_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
int comm_size, rank; int comm_size, rank;
int mpi_errno = MPI_SUCCESS; int mpi_errno = MPI_SUCCESS;
int mpi_errno_ret = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS;
int curr_cnt=0, relative_rank, nbytes, is_homogeneous; int relative_rank, is_homogeneous;
int mask, sendtype_size, recvtype_size, src, dst, relative_src; int mask, src, dst, relative_src;
MPI_Aint curr_cnt=0, nbytes, sendtype_size, recvtype_size;
int recvblks; int recvblks;
int tmp_buf_size, missing; int missing;
MPI_Aint tmp_buf_size;
void *tmp_buf=NULL; void *tmp_buf=NULL;
MPI_Status status; MPI_Status status;
MPI_Aint extent=0; /* Datatype extent */ MPI_Aint extent=0; /* Datatype extent */
...@@ -230,8 +232,11 @@ int MPIR_Gather_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype, ...@@ -230,8 +232,11 @@ int MPIR_Gather_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
} }
} }
else if (nbytes < MPIR_CVAR_GATHER_VSMALL_MSG_SIZE) { else if (nbytes < MPIR_CVAR_GATHER_VSMALL_MSG_SIZE) {
mpi_errno = MPIC_Recv(tmp_buf, recvblks * nbytes, MPI_BYTE, /* small transfer size case. cast ok */
src, MPIR_GATHER_TAG, comm_ptr, &status, errflag); MPIU_Assert(recvblks*nbytes == (int)(recvblks*nbytes));
mpi_errno = MPIC_Recv(tmp_buf, (int)(recvblks * nbytes),
MPI_BYTE, src, MPIR_GATHER_TAG,
comm_ptr, &status, errflag);
if (mpi_errno) { if (mpi_errno) {
/* for communication errors, just record the error but continue */ /* for communication errors, just record the error but continue */
*errflag = MPIR_ERR_GET_CLASS(mpi_errno); *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
...@@ -267,7 +272,7 @@ int MPIR_Gather_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype, ...@@ -267,7 +272,7 @@ int MPIR_Gather_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
} }
else /* Intermediate nodes store in temporary buffer */ else /* Intermediate nodes store in temporary buffer */
{ {
int offset; MPI_Aint offset;
/* Estimate the amount of data that is going to come in */ /* Estimate the amount of data that is going to come in */
recvblks = mask; recvblks = mask;
...@@ -505,7 +510,8 @@ int MPIR_Gather_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, ...@@ -505,7 +510,8 @@ int MPIR_Gather_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
int rank, local_size, remote_size, mpi_errno=MPI_SUCCESS; int rank, local_size, remote_size, mpi_errno=MPI_SUCCESS;
int mpi_errno_ret = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS;
int i, nbytes, sendtype_size, recvtype_size; int i;
MPI_Aint nbytes, sendtype_size, recvtype_size;
MPI_Status status; MPI_Status status;
MPI_Aint extent, true_extent, true_lb = 0; MPI_Aint extent, true_extent, true_lb = 0;
void *tmp_buf=NULL; void *tmp_buf=NULL;
...@@ -825,7 +831,7 @@ int MPI_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, ...@@ -825,7 +831,7 @@ int MPI_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
/* catch common aliasing cases */ /* catch common aliasing cases */
if (recvbuf != MPI_IN_PLACE && sendtype == recvtype && sendcount == recvcount && sendcount != 0) { if (recvbuf != MPI_IN_PLACE && sendtype == recvtype && sendcount == recvcount && sendcount != 0) {
int recvtype_size; MPI_Aint recvtype_size;
MPID_Datatype_get_size_macro(recvtype, recvtype_size); MPID_Datatype_get_size_macro(recvtype, recvtype_size);
MPIR_ERRTEST_ALIAS_COLL(sendbuf, ((char *)recvbuf) + comm_ptr->rank*recvcount*recvtype_size,mpi_errno); MPIR_ERRTEST_ALIAS_COLL(sendbuf, ((char *)recvbuf) + comm_ptr->rank*recvcount*recvtype_size,mpi_errno);
} }
......
...@@ -47,8 +47,8 @@ int MPIC_Probe(int source, int tag, MPI_Comm comm, MPI_Status *status) ...@@ -47,8 +47,8 @@ int MPIC_Probe(int source, int tag, MPI_Comm comm, MPI_Status *status)
#define FUNCNAME MPIR_Localcopy #define FUNCNAME MPIR_Localcopy
#undef FCNAME #undef FCNAME
#define FCNAME "MPIR_Localcopy" #define FCNAME "MPIR_Localcopy"
int MPIR_Localcopy(const void *sendbuf, int sendcount, MPI_Datatype sendtype, int MPIR_Localcopy(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype,
void *recvbuf, int recvcount, MPI_Datatype recvtype) void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype)
{ {
int mpi_errno = MPI_SUCCESS; int mpi_errno = MPI_SUCCESS;
int sendtype_iscontig, recvtype_iscontig; int sendtype_iscontig, recvtype_iscontig;
...@@ -268,7 +268,7 @@ int MPIC_Wait(MPID_Request * request_ptr, mpir_errflag_t *errflag) ...@@ -268,7 +268,7 @@ int MPIC_Wait(MPID_Request * request_ptr, mpir_errflag_t *errflag)
#define FUNCNAME MPIC_Send #define FUNCNAME MPIC_Send
#undef FCNAME #undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME) #define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIC_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, int MPIC_Send(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag,
MPID_Comm *comm_ptr, mpir_errflag_t *errflag) MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
{ {
int mpi_errno = MPI_SUCCESS; int mpi_errno = MPI_SUCCESS;
...@@ -326,7 +326,7 @@ int MPIC_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int t ...@@ -326,7 +326,7 @@ int MPIC_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int t
#define FUNCNAME MPIC_Recv #define FUNCNAME MPIC_Recv
#undef FCNAME #undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME) #define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIC_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag, int MPIC_Recv(void *buf, MPI_Aint count, MPI_Datatype datatype, int source, int tag,
MPID_Comm *comm_ptr, MPI_Status *status, mpir_errflag_t *errflag) MPID_Comm *comm_ptr, MPI_Status *status, mpir_errflag_t *errflag)
{ {
int mpi_errno = MPI_SUCCESS; int mpi_errno = MPI_SUCCESS;
...@@ -384,7 +384,7 @@ int MPIC_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag, ...@@ -384,7 +384,7 @@ int MPIC_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag,
#define FUNCNAME MPIC_Ssend #define FUNCNAME MPIC_Ssend
#undef FCNAME #undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME) #define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIC_Ssend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, int MPIC_Ssend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag,
MPID_Comm *comm_ptr, mpir_errflag_t *errflag) MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
{ {
int mpi_errno = MPI_SUCCESS; int mpi_errno = MPI_SUCCESS;
...@@ -442,8 +442,8 @@ int MPIC_Ssend(const void *buf, int count, MPI_Datatype datatype, int dest, int ...@@ -442,8 +442,8 @@ int MPIC_Ssend(const void *buf, int count, MPI_Datatype datatype, int dest, int
#define FUNCNAME MPIC_Sendrecv #define FUNCNAME MPIC_Sendrecv
#undef FCNAME #undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME) #define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIC_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, int MPIC_Sendrecv(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype,
int dest, int sendtag, void *recvbuf, int recvcount, int dest, int sendtag, void *recvbuf, MPI_Aint recvcount,
MPI_Datatype recvtype, int source, int recvtag, MPI_Datatype recvtype, int source, int recvtag,
MPID_Comm *comm_ptr, MPI_Status *status, mpir_errflag_t *errflag) MPID_Comm *comm_ptr, MPI_Status *status, mpir_errflag_t *errflag)
{ {
......
...@@ -31,7 +31,7 @@ int MPI_Pack(const void *inbuf, int incount, MPI_Datatype datatype, void *outbuf ...@@ -31,7 +31,7 @@ int MPI_Pack(const void *inbuf, int incount, MPI_Datatype datatype, void *outbuf
#undef FCNAME #undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME) #define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_Pack_impl(const void *inbuf, int MPIR_Pack_impl(const void *inbuf,
int incount, MPI_Aint incount,
MPI_Datatype datatype, MPI_Datatype datatype,
void *outbuf, void *outbuf,
MPI_Aint outsize, MPI_Aint outsize,
......
...@@ -706,35 +706,35 @@ typedef struct MPIDI_Comm_ops ...@@ -706,35 +706,35 @@ typedef struct MPIDI_Comm_ops
/* Overriding calls in case of matching-capable interfaces */ /* Overriding calls in case of matching-capable interfaces */
int (*recv_posted)(struct MPIDI_VC *vc, struct MPID_Request *req); int (*recv_posted)(struct MPIDI_VC *vc, struct MPID_Request *req);
int (*send)(struct MPIDI_VC *vc, const void *buf, int count, MPI_Datatype datatype, int (*send)(struct MPIDI_VC *vc, const void *buf, MPI_Aint count, MPI_Datatype datatype,
int dest, int tag, MPID_Comm *comm, int context_offset, int dest, int tag, MPID_Comm *comm, int context_offset,
struct MPID_Request **request); struct MPID_Request **request);
int (*rsend)(struct MPIDI_VC *vc, const void *buf, int count, MPI_Datatype datatype, int (*rsend)(struct MPIDI_VC *vc, const void *buf, MPI_Aint count, MPI_Datatype datatype,
int dest, int tag, MPID_Comm *comm, int context_offset, int dest, int tag, MPID_Comm *comm, MPI_Aint context_offset,
struct MPID_Request **request); struct MPID_Request **request);
int (*ssend)(struct MPIDI_VC *vc, const void *buf, int count, MPI_Datatype datatype, int (*ssend)(struct MPIDI_VC *vc, const void *buf, MPI_Aint count, MPI_Datatype datatype,
int dest, int tag, MPID_Comm *comm, int context_offset, int dest, int tag, MPID_Comm *comm, int context_offset,
struct MPID_Request **request ); struct MPID_Request **request );
int (*isend)(struct MPIDI_VC *vc, const void *buf, int count, MPI_Datatype datatype, int (*isend)(struct MPIDI_VC *vc, const void *buf, MPI_Aint count, MPI_Datatype datatype,
int dest, int tag, MPID_Comm *comm, int context_offset, int dest, int tag, MPID_Comm *comm, int context_offset,
struct MPID_Request **request ); struct MPID_Request **request );
int (*irsend)(struct MPIDI_VC *vc, const void *buf, int count, MPI_Datatype datatype, int (*irsend)(struct MPIDI_VC *vc, const void *buf, MPI_Aint count, MPI_Datatype datatype,
int dest, int tag, MPID_Comm *comm, int context_offset, int dest, int tag, MPID_Comm *comm, int context_offset,
struct MPID_Request **request ); struct MPID_Request **request );
int (*issend)(struct MPIDI_VC *vc, const void *buf, int count, MPI_Datatype datatype, int (*issend)(struct MPIDI_VC *vc, const void *buf, MPI_Aint count, MPI_Datatype datatype,
int dest, int tag, MPID_Comm *comm, int context_offset, int dest, int tag, MPID_Comm *comm, int context_offset,
struct MPID_Request **request ); struct MPID_Request **request );
int (*send_init)(struct MPIDI_VC *vc, const void *buf, int count, MPI_Datatype datatype, int (*send_init)(struct MPIDI_VC *vc, const void *buf, MPI_Aint count, MPI_Datatype datatype,
int dest, int tag, MPID_Comm *comm, int context_offset, int dest, int tag, MPID_Comm *comm, int context_offset,
struct MPID_Request **request ); struct MPID_Request **request );
int (*bsend_init)(struct MPIDI_VC *vc, const void *buf, int count, MPI_Datatype datatype, int (*bsend_init)(struct MPIDI_VC *vc, const void *buf, int count, MPI_Datatype datatype,
int dest, int tag, MPID_Comm *comm, int context_offset, int dest, int tag, MPID_Comm *comm, int context_offset,
struct MPID_Request **request); struct MPID_Request **request);
int (*rsend_init)(struct MPIDI_VC *vc, const void *buf, int count, MPI_Datatype datatype, int (*rsend_init)(struct MPIDI_VC *vc, const void *buf, MPI_Aint count, MPI_Datatype datatype,
int dest, int tag, MPID_Comm *comm, int context_offset, int dest, int tag, MPID_Comm *comm, int context_offset,
struct MPID_Request **request ); struct MPID_Request **request );
int (*ssend_init)(struct MPIDI_VC *vc, const void *buf, int count, MPI_Datatype datatype, int (*ssend_init)(struct MPIDI_VC *vc, const void *buf, MPI_Aint count, MPI_Datatype datatype,
int dest, int tag, MPID_Comm *comm, int context_offset, int dest, int tag, MPID_Comm *comm, int context_offset,
struct MPID_Request **request ); struct MPID_Request **request );
int (*startall)(struct MPIDI_VC *vc, int count, struct MPID_Request *requests[]); int (*startall)(struct MPIDI_VC *vc, int count, struct MPID_Request *requests[]);
...@@ -803,7 +803,7 @@ typedef struct MPIDI_VC ...@@ -803,7 +803,7 @@ typedef struct MPIDI_VC
/* rendezvous function pointers. Called to send a rendevous /* rendezvous function pointers. Called to send a rendevous
message or when one is matched */ message or when one is matched */
int (* rndvSend_fn)( struct MPID_Request **sreq_p, const void * buf, int count, int (* rndvSend_fn)( struct MPID_Request **sreq_p, const void * buf, MPI_Aint count,
MPI_Datatype datatype, int dt_contig, MPIDI_msg_sz_t data_sz, MPI_Datatype datatype, int dt_contig, MPIDI_msg_sz_t data_sz,
MPI_Aint dt_true_lb, int rank, int tag, MPI_Aint dt_true_lb, int rank, int tag,
struct MPID_Comm * comm, int context_offset ); struct MPID_Comm * comm, int context_offset );
...@@ -1082,7 +1082,7 @@ const char * MPIDI_VC_GetStateString(int); ...@@ -1082,7 +1082,7 @@ const char * MPIDI_VC_GetStateString(int);
/* Prototypes for internal device routines */ /* Prototypes for internal device routines */
int MPIDI_Isend_self(const void *, int, MPI_Datatype, int, int, MPID_Comm *, int MPIDI_Isend_self(const void *, MPI_Aint, MPI_Datatype, int, int, MPID_Comm *,
int, int, MPID_Request **); int, int, MPID_Request **);
/*-------------------------- /*--------------------------
...@@ -1578,7 +1578,7 @@ MPID_Request * MPIDI_CH3U_Recvq_FDU_matchonly(int source, int tag, int context_i ...@@ -1578,7 +1578,7 @@ MPID_Request * MPIDI_CH3U_Recvq_FDU_matchonly(int source, int tag, int context_i
int *foundp); int *foundp);
MPID_Request * MPIDI_CH3U_Recvq_FDU_or_AEP(int source, int tag, MPID_Request * MPIDI_CH3U_Recvq_FDU_or_AEP(int source, int tag,
int context_id, MPID_Comm *comm, void *user_buf, int context_id, MPID_Comm *comm, void *user_buf,
int user_count, MPI_Datatype datatype, int * foundp); MPI_Aint user_count, MPI_Datatype datatype, int * foundp);
int MPIDI_CH3U_Recvq_DP(MPID_Request * rreq); int MPIDI_CH3U_Recvq_DP(MPID_Request * rreq);
MPID_Request * MPIDI_CH3U_Recvq_FDP_or_AEU(MPIDI_Message_match * match, MPID_Request * MPIDI_CH3U_Recvq_FDP_or_AEU(MPIDI_Message_match * match,
int * found); int * found);
...@@ -1593,9 +1593,9 @@ int MPIDI_CH3U_Request_load_recv_iov(MPID_Request * const rreq); ...@@ -1593,9 +1593,9 @@ int MPIDI_CH3U_Request_load_recv_iov(MPID_Request * const rreq);
int MPIDI_CH3U_Request_unpack_uebuf(MPID_Request * rreq); int MPIDI_CH3U_Request_unpack_uebuf(MPID_Request * rreq);
int MPIDI_CH3U_Request_unpack_srbuf(MPID_Request * rreq); int MPIDI_CH3U_Request_unpack_srbuf(MPID_Request * rreq);
void MPIDI_CH3U_Buffer_copy(const void * const sbuf, int scount, void MPIDI_CH3U_Buffer_copy(const void * const sbuf, MPI_Aint scount,
MPI_Datatype sdt, int * smpi_errno, MPI_Datatype sdt, int * smpi_errno,
void * const rbuf, int rcount, MPI_Datatype rdt, void * const rbuf, MPI_Aint rcount, MPI_Datatype rdt,
MPIDI_msg_sz_t * rdata_sz, int * rmpi_errno); MPIDI_msg_sz_t * rdata_sz, int * rmpi_errno);
int MPIDI_CH3U_Post_data_receive(int found, MPID_Request ** rreqp); int MPIDI_CH3U_Post_data_receive(int found, MPID_Request ** rreqp);
int MPIDI_CH3U_Post_data_receive_found(MPID_Request * rreqp); int MPIDI_CH3U_Post_data_receive_found(MPID_Request * rreqp);
...@@ -1920,7 +1920,7 @@ int MPIDI_CH3_PktPrint_EagerSyncAck( FILE *fp, MPIDI_CH3_Pkt_t *pkt ); ...@@ -1920,7 +1920,7 @@ int MPIDI_CH3_PktPrint_EagerSyncAck( FILE *fp, MPIDI_CH3_Pkt_t *pkt );
/* Routines to create packets (used in implementing MPI communications */ /* Routines to create packets (used in implementing MPI communications */
int MPIDI_CH3_EagerNoncontigSend( MPID_Request **, MPIDI_CH3_Pkt_type_t, int MPIDI_CH3_EagerNoncontigSend( MPID_Request **, MPIDI_CH3_Pkt_type_t,
const void *, int, const void *, MPI_Aint,
MPI_Datatype, MPIDI_msg_sz_t, int, int, MPID_Comm *, MPI_Datatype, MPIDI_msg_sz_t, int, int, MPID_Comm *,
int ); int );
int MPIDI_CH3_EagerContigSend( MPID_Request **, MPIDI_CH3_Pkt_type_t, int MPIDI_CH3_EagerContigSend( MPID_Request **, MPIDI_CH3_Pkt_type_t,
...@@ -1948,7 +1948,7 @@ int MPIDI_CH3_SendNoncontig_iov( struct MPIDI_VC *vc, struct MPID_Request *sreq, ...@@ -1948,7 +1948,7 @@ int MPIDI_CH3_SendNoncontig_iov( struct MPIDI_VC *vc, struct MPID_Request *sreq,
/* Routines to ack packets, called in the receive routines when a /* Routines to ack packets, called in the receive routines when a
message is matched */ message is matched */
int MPIDI_CH3_EagerSyncAck( MPIDI_VC_t *, MPID_Request * ); int MPIDI_CH3_EagerSyncAck( MPIDI_VC_t *, MPID_Request * );
int MPIDI_CH3_RecvFromSelf( MPID_Request *, void *, int, MPI_Datatype ); int MPIDI_CH3_RecvFromSelf( MPID_Request *, void *, MPI_Aint, MPI_Datatype );
int MPIDI_CH3_RecvRndv( MPIDI_VC_t *, MPID_Request * ); int MPIDI_CH3_RecvRndv( MPIDI_VC_t *, MPID_Request * );
/* Handler routines to continuing after an IOV is processed (assigned to the /* Handler routines to continuing after an IOV is processed (assigned to the
......
...@@ -364,7 +364,7 @@ typedef struct MPIDI_Request { ...@@ -364,7 +364,7 @@ typedef struct MPIDI_Request {
/* user_buf, user_count, and datatype needed to process /* user_buf, user_count, and datatype needed to process
rendezvous messages. */ rendezvous messages. */
void *user_buf; void *user_buf;
int user_count; MPI_Aint user_count;
MPI_Datatype datatype; MPI_Datatype datatype;
int drop_data; int drop_data;
......
...@@ -33,8 +33,8 @@ Used indirectly by mpid_irecv, mpid_recv (through MPIDI_CH3_RecvFromSelf) and ...@@ -33,8 +33,8 @@ Used indirectly by mpid_irecv, mpid_recv (through MPIDI_CH3_RecvFromSelf) and
#undef FCNAME #undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME) #define FCNAME MPIDI_QUOTE(FUNCNAME)
void MPIDI_CH3U_Buffer_copy( void MPIDI_CH3U_Buffer_copy(
const void * const sbuf, int scount, MPI_Datatype sdt, int * smpi_errno, const void * const sbuf, MPI_Aint scount, MPI_Datatype sdt, int * smpi_errno,
void * const rbuf, int rcount, MPI_Datatype rdt, MPIDI_msg_sz_t * rsz, void * const rbuf, MPI_Aint rcount, MPI_Datatype rdt, MPIDI_msg_sz_t * rsz,
int * rmpi_errno) int * rmpi_errno)
{ {
int sdt_contig; int sdt_contig;
...@@ -226,7 +226,7 @@ void MPIDI_CH3U_Buffer_copy( ...@@ -226,7 +226,7 @@ void MPIDI_CH3U_Buffer_copy(
* This routine is called by mpid_recv and mpid_irecv when a request * This routine is called by mpid_recv and mpid_irecv when a request
* matches a send-to-self message * matches a send-to-self message
*/ */
int MPIDI_CH3_RecvFromSelf( MPID_Request *rreq, void *buf, int count, int MPIDI_CH3_RecvFromSelf( MPID_Request *rreq, void *buf, MPI_Aint count,
MPI_Datatype datatype ) MPI_Datatype datatype )
{ {
MPID_Request * const sreq = rreq->partner_request; MPID_Request * const sreq = rreq->partner_request;
......
...@@ -80,7 +80,7 @@ int MPIDI_CH3_SendNoncontig_iov( MPIDI_VC_t *vc, MPID_Request *sreq, ...@@ -80,7 +80,7 @@ int MPIDI_CH3_SendNoncontig_iov( MPIDI_VC_t *vc, MPID_Request *sreq,
/* MPIDI_CH3_EagerNoncontigSend - Eagerly send noncontiguous data */ /* MPIDI_CH3_EagerNoncontigSend - Eagerly send noncontiguous data */
int MPIDI_CH3_EagerNoncontigSend( MPID_Request **sreq_p, int MPIDI_CH3_EagerNoncontigSend( MPID_Request **sreq_p,
MPIDI_CH3_Pkt_type_t reqtype, MPIDI_CH3_Pkt_type_t reqtype,
const void * buf, int count, const void * buf, MPI_Aint count,
MPI_Datatype datatype, MPIDI_msg_sz_t data_sz, MPI_Datatype datatype, MPIDI_msg_sz_t data_sz,
int rank, int rank,
int tag, MPID_Comm * comm, int tag, MPID_Comm * comm,
......
...@@ -498,7 +498,7 @@ lock_exit: ...@@ -498,7 +498,7 @@ lock_exit:
#define FCNAME MPIDI_QUOTE(FUNCNAME) #define FCNAME MPIDI_QUOTE(FUNCNAME)
MPID_Request * MPIDI_CH3U_Recvq_FDU_or_AEP(int source, int tag, MPID_Request * MPIDI_CH3U_Recvq_FDU_or_AEP(int source, int tag,
int context_id, MPID_Comm *comm, void *user_buf, int context_id, MPID_Comm *comm, void *user_buf,
int user_count, MPI_Datatype datatype, int * foundp) MPI_Aint user_count, MPI_Datatype datatype, int * foundp)
{ {
int mpi_errno = MPI_SUCCESS; int mpi_errno = MPI_SUCCESS;
int found = FALSE; int found = FALSE;
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#define FUNCNAME MPID_Irecv #define FUNCNAME MPID_Irecv
#undef FCNAME #undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME) #define FCNAME MPIDI_QUOTE(FUNCNAME)
int MPID_Irecv(void * buf, int count, MPI_Datatype datatype, int rank, int tag, int MPID_Irecv(void * buf, MPI_Aint count, MPI_Datatype datatype, int rank, int tag,
MPID_Comm * comm, int context_offset, MPID_Comm * comm, int context_offset,
MPID_Request ** request) MPID_Request ** request)
{ {
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#define FUNCNAME MPID_Isend #define FUNCNAME MPID_Isend
#undef FCNAME #undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME) #define FCNAME MPIDI_QUOTE(FUNCNAME)
int MPID_Isend(const void * buf, int count, MPI_Datatype datatype, int rank, int MPID_Isend(const void * buf, MPI_Aint count, MPI_Datatype datatype, int rank,
int tag, MPID_Comm * comm, int context_offset, int tag, MPID_Comm * comm, int context_offset,
MPID_Request ** request) MPID_Request ** request)
{ {
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#define FUNCNAME MPID_Recv #define FUNCNAME MPID_Recv
#undef FCNAME #undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME) #define FCNAME MPIDI_QUOTE(FUNCNAME)
int MPID_Recv(void * buf, int count, MPI_Datatype datatype, int rank, int tag, int MPID_Recv(void * buf, MPI_Aint count, MPI_Datatype datatype, int rank, int tag,
MPID_Comm * comm, int context_offset, MPID_Comm * comm, int context_offset,
MPI_Status * status, MPID_Request ** request) MPI_Status * status, MPID_Request ** request)
{ {
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#define FUNCNAME MPID_Send #define FUNCNAME MPID_Send
#undef FCNAME #undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME) #define FCNAME MPIDI_QUOTE(FUNCNAME)
int MPID_Send(const void * buf, int count, MPI_Datatype datatype, int rank, int MPID_Send(const void * buf, MPI_Aint count, MPI_Datatype datatype, int rank,
int tag, MPID_Comm * comm, int context_offset, int tag, MPID_Comm * comm, int context_offset,
MPID_Request ** request) MPID_Request ** request)
{ {
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#define FUNCNAME MPID_Ssend #define FUNCNAME MPID_Ssend
#undef FCNAME #undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME) #define FCNAME MPIDI_QUOTE(FUNCNAME)
int MPID_Ssend(const void * buf, int count, MPI_Datatype datatype, int rank, int tag, MPID_Comm * comm, int context_offset, int MPID_Ssend(const void * buf, MPI_Aint count, MPI_Datatype datatype, int rank, int tag, MPID_Comm * comm, int context_offset,
MPID_Request ** request) MPID_Request ** request)
{ {
MPIDI_msg_sz_t data_sz; MPIDI_msg_sz_t data_sz;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#define FUNCNAME MPIDI_Isend_self #define FUNCNAME MPIDI_Isend_self
#undef FCNAME #undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)