Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Thx green guy! power is speed.
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Tue, 19 Jan 2016 14:53:56 +0000 (15:53 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Tue, 19 Jan 2016 14:53:56 +0000 (15:53 +0100)
examples/simdag/properties/test_prop.tesh
examples/simdag/sd_avail.c
examples/simdag/test_simdag_avail.tesh
examples/simdag/test_simdag_seq_access.tesh
include/simgrid/simdag.h
src/simdag/sd_workstation.cpp
teshsuite/simdag/platforms/flatifier.cpp

index 7c969a5..22c76d2 100755 (executable)
@@ -15,8 +15,8 @@ $ $SG_TEST_EXENV properties/sd_prop ${srcdir:=.}/../platforms/prop.xml
 > [0.000000] [test/INFO]       Property: Hdd old value: 120
 > [0.000000] [test/INFO]       Property: Hdd new value: 250
 > [0.000000] [sd_workstation/INFO] Displaying workstation host2
-> [0.000000] [sd_workstation/INFO]   - power: 1000000000
-> [0.000000] [sd_workstation/INFO]   - available power: 1.00
+> [0.000000] [sd_workstation/INFO]   - speed: 1000000000
+> [0.000000] [sd_workstation/INFO]   - available speed: 1.00
 > [0.000000] [sd_workstation/INFO]   - access mode: Exclusive
 > [0.000000] [sd_workstation/INFO]     no task running
 > [0.000000] [sd_workstation/INFO]   - properties:
index d9af2ee..94c5809 100644 (file)
@@ -89,12 +89,12 @@ int main(int argc, char **argv)
     XBT_INFO("link1: bw=%.0f, lat=%f",
              SD_route_get_bandwidth(workstations[0], workstations[1]),
              SD_route_get_latency(workstations[0], workstations[1]));
-    XBT_INFO("Jupiter: power=%.0f",
-             SD_workstation_get_power(workstations[0])*
-             SD_workstation_get_available_power(workstations[0]));
-    XBT_INFO("Tremblay: power=%.0f",
-             SD_workstation_get_power(workstations[1])*
-             SD_workstation_get_available_power(workstations[1]));
+    XBT_INFO("Jupiter: speed=%.0f",
+             SD_workstation_get_speed(workstations[0])*
+             SD_workstation_get_available_speed(workstations[0]));
+    XBT_INFO("Tremblay: speed=%.0f",
+             SD_workstation_get_speed(workstations[1])*
+             SD_workstation_get_available_speed(workstations[1]));
     xbt_dynar_foreach(changed_tasks, ctr, task) {
       XBT_INFO("Task '%s' start time: %f, finish time: %f",
            SD_task_get_name(task),
index 87134ea..c4591ba 100644 (file)
@@ -5,30 +5,30 @@ p Test of the management of availability traces with simdag
 $ $SG_TEST_EXENV ${bindir:=.}/sd_avail two_hosts.xml
 > [0.000000] [surf_host/INFO] Switching to the L07 model to handle parallel tasks.
 > [1.000000] [sd_avail/INFO] link1: bw=125000000, lat=0.000100
-> [1.000000] [sd_avail/INFO] Jupiter: power=12500000
-> [1.000000] [sd_avail/INFO] Tremblay: power=12500000
+> [1.000000] [sd_avail/INFO] Jupiter: speed=12500000
+> [1.000000] [sd_avail/INFO] Tremblay: speed=12500000
 > [1.000000] [sd_avail/INFO] Task 't1' start time: 0.000000, finish time: 1.000000
 > [2.000200] [sd_avail/INFO] link1: bw=62500000, lat=0.000100
-> [2.000200] [sd_avail/INFO] Jupiter: power=12500000
-> [2.000200] [sd_avail/INFO] Tremblay: power=25000000
+> [2.000200] [sd_avail/INFO] Jupiter: speed=12500000
+> [2.000200] [sd_avail/INFO] Tremblay: speed=25000000
 > [2.000200] [sd_avail/INFO] Task 'c1' start time: 1.000000, finish time: 2.000200
 > [3.000200] [sd_avail/INFO] link1: bw=62500000, lat=0.000100
-> [3.000200] [sd_avail/INFO] Jupiter: power=12500000
-> [3.000200] [sd_avail/INFO] Tremblay: power=25000000
+> [3.000200] [sd_avail/INFO] Jupiter: speed=12500000
+> [3.000200] [sd_avail/INFO] Tremblay: speed=25000000
 > [3.000200] [sd_avail/INFO] Task 't2' start time: 2.000200, finish time: 3.000200
 > [4.000600] [sd_avail/INFO] link1: bw=31250000, lat=0.000100
-> [4.000600] [sd_avail/INFO] Jupiter: power=25000000
-> [4.000600] [sd_avail/INFO] Tremblay: power=25000000
+> [4.000600] [sd_avail/INFO] Jupiter: speed=25000000
+> [4.000600] [sd_avail/INFO] Tremblay: speed=25000000
 > [4.000600] [sd_avail/INFO] Task 'c2' start time: 3.000200, finish time: 4.000600
 > [5.000600] [sd_avail/INFO] link1: bw=31250000, lat=0.000100
-> [5.000600] [sd_avail/INFO] Jupiter: power=25000000
-> [5.000600] [sd_avail/INFO] Tremblay: power=25000000
+> [5.000600] [sd_avail/INFO] Jupiter: speed=25000000
+> [5.000600] [sd_avail/INFO] Tremblay: speed=25000000
 > [5.000600] [sd_avail/INFO] Task 't3' start time: 4.000600, finish time: 5.000600
 > [6.000700] [sd_avail/INFO] link1: bw=31250000, lat=0.000100
-> [6.000700] [sd_avail/INFO] Jupiter: power=25000000
-> [6.000700] [sd_avail/INFO] Tremblay: power=25000000
+> [6.000700] [sd_avail/INFO] Jupiter: speed=25000000
+> [6.000700] [sd_avail/INFO] Tremblay: speed=25000000
 > [6.000700] [sd_avail/INFO] Task 'c3' start time: 5.000600, finish time: 6.000700
 > [7.000700] [sd_avail/INFO] link1: bw=31250000, lat=0.000100
-> [7.000700] [sd_avail/INFO] Jupiter: power=25000000
-> [7.000700] [sd_avail/INFO] Tremblay: power=25000000
+> [7.000700] [sd_avail/INFO] Jupiter: speed=25000000
+> [7.000700] [sd_avail/INFO] Tremblay: speed=25000000
 > [7.000700] [sd_avail/INFO] Task 't4' start time: 6.000700, finish time: 7.000700
\ No newline at end of file
index 6b6eb66..d7de480 100644 (file)
@@ -5,63 +5,63 @@ p Simple test of simdag
 $ $SG_TEST_EXENV ./sd_seq_access ${srcdir:=.}/2clusters.xml
 > [0.000000] [surf_host/INFO] Switching to the L07 model to handle parallel tasks.
 > [0.000000] [sd_workstation/INFO] Displaying workstation C2-05
-> [0.000000] [sd_workstation/INFO]   - power: 5000000000
-> [0.000000] [sd_workstation/INFO]   - available power: 1.00
+> [0.000000] [sd_workstation/INFO]   - speed: 5000000000
+> [0.000000] [sd_workstation/INFO]   - available speed: 1.00
 > [0.000000] [sd_workstation/INFO]   - access mode: Space shared
 > [0.000000] [sd_seq_access/INFO]  Change access mode of C2-05 to sequential
 > [0.000000] [sd_workstation/INFO] Displaying workstation C2-06
-> [0.000000] [sd_workstation/INFO]   - power: 5000000000
-> [0.000000] [sd_workstation/INFO]   - available power: 1.00
+> [0.000000] [sd_workstation/INFO]   - speed: 5000000000
+> [0.000000] [sd_workstation/INFO]   - available speed: 1.00
 > [0.000000] [sd_workstation/INFO]   - access mode: Space shared
 > [0.000000] [sd_seq_access/INFO]  Change access mode of C2-06 to sequential
 > [0.000000] [sd_seq_access/INFO]  Change access mode of C2-06 to shared
 > [0.000000] [sd_seq_access/INFO]  Simulation was suspended, check workstation states
 > [0.000000] [sd_workstation/INFO] Displaying workstation C2-05
-> [0.000000] [sd_workstation/INFO]   - power: 5000000000
-> [0.000000] [sd_workstation/INFO]   - available power: 1.00
+> [0.000000] [sd_workstation/INFO]   - speed: 5000000000
+> [0.000000] [sd_workstation/INFO]   - available speed: 1.00
 > [0.000000] [sd_workstation/INFO]   - access mode: Exclusive
 > [0.000000] [sd_workstation/INFO]     current running task: Task A
 > [0.000000] [sd_workstation/INFO] Displaying workstation C2-06
-> [0.000000] [sd_workstation/INFO]   - power: 5000000000
-> [0.000000] [sd_workstation/INFO]   - available power: 1.00
+> [0.000000] [sd_workstation/INFO]   - speed: 5000000000
+> [0.000000] [sd_workstation/INFO]   - available speed: 1.00
 > [0.000000] [sd_workstation/INFO]   - access mode: Space shared
 > [4.000000] [sd_seq_access/INFO]  Simulation was suspended, check workstation states
 > [4.000000] [sd_workstation/INFO] Displaying workstation C2-05
-> [4.000000] [sd_workstation/INFO]   - power: 5000000000
-> [4.000000] [sd_workstation/INFO]   - available power: 1.00
+> [4.000000] [sd_workstation/INFO]   - speed: 5000000000
+> [4.000000] [sd_workstation/INFO]   - available speed: 1.00
 > [4.000000] [sd_workstation/INFO]   - access mode: Exclusive
 > [4.000000] [sd_workstation/INFO]     current running task: Task B
 > [4.000000] [sd_workstation/INFO] Displaying workstation C2-06
-> [4.000000] [sd_workstation/INFO]   - power: 5000000000
-> [4.000000] [sd_workstation/INFO]   - available power: 1.00
+> [4.000000] [sd_workstation/INFO]   - speed: 5000000000
+> [4.000000] [sd_workstation/INFO]   - available speed: 1.00
 > [4.000000] [sd_workstation/INFO]   - access mode: Space shared
 > [5.600300] [sd_seq_access/INFO]  Simulation was suspended, check workstation states
 > [5.600300] [sd_workstation/INFO] Displaying workstation C2-05
-> [5.600300] [sd_workstation/INFO]   - power: 5000000000
-> [5.600300] [sd_workstation/INFO]   - available power: 1.00
+> [5.600300] [sd_workstation/INFO]   - speed: 5000000000
+> [5.600300] [sd_workstation/INFO]   - available speed: 1.00
 > [5.600300] [sd_workstation/INFO]   - access mode: Exclusive
 > [5.600300] [sd_workstation/INFO]     no task running
 > [5.600300] [sd_workstation/INFO] Displaying workstation C2-06
-> [5.600300] [sd_workstation/INFO]   - power: 5000000000
-> [5.600300] [sd_workstation/INFO]   - available power: 1.00
+> [5.600300] [sd_workstation/INFO]   - speed: 5000000000
+> [5.600300] [sd_workstation/INFO]   - available speed: 1.00
 > [5.600300] [sd_workstation/INFO]   - access mode: Space shared
 > [9.600300] [sd_seq_access/INFO]  Simulation was suspended, check workstation states
 > [9.600300] [sd_workstation/INFO] Displaying workstation C2-05
-> [9.600300] [sd_workstation/INFO]   - power: 5000000000
-> [9.600300] [sd_workstation/INFO]   - available power: 1.00
+> [9.600300] [sd_workstation/INFO]   - speed: 5000000000
+> [9.600300] [sd_workstation/INFO]   - available speed: 1.00
 > [9.600300] [sd_workstation/INFO]   - access mode: Exclusive
 > [9.600300] [sd_workstation/INFO]     no task running
 > [9.600300] [sd_workstation/INFO] Displaying workstation C2-06
-> [9.600300] [sd_workstation/INFO]   - power: 5000000000
-> [9.600300] [sd_workstation/INFO]   - available power: 1.00
+> [9.600300] [sd_workstation/INFO]   - speed: 5000000000
+> [9.600300] [sd_workstation/INFO]   - available speed: 1.00
 > [9.600300] [sd_workstation/INFO]   - access mode: Space shared
 > [22.000000] [sd_seq_access/INFO]  Simulation was suspended, check workstation states
 > [22.000000] [sd_workstation/INFO] Displaying workstation C2-05
-> [22.000000] [sd_workstation/INFO]   - power: 5000000000
-> [22.000000] [sd_workstation/INFO]   - available power: 1.00
+> [22.000000] [sd_workstation/INFO]   - speed: 5000000000
+> [22.000000] [sd_workstation/INFO]   - available speed: 1.00
 > [22.000000] [sd_workstation/INFO]   - access mode: Exclusive
 > [22.000000] [sd_workstation/INFO]     no task running
 > [22.000000] [sd_workstation/INFO] Displaying workstation C2-06
-> [22.000000] [sd_workstation/INFO]   - power: 5000000000
-> [22.000000] [sd_workstation/INFO]   - available power: 1.00
+> [22.000000] [sd_workstation/INFO]   - speed: 5000000000
+> [22.000000] [sd_workstation/INFO]   - available speed: 1.00
 > [22.000000] [sd_workstation/INFO]   - access mode: Space shared
index fe649ed..0b4e263 100644 (file)
@@ -151,8 +151,8 @@ XBT_PUBLIC(const SD_link_t *) SD_route_get_list(SD_workstation_t src,
                                                 SD_workstation_t dst);
 XBT_PUBLIC(int) SD_route_get_size(SD_workstation_t src,
                                   SD_workstation_t dst);
-XBT_PUBLIC(double) SD_workstation_get_power(SD_workstation_t workstation);
-XBT_PUBLIC(double) SD_workstation_get_available_power(SD_workstation_t
+XBT_PUBLIC(double) SD_workstation_get_speed(SD_workstation_t workstation);
+XBT_PUBLIC(double) SD_workstation_get_available_speed(SD_workstation_t
                                                       workstation);
 XBT_PUBLIC(int) SD_workstation_get_cores(SD_workstation_t workstation);
 XBT_PUBLIC(e_SD_workstation_access_mode_t)
index 67522e2..38517ff 100644 (file)
@@ -175,8 +175,8 @@ void SD_workstation_dump(SD_workstation_t ws)
   SD_task_t task = NULL;
   
   XBT_INFO("Displaying workstation %s", SD_workstation_get_name(ws));
-  XBT_INFO("  - power: %.0f", SD_workstation_get_power(ws));
-  XBT_INFO("  - available power: %.2f", SD_workstation_get_available_power(ws));
+  XBT_INFO("  - speed: %.0f", SD_workstation_get_speed(ws));
+  XBT_INFO("  - available speed: %.2f", SD_workstation_get_available_speed(ws));
   switch (sg_host_sd(ws)->access_mode){
   case SD_WORKSTATION_SHARED_ACCESS:
       XBT_INFO("  - access mode: Space shared");
@@ -248,13 +248,13 @@ int SD_route_get_size(SD_workstation_t src, SD_workstation_t dst)
 }
 
 /**
- * \brief Returns the total power of a workstation
+ * \brief Returns the total speed of a workstation
  *
  * \param workstation a workstation
- * \return the total power of this workstation
- * \see SD_workstation_get_available_power()
+ * \return the total speed of this workstation
+ * \see SD_workstation_get_available_speed()
  */
-double SD_workstation_get_power(SD_workstation_t workstation)
+double SD_workstation_get_speed(SD_workstation_t workstation)
 {
   return workstation->speed();
 }
@@ -269,13 +269,13 @@ int SD_workstation_get_cores(SD_workstation_t workstation) {
 }
 
 /**
- * \brief Returns the proportion of available power in a workstation
+ * \brief Returns the proportion of available speed in a workstation
  *
  * \param workstation a workstation
- * \return the proportion of power currently available in this workstation (normally a number between 0 and 1)
- * \see SD_workstation_get_power()
+ * \return the proportion of speed currently available in this workstation (normally a number between 0 and 1)
+ * \see SD_workstation_get_speed()
  */
-double SD_workstation_get_available_power(SD_workstation_t workstation)
+double SD_workstation_get_available_speed(SD_workstation_t workstation)
 {
   return surf_host_get_available_speed(workstation);
 }
@@ -292,7 +292,7 @@ double SD_workstation_get_computation_time(SD_workstation_t workstation,
 {
   xbt_assert(flops_amount >= 0,
               "flops_amount must be greater than or equal to zero");
-  return flops_amount / SD_workstation_get_power(workstation);
+  return flops_amount / SD_workstation_get_speed(workstation);
 }
 
 /**
index 9e5bb84..408876f 100644 (file)
@@ -146,7 +146,7 @@ int main(int argc, char **argv)
     for (i = 0; i < totalHosts; i++) {
       printf("  <host id=\"%s\" power=\"%.0f\"",
           SD_workstation_get_name(hosts[i]),
-          SD_workstation_get_power(hosts[i]));
+          SD_workstation_get_speed(hosts[i]));
       props = SD_workstation_get_properties(hosts[i]);
       if (SD_workstation_get_cores(hosts[i])>1) {
         printf(" core=\"%d\"", SD_workstation_get_cores(hosts[i]));