16
16
* Author(s): Torsten Hoefler <htor@cs.indiana.edu>
17
17
*
18
18
* Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
19
- * Copyright (c) 2016 IBM Corporation. All rights reserved.
19
+ * Copyright (c) 2016-2021 IBM Corporation. All rights reserved.
20
20
* Copyright (c) 2017 Ian Bradley Morgan and Anthony Skjellum. All
21
21
* rights reserved.
22
22
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
@@ -117,7 +117,7 @@ static int nbc_schedule_round_append (NBC_Schedule *schedule, void *data, int da
117
117
}
118
118
119
119
/* this function puts a send into the schedule */
120
- static int NBC_Sched_send_internal (const void * buf , char tmpbuf , int count , MPI_Datatype datatype , int dest , bool local , NBC_Schedule * schedule , bool barrier ) {
120
+ static int NBC_Sched_send_internal (const void * buf , char tmpbuf , size_t count , MPI_Datatype datatype , int dest , bool local , NBC_Schedule * schedule , bool barrier ) {
121
121
NBC_Args_send send_args ;
122
122
int ret ;
123
123
@@ -141,16 +141,16 @@ static int NBC_Sched_send_internal (const void* buf, char tmpbuf, int count, MPI
141
141
return OMPI_SUCCESS ;
142
142
}
143
143
144
- int NBC_Sched_send (const void * buf , char tmpbuf , int count , MPI_Datatype datatype , int dest , NBC_Schedule * schedule , bool barrier ) {
144
+ int NBC_Sched_send (const void * buf , char tmpbuf , size_t count , MPI_Datatype datatype , int dest , NBC_Schedule * schedule , bool barrier ) {
145
145
return NBC_Sched_send_internal (buf , tmpbuf , count , datatype , dest , false, schedule , barrier );
146
146
}
147
147
148
- int NBC_Sched_local_send (const void * buf , char tmpbuf , int count , MPI_Datatype datatype , int dest , NBC_Schedule * schedule , bool barrier ) {
148
+ int NBC_Sched_local_send (const void * buf , char tmpbuf , size_t count , MPI_Datatype datatype , int dest , NBC_Schedule * schedule , bool barrier ) {
149
149
return NBC_Sched_send_internal (buf , tmpbuf , count , datatype , dest , true, schedule , barrier );
150
150
}
151
151
152
152
/* this function puts a receive into the schedule */
153
- static int NBC_Sched_recv_internal (void * buf , char tmpbuf , int count , MPI_Datatype datatype , int source , bool local , NBC_Schedule * schedule , bool barrier ) {
153
+ static int NBC_Sched_recv_internal (void * buf , char tmpbuf , size_t count , MPI_Datatype datatype , int source , bool local , NBC_Schedule * schedule , bool barrier ) {
154
154
NBC_Args_recv recv_args ;
155
155
int ret ;
156
156
@@ -174,16 +174,16 @@ static int NBC_Sched_recv_internal (void* buf, char tmpbuf, int count, MPI_Datat
174
174
return OMPI_SUCCESS ;
175
175
}
176
176
177
- int NBC_Sched_recv (void * buf , char tmpbuf , int count , MPI_Datatype datatype , int source , NBC_Schedule * schedule , bool barrier ) {
177
+ int NBC_Sched_recv (void * buf , char tmpbuf , size_t count , MPI_Datatype datatype , int source , NBC_Schedule * schedule , bool barrier ) {
178
178
return NBC_Sched_recv_internal (buf , tmpbuf , count , datatype , source , false, schedule , barrier );
179
179
}
180
180
181
- int NBC_Sched_local_recv (void * buf , char tmpbuf , int count , MPI_Datatype datatype , int source , NBC_Schedule * schedule , bool barrier ) {
181
+ int NBC_Sched_local_recv (void * buf , char tmpbuf , size_t count , MPI_Datatype datatype , int source , NBC_Schedule * schedule , bool barrier ) {
182
182
return NBC_Sched_recv_internal (buf , tmpbuf , count , datatype , source , true, schedule , barrier );
183
183
}
184
184
185
185
/* this function puts an operation into the schedule */
186
- int NBC_Sched_op (const void * buf1 , char tmpbuf1 , void * buf2 , char tmpbuf2 , int count , MPI_Datatype datatype ,
186
+ int NBC_Sched_op (const void * buf1 , char tmpbuf1 , void * buf2 , char tmpbuf2 , size_t count , MPI_Datatype datatype ,
187
187
MPI_Op op , NBC_Schedule * schedule , bool barrier ) {
188
188
NBC_Args_op op_args ;
189
189
int ret ;
@@ -210,7 +210,8 @@ int NBC_Sched_op (const void* buf1, char tmpbuf1, void* buf2, char tmpbuf2, int
210
210
}
211
211
212
212
/* this function puts a copy into the schedule */
213
- int NBC_Sched_copy (void * src , char tmpsrc , int srccount , MPI_Datatype srctype , void * tgt , char tmptgt , int tgtcount ,
213
+ int NBC_Sched_copy (void * src , char tmpsrc , size_t srccount , MPI_Datatype srctype ,
214
+ void * tgt , char tmptgt , size_t tgtcount ,
214
215
MPI_Datatype tgttype , NBC_Schedule * schedule , bool barrier ) {
215
216
NBC_Args_copy copy_args ;
216
217
int ret ;
@@ -238,7 +239,7 @@ int NBC_Sched_copy (void *src, char tmpsrc, int srccount, MPI_Datatype srctype,
238
239
}
239
240
240
241
/* this function puts a unpack into the schedule */
241
- int NBC_Sched_unpack (void * inbuf , char tmpinbuf , int count , MPI_Datatype datatype , void * outbuf , char tmpoutbuf ,
242
+ int NBC_Sched_unpack (void * inbuf , char tmpinbuf , size_t count , MPI_Datatype datatype , void * outbuf , char tmpoutbuf ,
242
243
NBC_Schedule * schedule , bool barrier ) {
243
244
NBC_Args_unpack unpack_args ;
244
245
int ret ;
@@ -520,6 +521,7 @@ static inline int NBC_Start_round(NBC_Handle *handle) {
520
521
} else {
521
522
buf2 = opargs .buf2 ;
522
523
}
524
+
523
525
ompi_op_reduce (opargs .op , buf1 , buf2 , opargs .count , opargs .datatype );
524
526
break ;
525
527
case COPY :
0 commit comments