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
Merge branch 'master' of https://framagit.org/simgrid/simgrid
[simgrid.git]
/
teshsuite
/
smpi
/
mpich3-test
/
datatype
/
sendrecvt4.c
diff --git
a/teshsuite/smpi/mpich3-test/datatype/sendrecvt4.c
b/teshsuite/smpi/mpich3-test/datatype/sendrecvt4.c
index bd3338dc1f9ba4b2e9fe12dfaf35f46ad1794e2a..9b9562addc9ba76bd97d2e5305f29ee5313ad202 100644
(file)
--- a/
teshsuite/smpi/mpich3-test/datatype/sendrecvt4.c
+++ b/
teshsuite/smpi/mpich3-test/datatype/sendrecvt4.c
@@
-75,8
+75,11
@@
int main(int argc, char **argv)
continue;
}
partner = np - 1;
continue;
}
partner = np - 1;
- MPI_Send(MPI_BOTTOM, counts[j], offsettype, partner, tag, comm);
+ MPI_Datatype dup;
+ MPI_Type_dup(offsettype, &dup);
+ MPI_Send(MPI_BOTTOM, counts[j], dup, partner, tag, comm);
MPI_Type_free(&offsettype);
MPI_Type_free(&offsettype);
+ MPI_Type_free(&dup);
}
else if (rank == np - 1) {
partner = 0;
}
else if (rank == np - 1) {
partner = 0;
@@
-101,7
+104,9
@@
int main(int argc, char **argv)
MPI_Type_free(&offsettype);
continue;
}
MPI_Type_free(&offsettype);
continue;
}
- MPI_Recv(MPI_BOTTOM, counts[j], offsettype, partner, tag, comm, &status);
+ MPI_Datatype dup;
+ MPI_Type_dup(offsettype, &dup);
+ MPI_Recv(MPI_BOTTOM, counts[j], dup, partner, tag, comm, &status);
/* Test for correctness */
MPI_Get_count(&status, types[j], &count);
if (count != counts[j]) {
/* Test for correctness */
MPI_Get_count(&status, types[j], &count);
if (count != counts[j]) {
@@
-136,6
+141,7
@@
int main(int argc, char **argv)
err++;
}
MPI_Type_free(&offsettype);
err++;
}
MPI_Type_free(&offsettype);
+ MPI_Type_free(&dup);
}
}
MTestFreeComm(&comm);
}
}
MTestFreeComm(&comm);