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
openmpi recently changed its decision for alltoallv algo
[simgrid.git]
/
src
/
smpi
/
colls
/
alltoall-rdb.c
diff --git
a/src/smpi/colls/alltoall-rdb.c
b/src/smpi/colls/alltoall-rdb.c
index
edee61a
..
45b529f
100644
(file)
--- a/
src/smpi/colls/alltoall-rdb.c
+++ b/
src/smpi/colls/alltoall-rdb.c
@@
-1,4
+1,4
@@
-#include "colls.h"
+#include "colls
_private
.h"
/*****************************************************************************
/*****************************************************************************
@@
-32,18
+32,18
@@
int smpi_coll_tuned_alltoall_rdb(void *send_buff, int send_count,
int dst_tree_root, rank_tree_root, send_offset, recv_offset;
int rank, num_procs, j, k, dst, curr_size, max_size;
int dst_tree_root, rank_tree_root, send_offset, recv_offset;
int rank, num_procs, j, k, dst, curr_size, max_size;
- int last_recv_count, tmp_mask, tree_root, num_procs_completed;
+ int last_recv_count
= 0
, tmp_mask, tree_root, num_procs_completed;
int tag = 1, mask = 1, i = 0;
char *tmp_buff;
char *send_ptr = (char *) send_buff;
char *recv_ptr = (char *) recv_buff;
int tag = 1, mask = 1, i = 0;
char *tmp_buff;
char *send_ptr = (char *) send_buff;
char *recv_ptr = (char *) recv_buff;
-
MPI_Comm_size(comm, &num_procs
);
-
MPI_Comm_rank(comm, &rank
);
-
MPI_Type_extent(send_type, &send_increment
);
-
MPI_Type_extent(recv_type, &recv_increment
);
-
MPI_Type_extent(recv_type, &extent
);
+
num_procs = smpi_comm_size(comm
);
+
rank = smpi_comm_rank(comm
);
+
send_increment = smpi_datatype_get_extent(send_type
);
+
recv_increment = smpi_datatype_get_extent(recv_type
);
+
extent = smpi_datatype_get_extent(recv_type
);
send_increment *= (send_count * num_procs);
recv_increment *= (recv_count * num_procs);
send_increment *= (send_count * num_procs);
recv_increment *= (recv_count * num_procs);
@@
-54,7
+54,7
@@
int smpi_coll_tuned_alltoall_rdb(void *send_buff, int send_count,
curr_size = send_count * num_procs;
curr_size = send_count * num_procs;
-
MPI_S
endrecv(send_ptr, curr_size, send_type, rank, tag,
+
smpi_mpi_s
endrecv(send_ptr, curr_size, send_type, rank, tag,
tmp_buff + (rank * recv_increment),
curr_size, recv_type, rank, tag, comm, &status);
tmp_buff + (rank * recv_increment),
curr_size, recv_type, rank, tag, comm, &status);
@@
-68,11
+68,11
@@
int smpi_coll_tuned_alltoall_rdb(void *send_buff, int send_count,
recv_offset = dst_tree_root * recv_increment;
if (dst < num_procs) {
recv_offset = dst_tree_root * recv_increment;
if (dst < num_procs) {
-
MPI_S
endrecv(tmp_buff + send_offset, curr_size, send_type, dst, tag,
+
smpi_mpi_s
endrecv(tmp_buff + send_offset, curr_size, send_type, dst, tag,
tmp_buff + recv_offset, mask * recv_count * num_procs,
recv_type, dst, tag, comm, &status);
tmp_buff + recv_offset, mask * recv_count * num_procs,
recv_type, dst, tag, comm, &status);
-
MPI_Get_count(&status, recv_type, &last_recv_count
);
+
last_recv_count = smpi_mpi_get_count(&status, recv_type
);
curr_size += last_recv_count;
}
curr_size += last_recv_count;
}
@@
-110,7
+110,7
@@
int smpi_coll_tuned_alltoall_rdb(void *send_buff, int send_count,
if ((dst > rank)
&& (rank < tree_root + num_procs_completed)
&& (dst >= tree_root + num_procs_completed)) {
if ((dst > rank)
&& (rank < tree_root + num_procs_completed)
&& (dst >= tree_root + num_procs_completed)) {
-
MPI_S
end(tmp_buff + dst_tree_root * send_increment,
+
smpi_mpi_s
end(tmp_buff + dst_tree_root * send_increment,
last_recv_count, send_type, dst, tag, comm);
}
last_recv_count, send_type, dst, tag, comm);
}
@@
-121,11
+121,11
@@
int smpi_coll_tuned_alltoall_rdb(void *send_buff, int send_count,
else if ((dst < rank)
&& (dst < tree_root + num_procs_completed)
&& (rank >= tree_root + num_procs_completed)) {
else if ((dst < rank)
&& (dst < tree_root + num_procs_completed)
&& (rank >= tree_root + num_procs_completed)) {
-
MPI_R
ecv(tmp_buff + dst_tree_root * send_increment,
+
smpi_mpi_r
ecv(tmp_buff + dst_tree_root * send_increment,
mask * num_procs * send_count, send_type, dst,
tag, comm, &status);
mask * num_procs * send_count, send_type, dst,
tag, comm, &status);
-
MPI_Get_count(&status, send_type, &last_recv_count
);
+
last_recv_count = smpi_mpi_get_count(&status, send_type
);
curr_size += last_recv_count;
}
curr_size += last_recv_count;
}
@@
-139,7
+139,7
@@
int smpi_coll_tuned_alltoall_rdb(void *send_buff, int send_count,
}
for (i = 0; i < num_procs; i++)
}
for (i = 0; i < num_procs; i++)
-
MPI_S
endrecv(tmp_buff + (rank + i * num_procs) * send_count * extent,
+
smpi_mpi_s
endrecv(tmp_buff + (rank + i * num_procs) * send_count * extent,
send_count, send_type, rank, tag,
recv_ptr + (i * recv_count * extent),
recv_count, recv_type, rank, tag, comm, &status);
send_count, send_type, rank, tag,
recv_ptr + (i * recv_count * extent),
recv_count, recv_type, rank, tag, comm, &status);