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
cmake refactoring in teshuite/smpi cont'd
[simgrid.git]
/
teshsuite
/
smpi
/
coll-bcast
/
coll-bcast.c
diff --git
a/teshsuite/smpi/bcast/bcast_coll.c
b/teshsuite/smpi/coll-bcast/coll-bcast.c
similarity index 88%
rename from
teshsuite/smpi/bcast/bcast_coll.c
rename to
teshsuite/smpi/coll-bcast/coll-bcast.c
index
bceaf40
..
0e22735
100644
(file)
--- a/
teshsuite/smpi/bcast/bcast_coll.c
+++ b/
teshsuite/smpi/coll-bcast/coll-bcast.c
@@
-11,14
+11,12
@@
int main(int argc, char **argv)
{
int i, size, rank;
int count = 2048;
- int *values;
- int status;
MPI_Init(&argc, &argv);
MPI_Comm_size(MPI_COMM_WORLD, &size);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
-
- values = (int *) xbt_malloc(count * sizeof(int));
+
+ int *values = (int *) xbt_malloc(count * sizeof(int));
for (i = 0; i < count; i++)
values[i] = (0 == rank) ? 17 : 3;
@@
-39,16
+37,13
@@
int main(int argc, char **argv)
for (i = 0; i < count; i++)
values[i] = (size -1 == rank) ? 17 : 3;
- status = MPI_Bcast(values, count, MPI_INT, size-1, MPI_COMM_WORLD);
+
int
status = MPI_Bcast(values, count, MPI_INT, size-1, MPI_COMM_WORLD);
good = 0;
for (i = 0; i < count; i++)
if (values[i]==17) good++;
printf("[%d] number of values equals to 17: %d\n", rank, good);
-
-
-
if (rank == 0) {
if (status != MPI_SUCCESS) {
printf("bcast returned %d\n", status);