A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove MPI_COMM_WORLD references from star-mpi collectives
[simgrid.git]
/
src
/
smpi
/
colls
/
allreduce-NTS.c
diff --git
a/src/smpi/colls/allreduce-NTS.c
b/src/smpi/colls/allreduce-NTS.c
index
c7e145d
..
85c790b
100644
(file)
--- a/
src/smpi/colls/allreduce-NTS.c
+++ b/
src/smpi/colls/allreduce-NTS.c
@@
-14,14
+14,14
@@
int
smpi_coll_tuned_allreduce_NTS(void *sbuf, void *rbuf, int rcount,
MPI_Datatype dtype, MPI_Op op, MPI_Comm comm)
{
smpi_coll_tuned_allreduce_NTS(void *sbuf, void *rbuf, int rcount,
MPI_Datatype dtype, MPI_Op op, MPI_Comm comm)
{
- int tag =
5000
;
+ int tag =
COLL_TAG_ALLREDUCE
;
MPI_Status status;
int rank, i, size, count;
int send_offset, recv_offset;
int remainder, remainder_flag, remainder_offset;
MPI_Status status;
int rank, i, size, count;
int send_offset, recv_offset;
int remainder, remainder_flag, remainder_offset;
- rank = smpi_comm_rank(
MPI_COMM_WORLD
);
- size = smpi_comm_size(
MPI_COMM_WORLD
);
+ rank = smpi_comm_rank(
comm
);
+ size = smpi_comm_size(
comm
);
/* make it compatible with all data type */
MPI_Aint extent;
/* make it compatible with all data type */
MPI_Aint extent;
@@
-34,12
+34,12
@@
smpi_coll_tuned_allreduce_NTS(void *sbuf, void *rbuf, int rcount,
/* when communication size is not divisible by number of process:
call the native implementation for the remain chunk at the end of the operation */
/* when communication size is not divisible by number of process:
call the native implementation for the remain chunk at the end of the operation */
-
else
if (rcount % size != 0) {
+ if (rcount % size != 0) {
remainder = rcount % size;
remainder_flag = 1;
remainder_offset = (rcount / size) * size * extent;
} else {
remainder = rcount % size;
remainder_flag = 1;
remainder_offset = (rcount / size) * size * extent;
} else {
- remainder_flag = remainder_offset = 0;
+ remainder
= remainder
_flag = remainder_offset = 0;
}
/* size of each point-to-point communication is equal to the size of the whole message
}
/* size of each point-to-point communication is equal to the size of the whole message
@@
-69,7
+69,7
@@
smpi_coll_tuned_allreduce_NTS(void *sbuf, void *rbuf, int rcount,
((rank + size - 1) % size), tag + i, comm, &status);
// compute result to rbuf+recv_offset
((rank + size - 1) % size), tag + i, comm, &status);
// compute result to rbuf+recv_offset
- s
tar_reduction
(op, (char *)sbuf + recv_offset, (char *)rbuf + recv_offset, &count, &dtype);
+ s
mpi_op_apply
(op, (char *)sbuf + recv_offset, (char *)rbuf + recv_offset, &count, &dtype);
}
// all-gather
}
// all-gather