diff --git a/src/include/mpir_comm.h b/src/include/mpir_comm.h index 97ebe5109fb..2446030fc69 100644 --- a/src/include/mpir_comm.h +++ b/src/include/mpir_comm.h @@ -183,7 +183,7 @@ struct MPIR_Comm { } single; struct { struct MPIR_Stream **local_streams; - MPI_Aint *vci_displs; /* comm size + 1 */ + int *vci_displs; /* comm size + 1: an index to vci_table and can only go up to comm_size */ int *vci_table; /* comm size */ } multiplex; } stream_comm; diff --git a/src/mpid/ch4/include/mpidpre.h b/src/mpid/ch4/include/mpidpre.h index d4101c158fb..d47e382ccc4 100644 --- a/src/mpid/ch4/include/mpidpre.h +++ b/src/mpid/ch4/include/mpidpre.h @@ -168,7 +168,7 @@ typedef struct MPIDIG_req_async { MPI_Aint in_data_sz; MPI_Aint offset; struct iovec *iov_ptr; /* used with MPIDIG_RECV_IOV */ - int iov_num; /* used with MPIDIG_RECV_IOV */ + MPI_Aint iov_num; /* used with MPIDIG_RECV_IOV */ struct iovec iov_one; /* used with MPIDIG_RECV_CONTIG */ MPIDIG_recv_data_copy_cb data_copy_cb; /* called in recv_init/recv_type_init for async * data copying */ diff --git a/src/mpid/ch4/netmod/ofi/ofi_am_events.h b/src/mpid/ch4/netmod/ofi/ofi_am_events.h index df3667ad09f..27705bd036a 100644 --- a/src/mpid/ch4/netmod/ofi/ofi_am_events.h +++ b/src/mpid/ch4/netmod/ofi/ofi_am_events.h @@ -260,7 +260,7 @@ MPL_STATIC_INLINE_PREFIX int do_long_am_recv_iov(struct iovec *iov, MPI_Aint iov int mpi_errno = MPI_SUCCESS; MPIDI_OFI_AM_RREQ_HDR(rreq, lmt_type) = MPIDI_OFI_AM_LMT_IOV; MPI_Aint rem, curr_len; - int num_reads; + MPI_Aint num_reads; /* set lmt counter */ MPIDI_OFI_AM_RREQ_HDR(rreq, lmt_u.lmt_cntr) = 0; @@ -363,7 +363,7 @@ MPL_STATIC_INLINE_PREFIX int do_long_am_recv(MPI_Aint in_data_sz, MPIR_Request * MPIDI_OFI_lmt_msg_payload_t * lmt_msg) { int mpi_errno = MPI_SUCCESS; - int num_iov = MPIDIG_get_recv_iov_count(rreq); + MPI_Aint num_iov = MPIDIG_get_recv_iov_count(rreq); if (num_iov > 1 && in_data_sz / num_iov < MPIR_CVAR_CH4_IOV_DENSITY_MIN) { /* noncontig data with mostly tiny segments */ mpi_errno = do_long_am_recv_unpack(in_data_sz, rreq, lmt_msg); diff --git a/src/mpid/ch4/netmod/ofi/ofi_impl.h b/src/mpid/ch4/netmod/ofi/ofi_impl.h index 625021a284e..35914d461f4 100644 --- a/src/mpid/ch4/netmod/ofi/ofi_impl.h +++ b/src/mpid/ch4/netmod/ofi/ofi_impl.h @@ -85,7 +85,7 @@ int MPIDI_OFI_handle_cq_error(int vci, int nic, ssize_t ret); "**ofid_"#STR, \ "**ofid_"#STR" %s %s", \ MPIDI_OFI_DEFAULT_NIC_NAME, \ - fi_strerror(-_ret)); \ + fi_strerror(-(int)_ret)); \ } while (0) #define MPIDI_OFI_CALL_RETRY(FUNC,vci_,STR) \ @@ -101,7 +101,7 @@ int MPIDI_OFI_handle_cq_error(int vci, int nic, ssize_t ret); "**ofid_"#STR, \ "**ofid_"#STR" %s %s", \ MPIDI_OFI_DEFAULT_NIC_NAME, \ - fi_strerror(-_ret)); \ + fi_strerror(-(int)_ret)); \ if (_retry > 0) { \ _retry--; \ MPIR_ERR_CHKANDJUMP(_retry == 0, mpi_errno, MPIX_ERR_EAGAIN, "**eagain"); \ @@ -143,7 +143,7 @@ int MPIDI_OFI_handle_cq_error(int vci, int nic, ssize_t ret); "**ofid_"#STR, \ "**ofid_"#STR" %s %s", \ MPIDI_OFI_DEFAULT_NIC_NAME, \ - fi_strerror(-_ret)); \ + fi_strerror(-(int)_ret)); \ mpi_errno = MPIDI_OFI_progress_do_queue(vci_); \ if (mpi_errno != MPI_SUCCESS) \ MPIR_ERR_CHECK(mpi_errno); \ @@ -647,7 +647,8 @@ MPL_STATIC_INLINE_PREFIX bool MPIDI_OFI_has_cq_buffered(int vci) MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_progress_do_queue(int vci) { - int mpi_errno = MPI_SUCCESS, ret = 0; + int mpi_errno = MPI_SUCCESS; + ssize_t ret = 0; struct fi_cq_tagged_entry cq_entry; MPIR_FUNC_ENTER; diff --git a/src/mpid/ch4/src/ch4_coll_impl.h b/src/mpid/ch4/src/ch4_coll_impl.h index cae0128c8b2..1f76e4e8e08 100644 --- a/src/mpid/ch4/src/ch4_coll_impl.h +++ b/src/mpid/ch4/src/ch4_coll_impl.h @@ -745,7 +745,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Allreduce_intra_composition_delta(const void MPI_Aint lb, true_extent, extent; int num_offsets = MPIR_CVAR_ALLREDUCE_LOCAL_COPY_OFFSETS; int local_copy_rank = MPIR_Comm_rank(comm_ptr->node_comm); - int local_copy_offset = 0; + MPI_Aint local_copy_offset = 0; int local_copy_group = 0; int shm_size_per_lead = MPIR_CVAR_ALLREDUCE_SHM_PER_LEADER; @@ -801,8 +801,8 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Allreduce_intra_composition_delta(const void &chunk_size_floor, &chunk_size_ceil); for (iter = 0; iter < num_chunks; iter++) { - int chunk_count = (iter == 0) ? chunk_size_floor : chunk_size_ceil; - int per_leader_count = chunk_count / num_leads; + MPI_Aint chunk_count = (iter == 0) ? chunk_size_floor : chunk_size_ceil; + MPI_Aint per_leader_count = chunk_count / num_leads; if (my_leader_rank == (num_leads - 1)) { /* If chunk_count is not perfectly divisible by num_leaders. The last leader gets the * leftover count as well */ @@ -850,9 +850,9 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Allreduce_intra_composition_delta(const void * from shm_buffer of every leader into shm_buffer of leader 0 */ if (MPIDI_COMM(comm_ptr, intra_node_leads_comm) != NULL) { - int j; + MPI_Aint j; MPI_Aint cache_tile_size, cache_chunk_count; - int leader_offset = my_leader_rank * (chunk_count / num_leads) * extent; + MPI_Aint leader_offset = my_leader_rank * (chunk_count / num_leads) * extent; cache_tile_size = MPIR_CVAR_ALLREDUCE_CACHE_PER_LEADER; MPI_Aint cache_chunk_size_floor = 0, cache_chunk_size_ceil = 0; @@ -1141,10 +1141,10 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_intra_composition_gamma(const void *se * the data for ranks sitting on other nodes into a shared memory buffer. Next each rank participates * as a leader in inter-node Alltoall */ MPL_STATIC_INLINE_PREFIX int MPIDI_Alltoall_intra_composition_alpha(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, int coll_attr) @@ -1340,10 +1340,10 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Alltoallw_intra_composition_alpha(const void } MPL_STATIC_INLINE_PREFIX int MPIDI_Allgather_intra_composition_alpha(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, int coll_attr) @@ -1351,8 +1351,8 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Allgather_intra_composition_alpha(const void int mpi_errno = MPI_SUCCESS; int node_comm_size = MPIR_Comm_size(comm_ptr->node_comm); int my_node_comm_rank = MPIR_Comm_rank(comm_ptr->node_comm); - MPI_Aint type_size, extent, true_extent, lb; - int is_contig, offset; + MPI_Aint type_size, extent, true_extent, lb, offset; + int is_contig; if (sendcount < 1 && sendbuf != MPI_IN_PLACE) goto fn_exit; diff --git a/src/mpid/ch4/src/ch4_types.h b/src/mpid/ch4/src/ch4_types.h index c84a93637d4..2aa491b669a 100644 --- a/src/mpid/ch4/src/ch4_types.h +++ b/src/mpid/ch4/src/ch4_types.h @@ -165,9 +165,9 @@ typedef struct MPIDIG_acc_req_msg_t { int src_rank; uint64_t win_id; MPIR_Request *req_ptr; - int origin_count; + MPI_Aint origin_count; MPI_Datatype origin_datatype; - int target_count; + MPI_Aint target_count; MPI_Datatype target_datatype; MPI_Op op; MPI_Aint target_disp; diff --git a/src/mpid/ch4/src/mpidig_recv_utils.h b/src/mpid/ch4/src/mpidig_recv_utils.h index 900c0298b1b..3a9e704ee22 100644 --- a/src/mpid/ch4/src/mpidig_recv_utils.h +++ b/src/mpid/ch4/src/mpidig_recv_utils.h @@ -189,7 +189,7 @@ MPL_STATIC_INLINE_PREFIX void MPIDIG_get_recv_buffer(void **p_data, MPI_Aint * p } /* Sometime the transport just need info to make algorithm choice */ -MPL_STATIC_INLINE_PREFIX int MPIDIG_get_recv_iov_count(MPIR_Request * rreq) +MPL_STATIC_INLINE_PREFIX MPI_Aint MPIDIG_get_recv_iov_count(MPIR_Request * rreq) { MPIDIG_rreq_async_t *p = &(MPIDIG_REQUEST(rreq, req->recv_async)); if (p->recv_type == MPIDIG_RECV_DATATYPE) { @@ -253,12 +253,12 @@ MPL_STATIC_INLINE_PREFIX void MPIDIG_recv_copy(void *in_data, MPIR_Request * rre } else { /* noncontig case */ struct iovec *iov = p->iov_ptr; - int iov_len = p->iov_num; + MPI_Aint iov_len = p->iov_num; int done = 0; - int rem = in_data_sz; + MPI_Aint rem = in_data_sz; for (int i = 0; i < iov_len && rem > 0; i++) { - int curr_len = MPL_MIN(rem, iov[i].iov_len); + MPI_Aint curr_len = MPL_MIN(rem, iov[i].iov_len); MPIR_Typerep_copy(iov[i].iov_base, (char *) in_data + done, curr_len, MPIR_TYPEREP_FLAG_NONE); rem -= curr_len; diff --git a/src/mpid/ch4/src/mpidig_rma.h b/src/mpid/ch4/src/mpidig_rma.h index 8e716c14cfb..bf1c2b02c91 100644 --- a/src/mpid/ch4/src/mpidig_rma.h +++ b/src/mpid/ch4/src/mpidig_rma.h @@ -497,7 +497,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDIG_do_get_accumulate(const void *origin_addr, MPIR_T_PVAR_TIMER_END(RMA, rma_amhdr_set); - int am_hdr_max_size; + MPI_Aint am_hdr_max_size; #ifndef MPIDI_CH4_DIRECT_NETMOD int is_local = MPIDI_rank_is_local(target_rank, win->comm_ptr); am_hdr_max_size = is_local ? MPIDI_SHM_am_hdr_max_sz() : MPIDI_NM_am_hdr_max_sz(); diff --git a/src/mpid/common/genq/mpidu_genqi_shmem_types.h b/src/mpid/common/genq/mpidu_genqi_shmem_types.h index b30a4c535ae..ae9476538c6 100644 --- a/src/mpid/common/genq/mpidu_genqi_shmem_types.h +++ b/src/mpid/common/genq/mpidu_genqi_shmem_types.h @@ -47,12 +47,12 @@ typedef union MPIDU_genq_shmem_queue { } MPIDU_genq_shmem_queue_u; typedef struct MPIDU_genqi_shmem_pool { - uintptr_t cell_size; - uintptr_t cell_alloc_size; - uintptr_t cells_per_free_queue; - uintptr_t num_proc; - uintptr_t num_free_queue; - uintptr_t slab_size; + int cell_size; + int cell_alloc_size; + int cells_per_free_queue; + int num_proc; + int num_free_queue; + int slab_size; int rank; void *slab; diff --git a/src/mpl/src/str/mpl_arg_serial.c b/src/mpl/src/str/mpl_arg_serial.c index b0e70ca51f6..aaaf32f657b 100644 --- a/src/mpl/src/str/mpl_arg_serial.c +++ b/src/mpl/src/str/mpl_arg_serial.c @@ -8,7 +8,8 @@ int MPL_args_serialize(int argc, char **argv, int *len, void **serialized_buf) { - int buf_size, offset, tmp; + int buf_size, offset; + size_t tmp; char *buf; int i;