2 See examples/platforms/metaxml.xml and examples/platforms/metaxml_platform.xml files for examples on how to use the cluster, foreach, set, route:multi, trace and trace:connect tags
6 #include "simdag/simdag.h"
13 XBT_LOG_NEW_DEFAULT_CATEGORY(sd_test,
14 "Logging specific to this SimDag example");
16 int main(int argc, char **argv)
19 const char *platform_file;
20 const SD_workstation_t *workstations;
22 SD_workstation_t w1 = NULL;
23 SD_workstation_t w2 = NULL;
24 const char *name1, *name2;
27 /* initialisation of SD */
30 /* xbt_log_control_set("sd.thres=debug"); */
33 INFO1("Usage: %s platform_file", argv[0]);
34 INFO1("example: %s sd_platform.xml", argv[0]);
38 /* creation of the environment */
39 platform_file = argv[1];
40 SD_create_environment(platform_file);
42 /* test the estimation functions */
43 workstations = SD_workstation_get_list();
44 ws_nr = SD_workstation_get_number();
47 /* Show routes between all workstation */
49 for (i = 0; i < ws_nr; i++) {
50 for (j = 0; j < ws_nr; j++) {
51 const SD_link_t *route;
55 name1 = SD_workstation_get_name(w1);
56 name2 = SD_workstation_get_name(w2);
57 INFO2("Route between %s and %s:", name1, name2);
58 route = SD_route_get_list(w1, w2);
59 route_size = SD_route_get_size(w1, w2);
60 for (k = 0; k < route_size; k++) {
61 INFO3("\tLink %s: latency = %f, bandwidth = %f",
62 SD_link_get_name(route[k]),
63 SD_link_get_current_latency(route[k]),
64 SD_link_get_current_bandwidth(route[k]));