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
add scatter algos from ompi
[simgrid.git]
/
src
/
smpi
/
colls
/
smpi_openmpi_selector.c
diff --git
a/src/smpi/colls/smpi_openmpi_selector.c
b/src/smpi/colls/smpi_openmpi_selector.c
index
72c3699
..
f5a23c4
100644
(file)
--- a/
src/smpi/colls/smpi_openmpi_selector.c
+++ b/
src/smpi/colls/smpi_openmpi_selector.c
@@
-324,11
+324,11
@@
int smpi_coll_tuned_reduce_ompi( void *sendbuf, void *recvbuf,
#endif /* 0 */
}
#endif /* 0 */
}
-
/*
int smpi_coll_tuned_reduce_scatter_ompi( void *sbuf, void *rbuf,
+int smpi_coll_tuned_reduce_scatter_ompi( void *sbuf, void *rbuf,
int *rcounts,
MPI_Datatype dtype,
MPI_Op op,
int *rcounts,
MPI_Datatype dtype,
MPI_Op op,
- MPI_Comm comm
,
+ MPI_Comm comm
)
{
int comm_size, i, pow2;
)
{
int comm_size, i, pow2;
@@
-337,25
+337,26
@@
int smpi_coll_tuned_reduce_ompi( void *sendbuf, void *recvbuf,
const double b = 8.0;
const size_t small_message_size = 12 * 1024;
const size_t large_message_size = 256 * 1024;
const double b = 8.0;
const size_t small_message_size = 12 * 1024;
const size_t large_message_size = 256 * 1024;
- bool zerocounts = false;
-
- OPAL_OUTPUT((smpi_coll_tuned_stream, "smpi_coll_tuned_reduce_scatter_ompi"));
+ int zerocounts = 0;
+ XBT_DEBUG("smpi_coll_tuned_reduce_scatter_ompi");
+
comm_size = smpi_comm_size(comm);
// We need data size for decision function
comm_size = smpi_comm_size(comm);
// We need data size for decision function
-
ompi_datatype_type_size(dtype, &dsiz
e);
+
dsize=smpi_datatype_size(dtyp
e);
total_message_size = 0;
for (i = 0; i < comm_size; i++) {
total_message_size += rcounts[i];
if (0 == rcounts[i]) {
total_message_size = 0;
for (i = 0; i < comm_size; i++) {
total_message_size += rcounts[i];
if (0 == rcounts[i]) {
- zerocounts =
true
;
+ zerocounts =
1
;
}
}
}
}
- if( !
o
mpi_op_is_commute(op) || (zerocounts)) {
-
return smpi_coll_tuned_reduce_scatter_intra_nonoverlapping
(sbuf, rbuf, rcounts,
+ if( !
s
mpi_op_is_commute(op) || (zerocounts)) {
+
smpi_mpi_reduce_scatter
(sbuf, rbuf, rcounts,
dtype, op,
dtype, op,
- comm, module);
+ comm);
+ return MPI_SUCCESS;
}
total_message_size *= dsize;
}
total_message_size *= dsize;
@@
-367,20
+368,17
@@
int smpi_coll_tuned_reduce_ompi( void *sendbuf, void *recvbuf,
((total_message_size <= large_message_size) && (pow2 == comm_size)) ||
(comm_size >= a * total_message_size + b)) {
return
((total_message_size <= large_message_size) && (pow2 == comm_size)) ||
(comm_size >= a * total_message_size + b)) {
return
- smpi_coll_tuned_reduce_scatter_
intra
_basic_recursivehalving(sbuf, rbuf, rcounts,
+ smpi_coll_tuned_reduce_scatter_
ompi
_basic_recursivehalving(sbuf, rbuf, rcounts,
dtype, op,
dtype, op,
- comm
, module
);
+ comm);
}
}
- return smpi_coll_tuned_reduce_scatter_
intra
_ring(sbuf, rbuf, rcounts,
+ return smpi_coll_tuned_reduce_scatter_
ompi
_ring(sbuf, rbuf, rcounts,
dtype, op,
dtype, op,
- comm
, module
);
+ comm);
-
- return smpi_coll_tuned_reduce_scatter(sbuf, rbuf, rcounts,
- dtype, op,
- comm;
-}*/
+
+}
int smpi_coll_tuned_allgather_ompi(void *sbuf, int scount,
MPI_Datatype sdtype,
int smpi_coll_tuned_allgather_ompi(void *sbuf, int scount,
MPI_Datatype sdtype,
@@
-570,12
+568,12
@@
int smpi_coll_tuned_gather_ompi(void *sbuf, int scount,
rbuf, rcount, rdtype,
root, comm);
}
rbuf, rcount, rdtype,
root, comm);
}
-/*
+
int smpi_coll_tuned_scatter_ompi(void *sbuf, int scount,
MPI_Datatype sdtype,
void* rbuf, int rcount,
MPI_Datatype rdtype,
int smpi_coll_tuned_scatter_ompi(void *sbuf, int scount,
MPI_Datatype sdtype,
void* rbuf, int rcount,
MPI_Datatype rdtype,
- int root, MPI_Comm comm
,
+ int root, MPI_Comm comm
)
{
const size_t small_block_size = 300;
)
{
const size_t small_block_size = 300;
@@
-583,28
+581,27
@@
int smpi_coll_tuned_scatter_ompi(void *sbuf, int scount,
int communicator_size, rank;
size_t dsize, block_size;
int communicator_size, rank;
size_t dsize, block_size;
- OPAL_OUTPUT((smpi_coll_tuned_stream,
- "smpi_coll_tuned_scatter_ompi"));
+ XBT_DEBUG("smpi_coll_tuned_scatter_ompi");
communicator_size = smpi_comm_size(comm);
communicator_size = smpi_comm_size(comm);
- rank =
o
mpi_comm_rank(comm);
+ rank =
s
mpi_comm_rank(comm);
// Determine block size
if (root == rank) {
// Determine block size
if (root == rank) {
-
ompi_datatype_type_size(sdtype, &dsiz
e);
+
dsize=smpi_datatype_size(sdtyp
e);
block_size = dsize * scount;
} else {
block_size = dsize * scount;
} else {
-
ompi_datatype_type_size(rdtype, &dsiz
e);
+
dsize=smpi_datatype_size(rdtyp
e);
block_size = dsize * rcount;
}
if ((communicator_size > small_comm_size) &&
(block_size < small_block_size)) {
block_size = dsize * rcount;
}
if ((communicator_size > small_comm_size) &&
(block_size < small_block_size)) {
- return smpi_coll_tuned_scatter_
intra
_binomial (sbuf, scount, sdtype,
+ return smpi_coll_tuned_scatter_
ompi
_binomial (sbuf, scount, sdtype,
rbuf, rcount, rdtype,
rbuf, rcount, rdtype,
- root, comm
, module
);
+ root, comm);
}
}
- return smpi_coll_tuned_scatter_
intra
_basic_linear (sbuf, scount, sdtype,
+ return smpi_coll_tuned_scatter_
ompi
_basic_linear (sbuf, scount, sdtype,
rbuf, rcount, rdtype,
rbuf, rcount, rdtype,
- root, comm
, module
);
-}
*/
+ root, comm);
+}