Skip to content

Commit

Permalink
coll/ucc: fix int overflow in coll init
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergei-Lebedev committed Sep 23, 2024
1 parent 6f08eaf commit e093c6e
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions ompi/mca/coll/ucc/coll_ucc_allgather.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

#include "coll_ucc_common.h"

static inline ucc_status_t mca_coll_ucc_allgather_init(const void *sbuf, int scount, struct ompi_datatype_t *sdtype,
void* rbuf, int rcount, struct ompi_datatype_t *rdtype,
static inline ucc_status_t mca_coll_ucc_allgather_init(const void *sbuf, size_t scount, struct ompi_datatype_t *sdtype,
void* rbuf, size_t rcount, struct ompi_datatype_t *rdtype,
mca_coll_ucc_module_t *ucc_module,
ucc_coll_req_h *req,
mca_coll_ucc_req_t *coll_req)
Expand Down
2 changes: 1 addition & 1 deletion ompi/mca/coll/ucc/coll_ucc_allgatherv.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include "coll_ucc_common.h"

static inline ucc_status_t mca_coll_ucc_allgatherv_init(const void *sbuf, int scount,
static inline ucc_status_t mca_coll_ucc_allgatherv_init(const void *sbuf, size_t scount,
struct ompi_datatype_t *sdtype,
void* rbuf, const int *rcounts, const int *rdisps,
struct ompi_datatype_t *rdtype,
Expand Down
2 changes: 1 addition & 1 deletion ompi/mca/coll/ucc/coll_ucc_allreduce.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include "coll_ucc_common.h"

static inline ucc_status_t mca_coll_ucc_allreduce_init(const void *sbuf, void *rbuf, int count,
static inline ucc_status_t mca_coll_ucc_allreduce_init(const void *sbuf, void *rbuf, size_t count,
struct ompi_datatype_t *dtype,
struct ompi_op_t *op, mca_coll_ucc_module_t *ucc_module,
ucc_coll_req_h *req,
Expand Down
4 changes: 2 additions & 2 deletions ompi/mca/coll/ucc/coll_ucc_alltoall.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

#include "coll_ucc_common.h"

static inline ucc_status_t mca_coll_ucc_alltoall_init(const void *sbuf, int scount, struct ompi_datatype_t *sdtype,
void* rbuf, int rcount, struct ompi_datatype_t *rdtype,
static inline ucc_status_t mca_coll_ucc_alltoall_init(const void *sbuf, size_t scount, struct ompi_datatype_t *sdtype,
void* rbuf, size_t rcount, struct ompi_datatype_t *rdtype,
mca_coll_ucc_module_t *ucc_module,
ucc_coll_req_h *req,
mca_coll_ucc_req_t *coll_req)
Expand Down
2 changes: 1 addition & 1 deletion ompi/mca/coll/ucc/coll_ucc_bcast.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include "coll_ucc_common.h"

static inline ucc_status_t mca_coll_ucc_bcast_init(void *buf, int count, struct ompi_datatype_t *dtype,
static inline ucc_status_t mca_coll_ucc_bcast_init(void *buf, size_t count, struct ompi_datatype_t *dtype,
int root, mca_coll_ucc_module_t *ucc_module,
ucc_coll_req_h *req,
mca_coll_ucc_req_t *coll_req)
Expand Down
4 changes: 2 additions & 2 deletions ompi/mca/coll/ucc/coll_ucc_gather.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#include "coll_ucc_common.h"

static inline
ucc_status_t mca_coll_ucc_gather_init(const void *sbuf, int scount, struct ompi_datatype_t *sdtype,
void *rbuf, int rcount, struct ompi_datatype_t *rdtype,
ucc_status_t mca_coll_ucc_gather_init(const void *sbuf, size_t scount, struct ompi_datatype_t *sdtype,
void *rbuf, size_t rcount, struct ompi_datatype_t *rdtype,
int root, mca_coll_ucc_module_t *ucc_module,
ucc_coll_req_h *req,
mca_coll_ucc_req_t *coll_req)
Expand Down
2 changes: 1 addition & 1 deletion ompi/mca/coll/ucc/coll_ucc_gatherv.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#include "coll_ucc_common.h"

static inline ucc_status_t mca_coll_ucc_gatherv_init(const void *sbuf, int scount, struct ompi_datatype_t *sdtype,
static inline ucc_status_t mca_coll_ucc_gatherv_init(const void *sbuf, size_t scount, struct ompi_datatype_t *sdtype,
void *rbuf, const int *rcounts, const int *disps,
struct ompi_datatype_t *rdtype, int root,
mca_coll_ucc_module_t *ucc_module,
Expand Down
2 changes: 1 addition & 1 deletion ompi/mca/coll/ucc/coll_ucc_reduce.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include "coll_ucc_common.h"

static inline ucc_status_t mca_coll_ucc_reduce_init(const void *sbuf, void *rbuf, int count,
static inline ucc_status_t mca_coll_ucc_reduce_init(const void *sbuf, void *rbuf, size_t count,
struct ompi_datatype_t *dtype,
struct ompi_op_t *op, int root,
mca_coll_ucc_module_t *ucc_module,
Expand Down
2 changes: 1 addition & 1 deletion ompi/mca/coll/ucc/coll_ucc_reduce_scatter_block.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

static inline
ucc_status_t mca_coll_ucc_reduce_scatter_block_init(const void *sbuf, void *rbuf,
int rcount,
size_t rcount,
struct ompi_datatype_t *dtype,
struct ompi_op_t *op,
mca_coll_ucc_module_t *ucc_module,
Expand Down
4 changes: 2 additions & 2 deletions ompi/mca/coll/ucc/coll_ucc_scatter.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
#include "coll_ucc_common.h"

static inline
ucc_status_t mca_coll_ucc_scatter_init(const void *sbuf, int scount,
ucc_status_t mca_coll_ucc_scatter_init(const void *sbuf, size_t scount,
struct ompi_datatype_t *sdtype,
void *rbuf, int rcount,
void *rbuf, size_t rcount,
struct ompi_datatype_t *rdtype, int root,
mca_coll_ucc_module_t *ucc_module,
ucc_coll_req_h *req,
Expand Down
2 changes: 1 addition & 1 deletion ompi/mca/coll/ucc/coll_ucc_scatterv.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
static inline
ucc_status_t mca_coll_ucc_scatterv_init(const void *sbuf, const int *scounts,
const int *disps, struct ompi_datatype_t *sdtype,
void *rbuf, int rcount,
void *rbuf, size_t rcount,
struct ompi_datatype_t *rdtype, int root,
mca_coll_ucc_module_t *ucc_module,
ucc_coll_req_h *req,
Expand Down

0 comments on commit e093c6e

Please sign in to comment.