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) {
17 /* initialisation of SD */
20 /* xbt_log_control_set("sd.thres=debug"); */
23 INFO1("Usage: %s platform_file", argv[0]);
24 INFO1("example: %s sd_platform.xml", argv[0]);
28 /* creation of the environment */
29 const char * platform_file = argv[1];
30 SD_create_environment(platform_file);
32 /* test the estimation functions */
33 const SD_workstation_t *workstations = SD_workstation_get_list();
34 int ws_nr = SD_workstation_get_number();
36 SD_workstation_t w1 = NULL;
37 SD_workstation_t w2 = NULL;
38 const char *name1, *name2;
39 /* Show routes between all workstation */
41 for (i=0; i<ws_nr; i++){
42 for (j=0;j<ws_nr; j++){
45 name1 = SD_workstation_get_name(w1);
46 name2 = SD_workstation_get_name(w2);
47 INFO2("Route between %s and %s:", name1, name2);
48 const SD_link_t *route = SD_route_get_list(w1, w2);
49 int route_size = SD_route_get_size(w1, w2);
50 for (k = 0; k < route_size; k++) {
51 INFO3("\tLink %s: latency = %f, bandwidth = %f", SD_link_get_name(route[k]),
52 SD_link_get_current_latency(route[k]), SD_link_get_current_bandwidth(route[k]));