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
support MPI_Op_commutative call, as it was already implemented internally
[simgrid.git]
/
teshsuite
/
smpi
/
mpich3-test
/
coll
/
red_scat_block.c
diff --git
a/teshsuite/smpi/mpich3-test/coll/red_scat_block.c
b/teshsuite/smpi/mpich3-test/coll/red_scat_block.c
index
7891cb6
..
2884708
100644
(file)
--- a/
teshsuite/smpi/mpich3-test/coll/red_scat_block.c
+++ b/
teshsuite/smpi/mpich3-test/coll/red_scat_block.c
@@
-20,12
+20,9
@@
int main(int argc, char **argv)
{
int err = 0;
int main(int argc, char **argv)
{
int err = 0;
- int toterr, size, rank;
-#if MTEST_HAVE_MIN_MPI_VERSION(2,2)
- int i, sumval;
+ int toterr, size, rank, i, sumval;
int *sendbuf;
int *recvbuf;
int *sendbuf;
int *recvbuf;
-#endif
MPI_Comm comm;
MPI_Init(&argc, &argv);
MPI_Comm comm;
MPI_Init(&argc, &argv);
@@
-43,12
+40,12
@@
int main(int argc, char **argv)
fprintf(stderr, "unable to allocate send/recv buffers, aborting");
MPI_Abort(MPI_COMM_WORLD, 1);
}
fprintf(stderr, "unable to allocate send/recv buffers, aborting");
MPI_Abort(MPI_COMM_WORLD, 1);
}
- for (i
=0; i<
size; i++)
+ for (i
= 0; i <
size; i++)
sendbuf[i] = rank + i;
MPI_Reduce_scatter_block(sendbuf, recvbuf, 1, MPI_INT, MPI_SUM, comm);
sendbuf[i] = rank + i;
MPI_Reduce_scatter_block(sendbuf, recvbuf, 1, MPI_INT, MPI_SUM, comm);
- sumval = size * rank + ((size - 1) * size)
/
2;
+ sumval = size * rank + ((size - 1) * size)
/
2;
if (recvbuf[0] != sumval) {
err++;
fprintf(stdout, "Did not get expected value for reduce scatter block\n");
if (recvbuf[0] != sumval) {
err++;
fprintf(stdout, "Did not get expected value for reduce scatter block\n");
@@
-58,12
+55,12
@@
int main(int argc, char **argv)
free(sendbuf);
/* let's try it again with MPI_IN_PLACE this time */
free(sendbuf);
/* let's try it again with MPI_IN_PLACE this time */
- for (i
=0; i<
size; i++)
+ for (i
= 0; i <
size; i++)
recvbuf[i] = rank + i;
MPI_Reduce_scatter_block(MPI_IN_PLACE, recvbuf, 1, MPI_INT, MPI_SUM, comm);
recvbuf[i] = rank + i;
MPI_Reduce_scatter_block(MPI_IN_PLACE, recvbuf, 1, MPI_INT, MPI_SUM, comm);
- sumval = size * rank + ((size - 1) * size)
/
2;
+ sumval = size * rank + ((size - 1) * size)
/
2;
if (recvbuf[0] != sumval) {
err++;
fprintf(stdout, "Did not get expected value for reduce scatter block\n");
if (recvbuf[0] != sumval) {
err++;
fprintf(stdout, "Did not get expected value for reduce scatter block\n");