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) {
18 const char * platform_file;
19 const SD_workstation_t *workstations;
21 SD_workstation_t w1 = NULL;
22 SD_workstation_t w2 = NULL;
23 const char *name1, *name2;
26 /* initialisation of SD */
29 /* xbt_log_control_set("sd.thres=debug"); */
32 INFO1("Usage: %s platform_file", argv[0]);
33 INFO1("example: %s sd_platform.xml", argv[0]);
37 /* creation of the environment */
38 platform_file = argv[1];
39 SD_create_environment(platform_file);
41 /* test the estimation functions */
42 workstations = SD_workstation_get_list();
43 ws_nr = SD_workstation_get_number();
46 /* Show routes between all workstation */
48 for (i=0; i<ws_nr; i++){
49 for (j=0;j<ws_nr; j++){
50 const SD_link_t *route;
54 name1 = SD_workstation_get_name(w1);
55 name2 = SD_workstation_get_name(w2);
56 INFO2("Route between %s and %s:", name1, name2);
57 route = SD_route_get_list(w1, w2);
58 route_size = SD_route_get_size(w1, w2);
59 for (k = 0; k < route_size; k++) {
60 INFO3("\tLink %s: latency = %f, bandwidth = %f", SD_link_get_name(route[k]),
61 SD_link_get_current_latency(route[k]), SD_link_get_current_bandwidth(route[k]));