Skip to content

Commit

Permalink
Merge pull request open-mpi#12539 from hppritcha/coll-framework-bigco…
Browse files Browse the repository at this point in the history
…unt-intpromo

Big Count: first pass for coll framework bc
  • Loading branch information
hppritcha authored May 20, 2024
2 parents cebad71 + 4d7c65d commit 6e99e02
Show file tree
Hide file tree
Showing 154 changed files with 1,108 additions and 1,105 deletions.
12 changes: 6 additions & 6 deletions ompi/mca/coll/accelerator/coll_accelerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,33 +39,33 @@ mca_coll_base_module_t
int *priority);

int
mca_coll_accelerator_allreduce(const void *sbuf, void *rbuf, int count,
mca_coll_accelerator_allreduce(const void *sbuf, void *rbuf, size_t count,
struct ompi_datatype_t *dtype,
struct ompi_op_t *op,
struct ompi_communicator_t *comm,
mca_coll_base_module_t *module);

int mca_coll_accelerator_reduce(const void *sbuf, void *rbuf, int count,
int mca_coll_accelerator_reduce(const void *sbuf, void *rbuf, size_t count,
struct ompi_datatype_t *dtype,
struct ompi_op_t *op,
int root,
struct ompi_communicator_t *comm,
mca_coll_base_module_t *module);

int mca_coll_accelerator_exscan(const void *sbuf, void *rbuf, int count,
int mca_coll_accelerator_exscan(const void *sbuf, void *rbuf, size_t count,
struct ompi_datatype_t *dtype,
struct ompi_op_t *op,
struct ompi_communicator_t *comm,
mca_coll_base_module_t *module);

int mca_coll_accelerator_scan(const void *sbuf, void *rbuf, int count,
int mca_coll_accelerator_scan(const void *sbuf, void *rbuf, size_t count,
struct ompi_datatype_t *dtype,
struct ompi_op_t *op,
struct ompi_communicator_t *comm,
mca_coll_base_module_t *module);

int
mca_coll_accelerator_reduce_scatter_block(const void *sbuf, void *rbuf, int rcount,
mca_coll_accelerator_reduce_scatter_block(const void *sbuf, void *rbuf, size_t rcount,
struct ompi_datatype_t *dtype,
struct ompi_op_t *op,
struct ompi_communicator_t *comm,
Expand Down Expand Up @@ -121,7 +121,7 @@ OBJ_CLASS_DECLARATION(mca_coll_accelerator_module_t);
/* Component */

typedef struct mca_coll_accelerator_component_t {
mca_coll_base_component_2_4_0_t super;
mca_coll_base_component_3_0_0_t super;

int priority; /* Priority of this component */
int disable_accelerator_coll; /* Force disable of the accelerator collective component */
Expand Down
2 changes: 1 addition & 1 deletion ompi/mca/coll/accelerator/coll_accelerator_allreduce.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* Returns: - MPI_SUCCESS or error code
*/
int
mca_coll_accelerator_allreduce(const void *sbuf, void *rbuf, int count,
mca_coll_accelerator_allreduce(const void *sbuf, void *rbuf, size_t count,
struct ompi_datatype_t *dtype,
struct ompi_op_t *op,
struct ompi_communicator_t *comm,
Expand Down
2 changes: 1 addition & 1 deletion ompi/mca/coll/accelerator/coll_accelerator_component.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ mca_coll_accelerator_component_t mca_coll_accelerator_component = {
* about the component itself */

.collm_version = {
MCA_COLL_BASE_VERSION_2_4_0,
MCA_COLL_BASE_VERSION_3_0_0,

/* Component name and version */
.mca_component_name = "accelerator",
Expand Down
2 changes: 1 addition & 1 deletion ompi/mca/coll/accelerator/coll_accelerator_exscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "ompi/op/op.h"
#include "opal/datatype/opal_convertor.h"

int mca_coll_accelerator_exscan(const void *sbuf, void *rbuf, int count,
int mca_coll_accelerator_exscan(const void *sbuf, void *rbuf, size_t count,
struct ompi_datatype_t *dtype,
struct ompi_op_t *op,
struct ompi_communicator_t *comm,
Expand Down
2 changes: 1 addition & 1 deletion ompi/mca/coll/accelerator/coll_accelerator_reduce.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* Returns: - MPI_SUCCESS or error code
*/
int
mca_coll_accelerator_reduce(const void *sbuf, void *rbuf, int count,
mca_coll_accelerator_reduce(const void *sbuf, void *rbuf, size_t count,
struct ompi_datatype_t *dtype,
struct ompi_op_t *op,
int root, struct ompi_communicator_t *comm,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* up at some point)
*/
int
mca_coll_accelerator_reduce_scatter_block(const void *sbuf, void *rbuf, int rcount,
mca_coll_accelerator_reduce_scatter_block(const void *sbuf, void *rbuf, size_t rcount,
struct ompi_datatype_t *dtype,
struct ompi_op_t *op,
struct ompi_communicator_t *comm,
Expand Down
2 changes: 1 addition & 1 deletion ompi/mca/coll/accelerator/coll_accelerator_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* Accepts: - same arguments as MPI_Scan()
* Returns: - MPI_SUCCESS or error code
*/
int mca_coll_accelerator_scan(const void *sbuf, void *rbuf, int count,
int mca_coll_accelerator_scan(const void *sbuf, void *rbuf, size_t count,
struct ompi_datatype_t *dtype,
struct ompi_op_t *op,
struct ompi_communicator_t *comm,
Expand Down
2 changes: 1 addition & 1 deletion ompi/mca/coll/adapt/coll_adapt.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ typedef enum {
*/
typedef struct mca_coll_adapt_component_t {
/* Base coll component */
mca_coll_base_component_2_4_0_t super;
mca_coll_base_component_3_0_0_t super;

/* MCA parameter: Priority of this component */
int adapt_priority;
Expand Down
2 changes: 1 addition & 1 deletion ompi/mca/coll/adapt/coll_adapt_bcast.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "coll_adapt.h"
#include "coll_adapt_algorithms.h"

int ompi_coll_adapt_bcast(void *buff, int count, struct ompi_datatype_t *datatype, int root,
int ompi_coll_adapt_bcast(void *buff, size_t count, struct ompi_datatype_t *datatype, int root,
struct ompi_communicator_t *comm, mca_coll_base_module_t * module)
{
ompi_request_t *request = NULL;
Expand Down
2 changes: 1 addition & 1 deletion ompi/mca/coll/adapt/coll_adapt_component.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ mca_coll_adapt_component_t mca_coll_adapt_component = {
/* First, the mca_component_t struct containing meta
information about the component itself */
.collm_version = {
MCA_COLL_BASE_VERSION_2_4_0,
MCA_COLL_BASE_VERSION_3_0_0,

/* Component name and version */
.mca_component_name = "adapt",
Expand Down
8 changes: 4 additions & 4 deletions ompi/mca/coll/adapt/coll_adapt_ibcast.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ static int recv_cb(ompi_request_t * req)
return 1;
}

int ompi_coll_adapt_ibcast(void *buff, int count, struct ompi_datatype_t *datatype, int root,
int ompi_coll_adapt_ibcast(void *buff, size_t count, struct ompi_datatype_t *datatype, int root,
struct ompi_communicator_t *comm, ompi_request_t ** request,
mca_coll_base_module_t * module)
{
Expand All @@ -341,7 +341,7 @@ int ompi_coll_adapt_ibcast(void *buff, int count, struct ompi_datatype_t *dataty
}


int ompi_coll_adapt_ibcast_generic(void *buff, int count, struct ompi_datatype_t *datatype, int root,
int ompi_coll_adapt_ibcast_generic(void *buff, size_t count, struct ompi_datatype_t *datatype, int root,
struct ompi_communicator_t *comm, ompi_request_t ** request,
mca_coll_base_module_t * module, ompi_coll_tree_t * tree,
size_t seg_size)
Expand All @@ -351,7 +351,7 @@ int ompi_coll_adapt_ibcast_generic(void *buff, int count, struct ompi_datatype_t
int min;

/* Number of datatype in a segment */
int seg_count = count;
size_t seg_count = count;
/* Size of a datatype */
size_t type_size;
/* Real size of a segment */
Expand Down Expand Up @@ -446,7 +446,7 @@ int ompi_coll_adapt_ibcast_generic(void *buff, int count, struct ompi_datatype_t
"[%d]: Ibcast, root %d, tag %d\n", rank, root,
con->ibcast_tag));
OPAL_OUTPUT_VERBOSE((30, mca_coll_adapt_component.adapt_output,
"[%d]: con->mutex = %p, num_children = %d, num_segs = %d, real_seg_size = %d, seg_count = %d, tree_adreess = %p\n",
"[%d]: con->mutex = %p, num_children = %d, num_segs = %d, real_seg_size = %d, seg_count = %zu, tree_adreess = %p\n",
rank, (void *) con->mutex, tree->tree_nextsize, num_segs,
(int) real_seg_size, seg_count, (void *) con->tree));

Expand Down
11 changes: 6 additions & 5 deletions ompi/mca/coll/adapt/coll_adapt_ireduce.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ static int recv_cb(ompi_request_t * req)
return 1;
}

int ompi_coll_adapt_ireduce(const void *sbuf, void *rbuf, int count, struct ompi_datatype_t *dtype,
int ompi_coll_adapt_ireduce(const void *sbuf, void *rbuf, size_t count, struct ompi_datatype_t *dtype,
struct ompi_op_t *op, int root, struct ompi_communicator_t *comm,
ompi_request_t ** request, mca_coll_base_module_t * module)
{
Expand Down Expand Up @@ -513,7 +513,7 @@ int ompi_coll_adapt_ireduce(const void *sbuf, void *rbuf, int count, struct ompi
}


int ompi_coll_adapt_ireduce_generic(const void *sbuf, void *rbuf, int count,
int ompi_coll_adapt_ireduce_generic(const void *sbuf, void *rbuf, size_t count,
struct ompi_datatype_t *dtype, struct ompi_op_t *op, int root,
struct ompi_communicator_t *comm, ompi_request_t ** request,
mca_coll_base_module_t * module, ompi_coll_tree_t * tree,
Expand All @@ -523,7 +523,8 @@ int ompi_coll_adapt_ireduce_generic(const void *sbuf, void *rbuf, int count,
ptrdiff_t extent, lower_bound, segment_increment;
ptrdiff_t true_lower_bound, true_extent, real_seg_size;
size_t typelng;
int seg_count = count, num_segs, rank, recv_count, send_count, err, min;
size_t seg_count = count, recv_count, send_count;
int num_segs, rank, err, min;
/* Used to store the accumuate result, pointer to every segment */
char **accumbuf = NULL;
opal_mutex_t *mutex_op_list;
Expand Down Expand Up @@ -696,7 +697,7 @@ int ompi_coll_adapt_ireduce_generic(const void *sbuf, void *rbuf, int count,
context->inbuf = inbuf;

OPAL_OUTPUT_VERBOSE((30, mca_coll_adapt_component.adapt_output,
"[%d]: In ireduce, create irecv for seg %d, peer %d, recv_count %d, inbuf %p tag %d\n",
"[%d]: In ireduce, create irecv for seg %d, peer %d, recv_count %zu, inbuf %p tag %d\n",
context->con->rank, context->seg_index, context->peer,
recv_count, (void *) inbuf,
con->ireduce_tag - seg_index));
Expand Down Expand Up @@ -747,7 +748,7 @@ int ompi_coll_adapt_ireduce_generic(const void *sbuf, void *rbuf, int count,
context->inbuf = NULL;

OPAL_OUTPUT_VERBOSE((30, mca_coll_adapt_component.adapt_output,
"[%d]: In ireduce, create isend to seg %d, peer %d, send_count %d tag %d\n",
"[%d]: In ireduce, create isend to seg %d, peer %d, send_count %zu tag %d\n",
context->con->rank, context->seg_index, context->peer,
send_count, con->ireduce_tag - context->seg_index));

Expand Down
2 changes: 1 addition & 1 deletion ompi/mca/coll/adapt/coll_adapt_reduce.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "coll_adapt_algorithms.h"

/* MPI_Reduce and MPI_Ireduce in the ADAPT module only work for commutative operations */
int ompi_coll_adapt_reduce(const void *sbuf, void *rbuf, int count, struct ompi_datatype_t *dtype,
int ompi_coll_adapt_reduce(const void *sbuf, void *rbuf, size_t count, struct ompi_datatype_t *dtype,
struct ompi_op_t *op, int root, struct ompi_communicator_t *comm,
mca_coll_base_module_t * module)
{
Expand Down
4 changes: 2 additions & 2 deletions ompi/mca/coll/base/coll_base_agree_noft.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

int
ompi_coll_base_agree_noft(void *contrib,
int dt_count,
size_t dt_count,
struct ompi_datatype_t *dt,
struct ompi_op_t *op,
struct ompi_group_t **group, bool update_grp,
Expand All @@ -33,7 +33,7 @@ ompi_coll_base_agree_noft(void *contrib,

int
ompi_coll_base_iagree_noft(void *contrib,
int dt_count,
size_t dt_count,
struct ompi_datatype_t *dt,
struct ompi_op_t *op,
struct ompi_group_t **group, bool update_grp,
Expand Down
32 changes: 16 additions & 16 deletions ompi/mca/coll/base/coll_base_allgather.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@
* step, and send them appropriate messages.
*/
int
ompi_coll_base_allgather_intra_recursivedoubling(const void *sbuf, int scount,
ompi_coll_base_allgather_intra_recursivedoubling(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,
struct ompi_communicator_t *comm,
mca_coll_base_module_t *module)
Expand Down Expand Up @@ -224,9 +224,9 @@ ompi_coll_base_allgather_intra_recursivedoubling(const void *sbuf, int scount,
* [5] [5] [5] [5] [5] [5]
*/

int ompi_coll_base_allgather_intra_sparbit(const void *sbuf, int scount,
int ompi_coll_base_allgather_intra_sparbit(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,
struct ompi_communicator_t *comm,
mca_coll_base_module_t *module)
Expand Down Expand Up @@ -327,9 +327,9 @@ int ompi_coll_base_allgather_intra_sparbit(const void *sbuf, int scount,
* No additional memory requirements.
*
*/
int ompi_coll_base_allgather_intra_ring(const void *sbuf, int scount,
int ompi_coll_base_allgather_intra_ring(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,
struct ompi_communicator_t *comm,
mca_coll_base_module_t *module)
Expand Down Expand Up @@ -453,9 +453,9 @@ int ompi_coll_base_allgather_intra_ring(const void *sbuf, int scount,
* [5] [5] [5] [5] [5] [5]
*/
int
ompi_coll_base_allgather_intra_neighborexchange(const void *sbuf, int scount,
ompi_coll_base_allgather_intra_neighborexchange(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,
struct ompi_communicator_t *comm,
mca_coll_base_module_t *module)
Expand Down Expand Up @@ -567,9 +567,9 @@ ompi_coll_base_allgather_intra_neighborexchange(const void *sbuf, int scount,
}


int ompi_coll_base_allgather_intra_two_procs(const void *sbuf, int scount,
int ompi_coll_base_allgather_intra_two_procs(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,
struct ompi_communicator_t *comm,
mca_coll_base_module_t *module)
Expand Down Expand Up @@ -650,10 +650,10 @@ int ompi_coll_base_allgather_intra_two_procs(const void *sbuf, int scount,
* Returns: - MPI_SUCCESS or error code
*/
int
ompi_coll_base_allgather_intra_basic_linear(const void *sbuf, int scount,
ompi_coll_base_allgather_intra_basic_linear(const void *sbuf, size_t scount,
struct ompi_datatype_t *sdtype,
void *rbuf,
int rcount,
size_t rcount,
struct ompi_datatype_t *rdtype,
struct ompi_communicator_t *comm,
mca_coll_base_module_t *module)
Expand Down Expand Up @@ -764,9 +764,9 @@ ompi_coll_base_allgather_intra_basic_linear(const void *sbuf, int scount,
* [8] [8] [8] [8] [8] [8] [8] [8] [8] [8]
* [9] [9] [9] [9] [9] [9] [9] [9] [9] [9]
*/
int ompi_coll_base_allgather_intra_k_bruck(const void *sbuf, int scount,
int ompi_coll_base_allgather_intra_k_bruck(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,
struct ompi_communicator_t *comm,
mca_coll_base_module_t *module,
Expand Down Expand Up @@ -927,9 +927,9 @@ int ompi_coll_base_allgather_intra_k_bruck(const void *sbuf, int scount,
* Caution is needed on larger communicators(n) and data sizes(m), which will
* result in m*n^2 total traffic and potential network congestion.
*/
int ompi_coll_base_allgather_direct_messaging(const void *sbuf, int scount,
int ompi_coll_base_allgather_direct_messaging(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,
struct ompi_communicator_t *comm,
mca_coll_base_module_t *module)
Expand Down
Loading

0 comments on commit 6e99e02

Please sign in to comment.