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
kill old cruft
[simgrid.git]
/
teshsuite
/
simdag
/
platforms
/
basic_parsing_test.c
diff --git
a/teshsuite/simdag/platforms/basic_parsing_test.c
b/teshsuite/simdag/platforms/basic_parsing_test.c
index
e7cbf0b
..
1d53c0d
100644
(file)
--- a/
teshsuite/simdag/platforms/basic_parsing_test.c
+++ b/
teshsuite/simdag/platforms/basic_parsing_test.c
@@
-13,20
+13,13
@@
int main(int argc, char **argv)
/* SD initialization */
sg_host_t w1, w2;
/* SD initialization */
sg_host_t w1, w2;
-
const
sg_host_t *workstations;
-
const
SD_link_t *route;
+ sg_host_t *workstations;
+ SD_link_t *route;
const char *name1;
const char *name2;
int route_size, i, j, k;
int list_size;
const char *name1;
const char *name2;
int route_size, i, j, k;
int list_size;
-#ifdef _XBT_WIN32
- setbuf(stderr, NULL);
- setbuf(stdout, NULL);
-#else
- setvbuf(stdout, NULL, _IOLBF, 0);
-#endif
-
SD_init(&argc, argv);
/* creation of the environment */
SD_init(&argc, argv);
/* creation of the environment */
@@
-34,9
+27,9
@@
int main(int argc, char **argv)
printf("Workstation number: %zu, link number: %d\n",
sg_host_count(), sg_link_count());
printf("Workstation number: %zu, link number: %d\n",
sg_host_count(), sg_link_count());
+ workstations = sg_host_list();
if (argc >= 3) {
if (!strcmp(argv[2], "ONE_LINK")) {
if (argc >= 3) {
if (!strcmp(argv[2], "ONE_LINK")) {
- workstations = sg_host_list();
w1 = workstations[0];
w2 = workstations[1];
name1 = sg_host_get_name(w1);
w1 = workstations[0];
w2 = workstations[1];
name1 = sg_host_get_name(w1);
@@
-55,9
+48,9
@@
int main(int argc, char **argv)
printf("Route latency = %f, route bandwidth = %f\n",
SD_route_get_latency(w1, w2),
SD_route_get_bandwidth(w1, w2));
printf("Route latency = %f, route bandwidth = %f\n",
SD_route_get_latency(w1, w2),
SD_route_get_bandwidth(w1, w2));
+ xbt_free(route);
}
if (!strcmp(argv[2], "FULL_LINK")) {
}
if (!strcmp(argv[2], "FULL_LINK")) {
- workstations = sg_host_list();
list_size = sg_host_count();
for (i = 0; i < list_size; i++) {
w1 = workstations[i];
list_size = sg_host_count();
for (i = 0; i < list_size; i++) {
w1 = workstations[i];
@@
-78,6
+71,7
@@
int main(int argc, char **argv)
printf(" Route latency = %f, route bandwidth = %f\n",
SD_route_get_latency(w1, w2),
SD_route_get_bandwidth(w1, w2));
printf(" Route latency = %f, route bandwidth = %f\n",
SD_route_get_latency(w1, w2),
SD_route_get_bandwidth(w1, w2));
+ xbt_free(route);
}
}
}
}
}
}
@@
-87,6
+81,7
@@
int main(int argc, char **argv)
"SG_TEST_mem"));
}
}
"SG_TEST_mem"));
}
}
+ xbt_free(workstations);
SD_exit();
return 0;
SD_exit();
return 0;