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
protect (hopefully) collective communication algorithms from abuse.
[simgrid.git]
/
src
/
smpi
/
colls
/
allreduce-rab1.c
diff --git
a/src/smpi/colls/allreduce-rab1.c
b/src/smpi/colls/allreduce-rab1.c
index
ae72f74
..
e863339
100644
(file)
--- a/
src/smpi/colls/allreduce-rab1.c
+++ b/
src/smpi/colls/allreduce-rab1.c
@@
-8,7
+8,7
@@
int smpi_coll_tuned_allreduce_rab1(void *sbuff, void *rbuff,
{
MPI_Status status;
MPI_Aint extent;
- int tag =
4321
, rank, nprocs, send_size, newcnt, share;
+ int tag =
COLL_TAG_ALLREDUCE
, rank, nprocs, send_size, newcnt, share;
int pof2 = 1, mask, send_idx, recv_idx, dst, send_cnt, recv_cnt;
void *recv, *tmp_buf;
@@
-16,6
+16,9
@@
int smpi_coll_tuned_allreduce_rab1(void *sbuff, void *rbuff,
rank = smpi_comm_rank(comm);
nprocs = smpi_comm_size(comm);
+ if((nprocs&(nprocs-1)))
+ THROWF(arg_error,0, "allreduce rab1 algorithm can't be used with non power of two number of processes ! ");
+
extent = smpi_datatype_get_extent(dtype);
pof2 = 1;