Skip to content

Commit 0dec01d

Browse files
jtrongehpcraink
authored andcommitted
Big Count: first pass for coll framework bc
This commit adds only those functions which make use of C integer promotion. So none of the 'v,w' and reduce_scatter related methods are added in this PR. Related to open-mpi#12336 Pieces of open-mpi#12478 were taken out to make this PR. Signed-off-by: Howard Pritchard <[email protected]>
1 parent 64c5668 commit 0dec01d

File tree

154 files changed

+1108
-1105
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+1108
-1105
lines changed

ompi/mca/coll/accelerator/coll_accelerator.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,33 +39,33 @@ mca_coll_base_module_t
3939
int *priority);
4040

4141
int
42-
mca_coll_accelerator_allreduce(const void *sbuf, void *rbuf, int count,
42+
mca_coll_accelerator_allreduce(const void *sbuf, void *rbuf, size_t count,
4343
struct ompi_datatype_t *dtype,
4444
struct ompi_op_t *op,
4545
struct ompi_communicator_t *comm,
4646
mca_coll_base_module_t *module);
4747

48-
int mca_coll_accelerator_reduce(const void *sbuf, void *rbuf, int count,
48+
int mca_coll_accelerator_reduce(const void *sbuf, void *rbuf, size_t count,
4949
struct ompi_datatype_t *dtype,
5050
struct ompi_op_t *op,
5151
int root,
5252
struct ompi_communicator_t *comm,
5353
mca_coll_base_module_t *module);
5454

55-
int mca_coll_accelerator_exscan(const void *sbuf, void *rbuf, int count,
55+
int mca_coll_accelerator_exscan(const void *sbuf, void *rbuf, size_t count,
5656
struct ompi_datatype_t *dtype,
5757
struct ompi_op_t *op,
5858
struct ompi_communicator_t *comm,
5959
mca_coll_base_module_t *module);
6060

61-
int mca_coll_accelerator_scan(const void *sbuf, void *rbuf, int count,
61+
int mca_coll_accelerator_scan(const void *sbuf, void *rbuf, size_t count,
6262
struct ompi_datatype_t *dtype,
6363
struct ompi_op_t *op,
6464
struct ompi_communicator_t *comm,
6565
mca_coll_base_module_t *module);
6666

6767
int
68-
mca_coll_accelerator_reduce_scatter_block(const void *sbuf, void *rbuf, int rcount,
68+
mca_coll_accelerator_reduce_scatter_block(const void *sbuf, void *rbuf, size_t rcount,
6969
struct ompi_datatype_t *dtype,
7070
struct ompi_op_t *op,
7171
struct ompi_communicator_t *comm,
@@ -121,7 +121,7 @@ OBJ_CLASS_DECLARATION(mca_coll_accelerator_module_t);
121121
/* Component */
122122

123123
typedef struct mca_coll_accelerator_component_t {
124-
mca_coll_base_component_2_4_0_t super;
124+
mca_coll_base_component_3_0_0_t super;
125125

126126
int priority; /* Priority of this component */
127127
int disable_accelerator_coll; /* Force disable of the accelerator collective component */

ompi/mca/coll/accelerator/coll_accelerator_allreduce.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* Returns: - MPI_SUCCESS or error code
2929
*/
3030
int
31-
mca_coll_accelerator_allreduce(const void *sbuf, void *rbuf, int count,
31+
mca_coll_accelerator_allreduce(const void *sbuf, void *rbuf, size_t count,
3232
struct ompi_datatype_t *dtype,
3333
struct ompi_op_t *op,
3434
struct ompi_communicator_t *comm,

ompi/mca/coll/accelerator/coll_accelerator_component.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ mca_coll_accelerator_component_t mca_coll_accelerator_component = {
4444
* about the component itself */
4545

4646
.collm_version = {
47-
MCA_COLL_BASE_VERSION_2_4_0,
47+
MCA_COLL_BASE_VERSION_3_0_0,
4848

4949
/* Component name and version */
5050
.mca_component_name = "accelerator",

ompi/mca/coll/accelerator/coll_accelerator_exscan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include "ompi/op/op.h"
2121
#include "opal/datatype/opal_convertor.h"
2222

23-
int mca_coll_accelerator_exscan(const void *sbuf, void *rbuf, int count,
23+
int mca_coll_accelerator_exscan(const void *sbuf, void *rbuf, size_t count,
2424
struct ompi_datatype_t *dtype,
2525
struct ompi_op_t *op,
2626
struct ompi_communicator_t *comm,

ompi/mca/coll/accelerator/coll_accelerator_reduce.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* Returns: - MPI_SUCCESS or error code
2929
*/
3030
int
31-
mca_coll_accelerator_reduce(const void *sbuf, void *rbuf, int count,
31+
mca_coll_accelerator_reduce(const void *sbuf, void *rbuf, size_t count,
3232
struct ompi_datatype_t *dtype,
3333
struct ompi_op_t *op,
3434
int root, struct ompi_communicator_t *comm,

ompi/mca/coll/accelerator/coll_accelerator_reduce_scatter_block.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
* up at some point)
3333
*/
3434
int
35-
mca_coll_accelerator_reduce_scatter_block(const void *sbuf, void *rbuf, int rcount,
35+
mca_coll_accelerator_reduce_scatter_block(const void *sbuf, void *rbuf, size_t rcount,
3636
struct ompi_datatype_t *dtype,
3737
struct ompi_op_t *op,
3838
struct ompi_communicator_t *comm,

ompi/mca/coll/accelerator/coll_accelerator_scan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
* Accepts: - same arguments as MPI_Scan()
2828
* Returns: - MPI_SUCCESS or error code
2929
*/
30-
int mca_coll_accelerator_scan(const void *sbuf, void *rbuf, int count,
30+
int mca_coll_accelerator_scan(const void *sbuf, void *rbuf, size_t count,
3131
struct ompi_datatype_t *dtype,
3232
struct ompi_op_t *op,
3333
struct ompi_communicator_t *comm,

ompi/mca/coll/adapt/coll_adapt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ typedef enum {
4444
*/
4545
typedef struct mca_coll_adapt_component_t {
4646
/* Base coll component */
47-
mca_coll_base_component_2_4_0_t super;
47+
mca_coll_base_component_3_0_0_t super;
4848

4949
/* MCA parameter: Priority of this component */
5050
int adapt_priority;

ompi/mca/coll/adapt/coll_adapt_bcast.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include "coll_adapt.h"
1313
#include "coll_adapt_algorithms.h"
1414

15-
int ompi_coll_adapt_bcast(void *buff, int count, struct ompi_datatype_t *datatype, int root,
15+
int ompi_coll_adapt_bcast(void *buff, size_t count, struct ompi_datatype_t *datatype, int root,
1616
struct ompi_communicator_t *comm, mca_coll_base_module_t * module)
1717
{
1818
ompi_request_t *request = NULL;

ompi/mca/coll/adapt/coll_adapt_component.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ mca_coll_adapt_component_t mca_coll_adapt_component = {
4141
/* First, the mca_component_t struct containing meta
4242
information about the component itself */
4343
.collm_version = {
44-
MCA_COLL_BASE_VERSION_2_4_0,
44+
MCA_COLL_BASE_VERSION_3_0_0,
4545

4646
/* Component name and version */
4747
.mca_component_name = "adapt",

ompi/mca/coll/adapt/coll_adapt_ibcast.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ static int recv_cb(ompi_request_t * req)
319319
return 1;
320320
}
321321

322-
int ompi_coll_adapt_ibcast(void *buff, int count, struct ompi_datatype_t *datatype, int root,
322+
int ompi_coll_adapt_ibcast(void *buff, size_t count, struct ompi_datatype_t *datatype, int root,
323323
struct ompi_communicator_t *comm, ompi_request_t ** request,
324324
mca_coll_base_module_t * module)
325325
{
@@ -341,7 +341,7 @@ int ompi_coll_adapt_ibcast(void *buff, int count, struct ompi_datatype_t *dataty
341341
}
342342

343343

344-
int ompi_coll_adapt_ibcast_generic(void *buff, int count, struct ompi_datatype_t *datatype, int root,
344+
int ompi_coll_adapt_ibcast_generic(void *buff, size_t count, struct ompi_datatype_t *datatype, int root,
345345
struct ompi_communicator_t *comm, ompi_request_t ** request,
346346
mca_coll_base_module_t * module, ompi_coll_tree_t * tree,
347347
size_t seg_size)
@@ -351,7 +351,7 @@ int ompi_coll_adapt_ibcast_generic(void *buff, int count, struct ompi_datatype_t
351351
int min;
352352

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

ompi/mca/coll/adapt/coll_adapt_ireduce.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ static int recv_cb(ompi_request_t * req)
476476
return 1;
477477
}
478478

479-
int ompi_coll_adapt_ireduce(const void *sbuf, void *rbuf, int count, struct ompi_datatype_t *dtype,
479+
int ompi_coll_adapt_ireduce(const void *sbuf, void *rbuf, size_t count, struct ompi_datatype_t *dtype,
480480
struct ompi_op_t *op, int root, struct ompi_communicator_t *comm,
481481
ompi_request_t ** request, mca_coll_base_module_t * module)
482482
{
@@ -513,7 +513,7 @@ int ompi_coll_adapt_ireduce(const void *sbuf, void *rbuf, int count, struct ompi
513513
}
514514

515515

516-
int ompi_coll_adapt_ireduce_generic(const void *sbuf, void *rbuf, int count,
516+
int ompi_coll_adapt_ireduce_generic(const void *sbuf, void *rbuf, size_t count,
517517
struct ompi_datatype_t *dtype, struct ompi_op_t *op, int root,
518518
struct ompi_communicator_t *comm, ompi_request_t ** request,
519519
mca_coll_base_module_t * module, ompi_coll_tree_t * tree,
@@ -523,7 +523,8 @@ int ompi_coll_adapt_ireduce_generic(const void *sbuf, void *rbuf, int count,
523523
ptrdiff_t extent, lower_bound, segment_increment;
524524
ptrdiff_t true_lower_bound, true_extent, real_seg_size;
525525
size_t typelng;
526-
int seg_count = count, num_segs, rank, recv_count, send_count, err, min;
526+
size_t seg_count = count, recv_count, send_count;
527+
int num_segs, rank, err, min;
527528
/* Used to store the accumuate result, pointer to every segment */
528529
char **accumbuf = NULL;
529530
opal_mutex_t *mutex_op_list;
@@ -696,7 +697,7 @@ int ompi_coll_adapt_ireduce_generic(const void *sbuf, void *rbuf, int count,
696697
context->inbuf = inbuf;
697698

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

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

ompi/mca/coll/adapt/coll_adapt_reduce.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include "coll_adapt_algorithms.h"
1616

1717
/* MPI_Reduce and MPI_Ireduce in the ADAPT module only work for commutative operations */
18-
int ompi_coll_adapt_reduce(const void *sbuf, void *rbuf, int count, struct ompi_datatype_t *dtype,
18+
int ompi_coll_adapt_reduce(const void *sbuf, void *rbuf, size_t count, struct ompi_datatype_t *dtype,
1919
struct ompi_op_t *op, int root, struct ompi_communicator_t *comm,
2020
mca_coll_base_module_t * module)
2121
{

ompi/mca/coll/base/coll_base_agree_noft.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
int
2121
ompi_coll_base_agree_noft(void *contrib,
22-
int dt_count,
22+
size_t dt_count,
2323
struct ompi_datatype_t *dt,
2424
struct ompi_op_t *op,
2525
struct ompi_group_t **group, bool update_grp,
@@ -33,7 +33,7 @@ ompi_coll_base_agree_noft(void *contrib,
3333

3434
int
3535
ompi_coll_base_iagree_noft(void *contrib,
36-
int dt_count,
36+
size_t dt_count,
3737
struct ompi_datatype_t *dt,
3838
struct ompi_op_t *op,
3939
struct ompi_group_t **group, bool update_grp,

ompi/mca/coll/base/coll_base_allgather.c

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@
8282
* step, and send them appropriate messages.
8383
*/
8484
int
85-
ompi_coll_base_allgather_intra_recursivedoubling(const void *sbuf, int scount,
85+
ompi_coll_base_allgather_intra_recursivedoubling(const void *sbuf, size_t scount,
8686
struct ompi_datatype_t *sdtype,
87-
void* rbuf, int rcount,
87+
void* rbuf, size_t rcount,
8888
struct ompi_datatype_t *rdtype,
8989
struct ompi_communicator_t *comm,
9090
mca_coll_base_module_t *module)
@@ -224,9 +224,9 @@ ompi_coll_base_allgather_intra_recursivedoubling(const void *sbuf, int scount,
224224
* [5] [5] [5] [5] [5] [5]
225225
*/
226226

227-
int ompi_coll_base_allgather_intra_sparbit(const void *sbuf, int scount,
227+
int ompi_coll_base_allgather_intra_sparbit(const void *sbuf, size_t scount,
228228
struct ompi_datatype_t *sdtype,
229-
void* rbuf, int rcount,
229+
void* rbuf, size_t rcount,
230230
struct ompi_datatype_t *rdtype,
231231
struct ompi_communicator_t *comm,
232232
mca_coll_base_module_t *module)
@@ -327,9 +327,9 @@ int ompi_coll_base_allgather_intra_sparbit(const void *sbuf, int scount,
327327
* No additional memory requirements.
328328
*
329329
*/
330-
int ompi_coll_base_allgather_intra_ring(const void *sbuf, int scount,
330+
int ompi_coll_base_allgather_intra_ring(const void *sbuf, size_t scount,
331331
struct ompi_datatype_t *sdtype,
332-
void* rbuf, int rcount,
332+
void* rbuf, size_t rcount,
333333
struct ompi_datatype_t *rdtype,
334334
struct ompi_communicator_t *comm,
335335
mca_coll_base_module_t *module)
@@ -453,9 +453,9 @@ int ompi_coll_base_allgather_intra_ring(const void *sbuf, int scount,
453453
* [5] [5] [5] [5] [5] [5]
454454
*/
455455
int
456-
ompi_coll_base_allgather_intra_neighborexchange(const void *sbuf, int scount,
456+
ompi_coll_base_allgather_intra_neighborexchange(const void *sbuf, size_t scount,
457457
struct ompi_datatype_t *sdtype,
458-
void* rbuf, int rcount,
458+
void* rbuf, size_t rcount,
459459
struct ompi_datatype_t *rdtype,
460460
struct ompi_communicator_t *comm,
461461
mca_coll_base_module_t *module)
@@ -567,9 +567,9 @@ ompi_coll_base_allgather_intra_neighborexchange(const void *sbuf, int scount,
567567
}
568568

569569

570-
int ompi_coll_base_allgather_intra_two_procs(const void *sbuf, int scount,
570+
int ompi_coll_base_allgather_intra_two_procs(const void *sbuf, size_t scount,
571571
struct ompi_datatype_t *sdtype,
572-
void* rbuf, int rcount,
572+
void* rbuf, size_t rcount,
573573
struct ompi_datatype_t *rdtype,
574574
struct ompi_communicator_t *comm,
575575
mca_coll_base_module_t *module)
@@ -650,10 +650,10 @@ int ompi_coll_base_allgather_intra_two_procs(const void *sbuf, int scount,
650650
* Returns: - MPI_SUCCESS or error code
651651
*/
652652
int
653-
ompi_coll_base_allgather_intra_basic_linear(const void *sbuf, int scount,
653+
ompi_coll_base_allgather_intra_basic_linear(const void *sbuf, size_t scount,
654654
struct ompi_datatype_t *sdtype,
655655
void *rbuf,
656-
int rcount,
656+
size_t rcount,
657657
struct ompi_datatype_t *rdtype,
658658
struct ompi_communicator_t *comm,
659659
mca_coll_base_module_t *module)
@@ -764,9 +764,9 @@ ompi_coll_base_allgather_intra_basic_linear(const void *sbuf, int scount,
764764
* [8] [8] [8] [8] [8] [8] [8] [8] [8] [8]
765765
* [9] [9] [9] [9] [9] [9] [9] [9] [9] [9]
766766
*/
767-
int ompi_coll_base_allgather_intra_k_bruck(const void *sbuf, int scount,
767+
int ompi_coll_base_allgather_intra_k_bruck(const void *sbuf, size_t scount,
768768
struct ompi_datatype_t *sdtype,
769-
void* rbuf, int rcount,
769+
void* rbuf, size_t rcount,
770770
struct ompi_datatype_t *rdtype,
771771
struct ompi_communicator_t *comm,
772772
mca_coll_base_module_t *module,
@@ -927,9 +927,9 @@ int ompi_coll_base_allgather_intra_k_bruck(const void *sbuf, int scount,
927927
* Caution is needed on larger communicators(n) and data sizes(m), which will
928928
* result in m*n^2 total traffic and potential network congestion.
929929
*/
930-
int ompi_coll_base_allgather_direct_messaging(const void *sbuf, int scount,
930+
int ompi_coll_base_allgather_direct_messaging(const void *sbuf, size_t scount,
931931
struct ompi_datatype_t *sdtype,
932-
void* rbuf, int rcount,
932+
void* rbuf, size_t rcount,
933933
struct ompi_datatype_t *rdtype,
934934
struct ompi_communicator_t *comm,
935935
mca_coll_base_module_t *module)

0 commit comments

Comments
 (0)