+ /* test the estimation functions */
+ workstations = SD_workstation_get_list();
+ w1 = workstations[0];
+ w2 = workstations[1];
+ SD_workstation_set_access_mode(w2, SD_WORKSTATION_SEQUENTIAL_ACCESS);
+ name1 = SD_workstation_get_name(w1);
+ name2 = SD_workstation_get_name(w2);
+ computation_amount1 = 2000000;
+ computation_amount2 = 1000000;
+ communication_amount12 = 2000000;
+ communication_amount21 = 3000000;
+ INFO3("Computation time for %f flops on %s: %f", computation_amount1, name1,
+ SD_workstation_get_computation_time(w1, computation_amount1));
+ INFO3("Computation time for %f flops on %s: %f", computation_amount2, name2,
+ SD_workstation_get_computation_time(w2, computation_amount2));
+
+ INFO2("Route between %s and %s:", name1, name2);
+ route = SD_route_get_list(w1, w2);
+ route_size = SD_route_get_size(w1, w2);
+ for (i = 0; i < route_size; i++) {
+ INFO3(" Link %s: latency = %f, bandwidth = %f",
+ SD_link_get_name(route[i]), SD_link_get_current_latency(route[i]),
+ SD_link_get_current_bandwidth(route[i]));
+ }
+ INFO2("Route latency = %f, route bandwidth = %f",
+ SD_route_get_current_latency(w1, w2),
+ SD_route_get_current_bandwidth(w1, w2));
+ INFO4("Communication time for %f bytes between %s and %s: %f",
+ communication_amount12, name1, name2,
+ SD_route_get_communication_time(w1, w2, communication_amount12));
+ INFO4("Communication time for %f bytes between %s and %s: %f",
+ communication_amount21, name2, name1,
+ SD_route_get_communication_time(w2, w1, communication_amount21));
+