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
cut the backtrace displayed from sthread to the sthread_create to hide useless cruft
[simgrid.git]
/
teshsuite
/
smpi
/
coll-allreduce-with-leaks
/
coll-allreduce-with-leaks.c
diff --git
a/teshsuite/smpi/coll-allreduce-with-leaks/coll-allreduce-with-leaks.c
b/teshsuite/smpi/coll-allreduce-with-leaks/coll-allreduce-with-leaks.c
index c9b9bcb0f7f721161664c990367d4f99cde2fcf1..f4dac7dd55b1c1112ebb0f5178f9d6893cea206b 100644
(file)
--- a/
teshsuite/smpi/coll-allreduce-with-leaks/coll-allreduce-with-leaks.c
+++ b/
teshsuite/smpi/coll-allreduce-with-leaks/coll-allreduce-with-leaks.c
@@
-1,4
+1,4
@@
-/* Copyright (c) 2009-202
1
. The SimGrid Team.
+/* Copyright (c) 2009-202
3
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
@@
-24,8
+24,8
@@
int main(int argc, char *argv[])
MPI_Comm_size(MPI_COMM_WORLD, &size);
MPI_Comm_set_errhandler(dup, MPI_ERRORS_RETURN);
MPI_Comm_size(MPI_COMM_WORLD, &size);
MPI_Comm_set_errhandler(dup, MPI_ERRORS_RETURN);
- int* sb =
xbt_new0(int, size * maxlen
);
- int* rb =
xbt_new0(int, size * maxlen
);
+ int* sb =
(int*)calloc(size * maxlen, sizeof(int)
);
+ int* rb =
(int*)calloc(size * maxlen+rank, sizeof(int)
);
for (int i = 0; i < size * maxlen; ++i) {
sb[i] = rank*size + i;
for (int i = 0; i < size * maxlen; ++i) {
sb[i] = rank*size + i;
@@
-38,9
+38,7
@@
int main(int argc, char *argv[])
printf("all_to_all returned %d\n", status);
fflush(stdout);
}
printf("all_to_all returned %d\n", status);
fflush(stdout);
}
- //Do not free dup
- xbt_free(sb);
- xbt_free(rb);
+ //Do not free dup and rb/sb
MPI_Finalize();
MPI_Finalize();
- return
(EXIT_SUCCESS)
;
+ return
EXIT_SUCCESS
;
}
}