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
Free dynamically allocated memory.
[simgrid.git]
/
teshsuite
/
smpi
/
macro-sample
/
macro-sample.c
diff --git
a/teshsuite/smpi/macro-sample/macro-sample.c
b/teshsuite/smpi/macro-sample/macro-sample.c
index
627067e
..
5696f75
100644
(file)
--- a/
teshsuite/smpi/macro-sample/macro-sample.c
+++ b/
teshsuite/smpi/macro-sample/macro-sample.c
@@
-1,4
+1,4
@@
-/* Copyright (c) 2009-201
4
. The SimGrid Team.
+/* Copyright (c) 2009-201
9
. 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
@@
-32,9
+32,8
@@
int main(int argc, char *argv[])
MPI_Comm_size(MPI_COMM_WORLD, &n);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
double d = 2.0;
MPI_Comm_size(MPI_COMM_WORLD, &n);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
double d = 2.0;
- for (int i = 0; i < 5; i++) {
/* I want no more than n + 1 benchs (thres < 0) */
/* I want no more than n + 1 benchs (thres < 0) */
-
SMPI_SAMPLE_GLOBAL(n + 1, -1)
{
+
SMPI_SAMPLE_GLOBAL(int i = 0, i < 5, i++, n + 1, -1)
{
if (verbose)
fprintf(stderr, "(%12.6f) [rank:%d]", MPI_Wtime(), rank);
else
if (verbose)
fprintf(stderr, "(%12.6f) [rank:%d]", MPI_Wtime(), rank);
else
@@
-42,14
+41,10
@@
int main(int argc, char *argv[])
fprintf(stderr, " Run the first computation. It's globally benched, "
"and I want no more than %d benchmarks (thres<0)\n", n + 1);
d = compute(2.0);
fprintf(stderr, " Run the first computation. It's globally benched, "
"and I want no more than %d benchmarks (thres<0)\n", n + 1);
d = compute(2.0);
- }
}
n = 0;
}
n = 0;
- for (int i = 0; i < 5; i++) {
- /* I want the standard error to go below 0.1 second.
- * Two tests at least will be run (count is not > 0) */
- SMPI_SAMPLE_LOCAL(0, 0.1) {
+ SMPI_SAMPLE_LOCAL (int i = 0, i < 5, i++,0, 0.1){
if (verbose || n < 2) {
n++;
if (verbose)
if (verbose || n < 2) {
n++;
if (verbose)
@@
-57,11
+52,10
@@
int main(int argc, char *argv[])
else
fprintf(stderr, "(1)");
fprintf(stderr,
else
fprintf(stderr, "(1)");
fprintf(stderr,
- " [rank:%d] Run the
first
(locally benched) computation. It's locally benched, and I want the "
+ " [rank:%d] Run the
second
(locally benched) computation. It's locally benched, and I want the "
"standard error to go below 0.1 second (count is not >0)\n", rank);
}
d = compute(d);
"standard error to go below 0.1 second (count is not >0)\n", rank);
}
d = compute(d);
- }
}
if (verbose)
}
if (verbose)