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
optimize MPI_Sendrecv if a process has to exchange with himself only
[simgrid.git]
/
src
/
smpi
/
smpi_pmpi.c
diff --git
a/src/smpi/smpi_pmpi.c
b/src/smpi/smpi_pmpi.c
index
32fb308
..
5bd1361
100644
(file)
--- a/
src/smpi/smpi_pmpi.c
+++ b/
src/smpi/smpi_pmpi.c
@@
-986,7
+986,7
@@
int PMPI_Isend(void *buf, int count, MPI_Datatype datatype, int dst,
*request = MPI_REQUEST_NULL;
retval = MPI_SUCCESS;
} else if (dst >= smpi_group_size(smpi_comm_group(comm)) || dst <0){
*request = MPI_REQUEST_NULL;
retval = MPI_SUCCESS;
} else if (dst >= smpi_group_size(smpi_comm_group(comm)) || dst <0){
- retval = MPI_ERR_
COMM
;
+ retval = MPI_ERR_
RANK
;
} else if (count < 0) {
retval = MPI_ERR_COUNT;
} else if (buf==NULL && count > 0) {
} else if (count < 0) {
retval = MPI_ERR_COUNT;
} else if (buf==NULL && count > 0) {
@@
-1031,7
+1031,7
@@
int PMPI_Issend(void* buf, int count, MPI_Datatype datatype, int dst, int tag, M
*request = MPI_REQUEST_NULL;
retval = MPI_SUCCESS;
} else if (dst >= smpi_group_size(smpi_comm_group(comm)) || dst <0){
*request = MPI_REQUEST_NULL;
retval = MPI_SUCCESS;
} else if (dst >= smpi_group_size(smpi_comm_group(comm)) || dst <0){
- retval = MPI_ERR_
COMM
;
+ retval = MPI_ERR_
RANK
;
} else if (count < 0) {
retval = MPI_ERR_COUNT;
} else if (buf==NULL && count > 0) {
} else if (count < 0) {
retval = MPI_ERR_COUNT;
} else if (buf==NULL && count > 0) {
@@
-1077,7
+1077,7
@@
int PMPI_Recv(void *buf, int count, MPI_Datatype datatype, int src, int tag,
status->MPI_SOURCE = MPI_PROC_NULL;
retval = MPI_SUCCESS;
} else if (src!=MPI_ANY_SOURCE && (src >= smpi_group_size(smpi_comm_group(comm)) || src <0)){
status->MPI_SOURCE = MPI_PROC_NULL;
retval = MPI_SUCCESS;
} else if (src!=MPI_ANY_SOURCE && (src >= smpi_group_size(smpi_comm_group(comm)) || src <0)){
- retval = MPI_ERR_
COMM
;
+ retval = MPI_ERR_
RANK
;
} else if (count < 0) {
retval = MPI_ERR_COUNT;
} else if (buf==NULL && count > 0) {
} else if (count < 0) {
retval = MPI_ERR_COUNT;
} else if (buf==NULL && count > 0) {
@@
-1123,7
+1123,7
@@
int PMPI_Send(void *buf, int count, MPI_Datatype datatype, int dst, int tag,
} else if (dst == MPI_PROC_NULL) {
retval = MPI_SUCCESS;
} else if (dst >= smpi_group_size(smpi_comm_group(comm)) || dst <0){
} else if (dst == MPI_PROC_NULL) {
retval = MPI_SUCCESS;
} else if (dst >= smpi_group_size(smpi_comm_group(comm)) || dst <0){
- retval = MPI_ERR_
COMM
;
+ retval = MPI_ERR_
RANK
;
} else if (count < 0) {
retval = MPI_ERR_COUNT;
} else if (buf==NULL && count > 0) {
} else if (count < 0) {
retval = MPI_ERR_COUNT;
} else if (buf==NULL && count > 0) {
@@
-1167,7
+1167,7
@@
int PMPI_Ssend(void* buf, int count, MPI_Datatype datatype, int dst, int tag, MP
} else if (dst == MPI_PROC_NULL) {
retval = MPI_SUCCESS;
} else if (dst >= smpi_group_size(smpi_comm_group(comm)) || dst <0){
} else if (dst == MPI_PROC_NULL) {
retval = MPI_SUCCESS;
} else if (dst >= smpi_group_size(smpi_comm_group(comm)) || dst <0){
- retval = MPI_ERR_
COMM
;
+ retval = MPI_ERR_
RANK
;
} else if (count < 0) {
retval = MPI_ERR_COUNT;
} else if (buf==NULL && count > 0) {
} else if (count < 0) {
retval = MPI_ERR_COUNT;
} else if (buf==NULL && count > 0) {
@@
-1219,7
+1219,7
@@
int PMPI_Sendrecv(void *sendbuf, int sendcount, MPI_Datatype sendtype,
retval = MPI_SUCCESS;
}else if (dst >= smpi_group_size(smpi_comm_group(comm)) || dst <0 ||
(src!=MPI_ANY_SOURCE && (src >= smpi_group_size(smpi_comm_group(comm)) || src <0))){
retval = MPI_SUCCESS;
}else if (dst >= smpi_group_size(smpi_comm_group(comm)) || dst <0 ||
(src!=MPI_ANY_SOURCE && (src >= smpi_group_size(smpi_comm_group(comm)) || src <0))){
- retval = MPI_ERR_
COMM
;
+ retval = MPI_ERR_
RANK
;
} else if (sendcount < 0 || recvcount<0) {
retval = MPI_ERR_COUNT;
} else if ((sendbuf==NULL && sendcount > 0)||(recvbuf==NULL && recvcount>0)) {
} else if (sendcount < 0 || recvcount<0) {
retval = MPI_ERR_COUNT;
} else if ((sendbuf==NULL && sendcount > 0)||(recvbuf==NULL && recvcount>0)) {
@@
-1579,7
+1579,7
@@
int PMPI_Barrier(MPI_Comm comm)
if (comm == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
} else {
if (comm == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
} else {
-
smpi_mpi_barrier
(comm);
+
mpi_coll_barrier_fun
(comm);
retval = MPI_SUCCESS;
}
#ifdef HAVE_TRACING
retval = MPI_SUCCESS;
}
#ifdef HAVE_TRACING
@@
-1870,9
+1870,9
@@
int PMPI_Reduce_scatter(void *sendbuf, void *recvbuf, int *recvcounts,
MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
{
int retval;
MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
{
int retval;
- int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
smpi_bench_end();
#ifdef HAVE_TRACING
smpi_bench_end();
#ifdef HAVE_TRACING
+ int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
TRACE_smpi_computing_out(rank);
TRACE_smpi_collective_in(rank, -1, __FUNCTION__);
#endif
TRACE_smpi_computing_out(rank);
TRACE_smpi_collective_in(rank, -1, __FUNCTION__);
#endif