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
Improve error message.
[simgrid.git]
/
teshsuite
/
smpi
/
scatter.c
diff --git
a/teshsuite/smpi/scatter.c
b/teshsuite/smpi/scatter.c
index
e4a6303
..
fda82e1
100644
(file)
--- a/
teshsuite/smpi/scatter.c
+++ b/
teshsuite/smpi/scatter.c
@@
-1,3
+1,9
@@
+/* Copyright (c) 2012-2014. The SimGrid Team.
+ * All rights reserved. */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
/**
* MESSAGE PASSING INTERFACE TEST CASE SUITE
*
/**
* MESSAGE PASSING INTERFACE TEST CASE SUITE
*
@@
-87,6
+93,9
@@
static int small_test(int rank, int size)
retval =
MPI_Scatter(sndbuf, sendcount, MPI_DOUBLE, &rcvd, recvcount,
MPI_DOUBLE, root, MPI_COMM_WORLD);
retval =
MPI_Scatter(sndbuf, sendcount, MPI_DOUBLE, &rcvd, recvcount,
MPI_DOUBLE, root, MPI_COMM_WORLD);
+ if (root == rank) {
+ free(sndbuf);
+ }
if (retval != MPI_SUCCESS) {
fprintf(stderr, "(%s:%d) MPI_Scatter() returned retval=%d\n", __FILE__,
__LINE__, retval);
if (retval != MPI_SUCCESS) {
fprintf(stderr, "(%s:%d) MPI_Scatter() returned retval=%d\n", __FILE__,
__LINE__, retval);
@@
-94,7
+103,7
@@
static int small_test(int rank, int size)
}
// verification
if ((double) rank != rcvd) {
}
// verification
if ((double) rank != rcvd) {
- fprintf(stderr, "[%d] has %
l
f instead of %d\n", rank, rcvd, rank);
+ fprintf(stderr, "[%d] has %f instead of %d\n", rank, rcvd, rank);
success = 0;
}
return (success);
success = 0;
}
return (success);