Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
further energy interface cleanups (see changelog)
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 9 Jun 2015 12:00:55 +0000 (14:00 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 9 Jun 2015 12:00:55 +0000 (14:00 +0200)
32 files changed:
ChangeLog
examples/msg/energy/pstate/pstate.c
examples/smpi/energy/f77/sef.f
examples/smpi/energy/f90/sef90.f90
examples/smpi/energy/se.c
include/simgrid/msg.h
include/simgrid/simix.h
include/smpi/mpif.h.in
include/smpi/smpi.h
src/bindings/java/org/simgrid/surf/Cpu.java
src/bindings/java/org/simgrid/surf/SurfJNI.java
src/bindings/java/surf.i
src/include/surf/surf.h
src/msg/msg_host.c
src/simix/libsmx.c
src/simix/popping_accessors.h
src/simix/popping_bodies.c
src/simix/popping_enum.h
src/simix/popping_generated.c
src/simix/simcalls.in
src/simix/smx_host.c
src/simix/smx_host_private.h
src/smpi/smpi_dvfs.c
src/surf/cpu_cas01.cpp
src/surf/cpu_cas01.hpp
src/surf/cpu_interface.hpp
src/surf/cpu_ti.hpp
src/surf/surf_c_bindings.cpp
src/surf/workstation_interface.cpp
src/surf/workstation_interface.hpp
src/surf/workstation_ptask_L07.cpp
src/surf/workstation_ptask_L07.hpp

index 7f070bb..61dbb2d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,7 +10,7 @@ SimGrid (3.12) NOT RELEASED; urgency=low
      - set_data_size(t) -> set_bytes_amount(t)
        get_data_size(t) -> get_bytes_amount(t)
    - Massive cleanups in the functions related to the energy
-     - MSG_host_get_pstate_number() -> MSG_host_get_pstate_count()
+     - MSG_host_get_pstate_number() -> MSG_host_get_nb_pstates()
  jMSG:
  * Interface improvement:
    - Rename Host.isAvail() to Host.isOn()
@@ -28,6 +28,8 @@ SimGrid (3.12) NOT RELEASED; urgency=low
    - popping: the strange dance that converts a user request into a kernel handling
    - smx_context_*: the virtualization mechanisms that embeed the user code
    - smx_*: the handling of each simcalls
+ * Interface cleanup:
+   - simcall_host_set_power_peak_at -> simcall_host_set_pstate
  * Rename smx_action_t into smx_synchro_t, making explicit that these
    things are used to synchronize processes with their environment.    
    For example, a communication is a sort of synchronization involving
@@ -59,10 +61,12 @@ SimGrid (3.12) NOT RELEASED; urgency=low
    - Replay can be used with SMP-aware algorithms
    - Memory occupation of replay should now be contained (temporary buffers allocated in collective algorithms should be shared between processes)
    - Replay can now replay several traces at the same time (check examples/smpi/replay_multiple example), to simulate interactions between several applications on a given platform. User can specify the start time of each instance. This should also allow replay + actual applications to run.
 * Bug fixes 
+ * Bug fixes 
    - [#17799] : have mpi_group_range_incl and mpi_group_range_excl better test some corner cases
    - Correctly use loopback on fat-tree clusters
    - Asynchronous small messages shouldn't trigger deadlocks anymore
+ * Interface cleanup
+   - smpi_set_host_power_peak_at -> smpi_set_host_pstate
  SURF
   * Bug fixes 
    - "Full" network optimization flag was broken since Surf++
index 0b2a8b6..143251f 100644 (file)
@@ -17,7 +17,7 @@
  * - <b>energy/e1/e1.c</b> Shows how a set of pstates can be defined
  *             for a host and how the current pstate can be accessed/changed
  *             with @ref MSG_get_host_current_power_peak and @ref
- *             MSG_set_host_power_peak_at.
+ *             MSG_set_host_pstate.
  *             Make sure to read the platform XML file for details on how
  *             to declare the CPU capacity for each pstate.
  *
@@ -38,7 +38,7 @@ int dvfs(int argc, char *argv[])
   int new_peak_index=2;
   host = MSG_host_self();; //MSG_get_host_by_name("MyHost1");
 
-  int nb = MSG_host_get_pstate_count(host);
+  int nb = MSG_host_get_nb_pstates(host);
   XBT_INFO("Count of Processor states=%d", nb);
 
   double current_peak = MSG_host_get_current_power_peak(host);
@@ -78,7 +78,7 @@ int dvfs(int argc, char *argv[])
 
   // Verify the default pstate is set to 0
   host = MSG_get_host_by_name("MyHost2");
-  int nb2 = MSG_host_get_pstate_count(host);
+  int nb2 = MSG_host_get_nb_pstates(host);
   XBT_INFO("Count of Processor states=%d", nb2);
 
   double current_peak2 = MSG_host_get_current_power_peak(host);
index a4c4644..1c00d59 100644 (file)
@@ -37,7 +37,7 @@
       end do
 
       do i = 0, pstates - 1
-         call smpi_set_host_power_peak_at(i)
+         call smpi_set_host_pstate(i)
          t = MPI_Wtime()
          p = smpi_get_host_current_power_peak()
          print *, '[', t, '] [rank ', rank, '] Current pstate: ', i,
index 833bf73..14e3a71 100644 (file)
@@ -35,7 +35,7 @@ program main
   end do
 
   do i = 0, pstates - 1
-     call smpi_set_host_power_peak_at(i)
+     call smpi_set_host_pstate(i)
      t = MPI_Wtime()
      p = smpi_get_host_current_power_peak()
      print *, '[', t, '] [rank ', rank, '] Current pstate: ', i, '; Current power: ', p
index 2c4571a..11b27ee 100644 (file)
@@ -54,7 +54,7 @@ int main(int argc, char *argv[])
   fprintf(stderr, "%s%s\n", buf, (sz ? "" : " [...]"));
 
   for (i = 0; i < pstates; i++) {
-    smpi_set_host_power_peak_at(i);
+    smpi_set_host_pstate(i);
     fprintf(stderr, "[%.6f] [rank %d] Current pstate: %d; Current power: %.0f\n",
             MPI_Wtime(), rank, i, smpi_get_host_current_power_peak());
 
index 9ea5492..de58a7c 100644 (file)
@@ -327,7 +327,7 @@ XBT_PUBLIC(void) __MSG_host_destroy(msg_host_t host);
 
 XBT_PUBLIC(double) MSG_host_get_power_peak_at(msg_host_t h, int pstate);
 XBT_PUBLIC(double) MSG_host_get_current_power_peak(msg_host_t h);
-XBT_PUBLIC(int)    MSG_host_get_pstate_count(msg_host_t h);
+XBT_PUBLIC(int)    MSG_host_get_nb_pstates(msg_host_t h);
 XBT_PUBLIC(void)   MSG_host_set_pstate(msg_host_t h, int pstate);
 XBT_PUBLIC(double) MSG_host_get_consumed_energy(msg_host_t h);
 
index 78fbcea..1cb3fd6 100644 (file)
@@ -319,7 +319,7 @@ XBT_PUBLIC(void) simcall_host_set_data(smx_host_t host, void *data);
 XBT_PUBLIC(double) simcall_host_get_current_power_peak(smx_host_t host);
 XBT_PUBLIC(double) simcall_host_get_power_peak_at(smx_host_t host, int pstate_index);
 XBT_PUBLIC(int) simcall_host_get_nb_pstates(smx_host_t host);
-XBT_PUBLIC(void) simcall_host_set_power_peak_at(smx_host_t host, int pstate_index);
+XBT_PUBLIC(void) simcall_host_set_pstate(smx_host_t host, int pstate_index);
 XBT_PUBLIC(double) simcall_host_get_consumed_energy(smx_host_t host);
 
 XBT_PUBLIC(smx_synchro_t) simcall_host_execute(const char *name, smx_host_t host,
index 7f75138..b6b94eb 100644 (file)
       external smpi_get_host_power_peak_at
       external smpi_get_host_current_power_peak
       external smpi_get_host_nb_pstates
-      external smpi_set_host_power_peak_at
+      external smpi_set_host_pstate
       external smpi_get_host_consumed_energy
 
       double precision smpi_get_host_power_peak_at
index 97d02cc..ef0e55b 100644 (file)
@@ -834,7 +834,7 @@ XBT_PUBLIC(void) smpi_execute(double duration);
 XBT_PUBLIC(double) smpi_get_host_power_peak_at(int pstate_index);
 XBT_PUBLIC(double) smpi_get_host_current_power_peak(void);
 XBT_PUBLIC(int) smpi_get_host_nb_pstates(void);
-XBT_PUBLIC(void) smpi_set_host_power_peak_at(int pstate_index);
+XBT_PUBLIC(void) smpi_set_host_pstate(int pstate_index);
 XBT_PUBLIC(double) smpi_get_host_consumed_energy(void);
 
 XBT_PUBLIC(int) smpi_usleep(useconds_t usecs);
index e172525..3ddad07 100644 (file)
@@ -158,12 +158,8 @@ public class Cpu extends Resource {
     return SurfJNI.Cpu_getNbPstates(swigCPtr, this);
   }
 
-  
-  /**
-    * @param pstate_index index of power peak to set
-    */
-  public void setPowerPeakAt(int pstate_index) {
-    SurfJNI.Cpu_setPowerPeakAt(swigCPtr, this, pstate_index);
+  public void setPstate(int pstate_index) {
+    SurfJNI.Cpu_setPstate(swigCPtr, this, pstate_index);
   }
 
   
index 697afea..08169d6 100644 (file)
@@ -110,7 +110,7 @@ public class SurfJNI {
   public final static native double Cpu_getAvailableSpeedSwigExplicitCpu(long jarg1, Cpu jarg1_);
   public final static native double Cpu_getPowerPeakAt(long jarg1, Cpu jarg1_, int jarg2);
   public final static native int Cpu_getNbPstates(long jarg1, Cpu jarg1_);
-  public final static native void Cpu_setPowerPeakAt(long jarg1, Cpu jarg1_, int jarg2);
+  public final static native void Cpu_setPstate(long jarg1, Cpu jarg1_, int jarg2);
   public final static native void Cpu_setState(long jarg1, Cpu jarg1_, int jarg2);
   public final static native void Cpu_director_connect(Cpu obj, long cptr, boolean mem_own, boolean weak_global);
   public final static native void Cpu_change_ownership(Cpu obj, long cptr, boolean take_or_release);
@@ -247,8 +247,8 @@ public class SurfJNI {
   public static int SwigDirector_Cpu_getNbPstates(Cpu self) {
     return self.getNbPstates();
   }
-  public static void SwigDirector_Cpu_setPowerPeakAt(Cpu self, int pstate_index) {
-    self.setPowerPeakAt(pstate_index);
+  public static void SwigDirector_Cpu_setPstate(Cpu self, int pstate_index) {
+    self.setPstate(pstate_index);
   }
   public static double SwigDirector_CpuAction_getRemains(CpuAction self) {
     return self.getRemains();
index 3890a89..e35cff6 100644 (file)
@@ -293,7 +293,7 @@ public:
   virtual double getAvailableSpeed();
   virtual double getPowerPeakAt(int pstate_index)=0;
   virtual int getNbPstates()=0;
-  virtual void setPowerPeakAt(int pstate_index)=0;
+  virtual void setPstate(int pstate_index)=0;
   void setState(e_surf_resource_state_t state);
 };
 
index 6a887bc..6aadfc3 100644 (file)
@@ -627,7 +627,7 @@ XBT_PUBLIC(int) surf_workstation_get_nb_pstates(surf_resource_t host);
  * @param host [description]
  * @param pstate_index [description]
  */
-XBT_PUBLIC(void) surf_workstation_set_power_peak_at(surf_resource_t host, int pstate_index);
+XBT_PUBLIC(void) surf_workstation_set_pstate(surf_resource_t host, int pstate_index);
 
 /**
  * @brief Get the consumed energy (in joules) of a workstation
index 6254436..bce361c 100644 (file)
@@ -377,7 +377,7 @@ double MSG_host_get_current_power_peak(msg_host_t host) {
  *
  * \param  host host to test
  */
-int MSG_host_get_pstate_count(msg_host_t host) {
+int MSG_host_get_nb_pstates(msg_host_t host) {
 
          xbt_assert((host != NULL), "Invalid parameters (host is NULL)");
          return (simcall_host_get_nb_pstates(host));
@@ -392,7 +392,7 @@ int MSG_host_get_pstate_count(msg_host_t host) {
 void MSG_host_set_pstate(msg_host_t host, int pstate_index) {
          xbt_assert((host != NULL), "Invalid parameters (host is NULL)");
 
-         simcall_host_set_power_peak_at(host, pstate_index);
+         simcall_host_set_pstate(host, pstate_index);
 }
 
 /** \ingroup m_host_management
index 0ff35b7..fb73b7a 100644 (file)
@@ -198,9 +198,9 @@ int simcall_host_get_nb_pstates(smx_host_t host)
  * \param host A SIMIX host
  * \param pstate_index The pstate to which the CPU power will be set
  */
-void simcall_host_set_power_peak_at(smx_host_t host, int pstate_index)
+void simcall_host_set_pstate(smx_host_t host, int pstate_index)
 {
-       simcall_BODY_host_set_power_peak_at(host, pstate_index);
+       simcall_BODY_host_set_pstate(host, pstate_index);
 }
 
 /**
index e551501..5ce8372 100644 (file)
@@ -177,16 +177,16 @@ static inline void simcall_host_get_nb_pstates__set__result(smx_simcall_t simcal
     simcall->result.i = result;
 }
 
-static inline smx_host_t simcall_host_set_power_peak_at__get__host(smx_simcall_t simcall) {
+static inline smx_host_t simcall_host_set_pstate__get__host(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[0].dp;
 }
-static inline void simcall_host_set_power_peak_at__set__host(smx_simcall_t simcall, void* arg) {
+static inline void simcall_host_set_pstate__set__host(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline int simcall_host_set_power_peak_at__get__pstate_index(smx_simcall_t simcall) {
+static inline int simcall_host_set_pstate__get__pstate_index(smx_simcall_t simcall) {
   return  simcall->args[1].i;
 }
-static inline void simcall_host_set_power_peak_at__set__pstate_index(smx_simcall_t simcall, int arg) {
+static inline void simcall_host_set_pstate__set__pstate_index(smx_simcall_t simcall, int arg) {
     simcall->args[1].i = arg;
 }
 
index a5fa70d..7c4ea3b 100644 (file)
@@ -291,14 +291,14 @@ inline static int simcall_BODY_host_get_nb_pstates(smx_host_t host) {
     return self->simcall.result.i;
   }
   
-inline static void simcall_BODY_host_set_power_peak_at(smx_host_t host, int pstate_index) {
+inline static void simcall_BODY_host_set_pstate(smx_host_t host, int pstate_index) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_host_set_power_peak_at(host, pstate_index);
+    if (0) SIMIX_host_set_pstate(host, pstate_index);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
-    self->simcall.call = SIMCALL_HOST_SET_POWER_PEAK_AT;
+    self->simcall.call = SIMCALL_HOST_SET_PSTATE;
     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
     memset(self->simcall.args, 0, sizeof(self->simcall.args));
     self->simcall.args[0].dp = (void*) host;
index 0a74ebf..0225d19 100644 (file)
@@ -31,7 +31,7 @@ typedef enum {
   SIMCALL_HOST_GET_CURRENT_POWER_PEAK,
   SIMCALL_HOST_GET_POWER_PEAK_AT,
   SIMCALL_HOST_GET_NB_PSTATES,
-  SIMCALL_HOST_SET_POWER_PEAK_AT,
+  SIMCALL_HOST_SET_PSTATE,
   SIMCALL_HOST_GET_CONSUMED_ENERGY,
   SIMCALL_HOST_EXECUTE,
   SIMCALL_HOST_PARALLEL_EXECUTE,
index f6bcfea..e34eae3 100644 (file)
@@ -35,7 +35,7 @@ const char* simcall_names[] = {
   [SIMCALL_HOST_GET_CURRENT_POWER_PEAK] = "SIMCALL_HOST_GET_CURRENT_POWER_PEAK",
   [SIMCALL_HOST_GET_POWER_PEAK_AT] = "SIMCALL_HOST_GET_POWER_PEAK_AT",
   [SIMCALL_HOST_GET_NB_PSTATES] = "SIMCALL_HOST_GET_NB_PSTATES",
-  [SIMCALL_HOST_SET_POWER_PEAK_AT] = "SIMCALL_HOST_SET_POWER_PEAK_AT",
+  [SIMCALL_HOST_SET_PSTATE] = "SIMCALL_HOST_SET_PSTATE",
   [SIMCALL_HOST_GET_CONSUMED_ENERGY] = "SIMCALL_HOST_GET_CONSUMED_ENERGY",
   [SIMCALL_HOST_EXECUTE] = "SIMCALL_HOST_EXECUTE",
   [SIMCALL_HOST_PARALLEL_EXECUTE] = "SIMCALL_HOST_PARALLEL_EXECUTE",
@@ -230,8 +230,8 @@ case SIMCALL_HOST_GET_NB_PSTATES:
       SIMIX_simcall_answer(simcall);
       break;  
 
-case SIMCALL_HOST_SET_POWER_PEAK_AT:
-       SIMIX_host_set_power_peak_at((smx_host_t) simcall->args[0].dp, simcall->args[1].i);
+case SIMCALL_HOST_SET_PSTATE:
+       SIMIX_host_set_pstate((smx_host_t) simcall->args[0].dp, simcall->args[1].i);
       SIMIX_simcall_answer(simcall);
       break;  
 
index 46ac4aa..1f4e7b9 100644 (file)
@@ -59,7 +59,7 @@ Func - host_get_state (int) (host, void*, smx_host_t)
 Func - host_get_current_power_peak (double) (host, void*, smx_host_t)
 Func - host_get_power_peak_at (double) (host, void*, smx_host_t) (pstate_index, int)
 Func - host_get_nb_pstates (int) (host, void*, smx_host_t)
-Proc - host_set_power_peak_at (void) (host, void*, smx_host_t) (pstate_index, int)
+Proc - host_set_pstate (void) (host, void*, smx_host_t) (pstate_index, int)
 Func - host_get_consumed_energy (double) (host, void*, smx_host_t)
 
 Func - host_execute (void*, smx_synchro_t) (name, const char*) (host, void*, smx_host_t) (flops_amount, double) (priority, double) (bound, double) (affinity_mask, unsigned long)
index 20e7abb..5126b2d 100644 (file)
@@ -232,10 +232,10 @@ int SIMIX_host_get_nb_pstates(smx_host_t host) {
 }
 
 
-void SIMIX_host_set_power_peak_at(smx_host_t host, int pstate_index) {
+void SIMIX_host_set_pstate(smx_host_t host, int pstate_index) {
          xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
 
-         surf_workstation_set_power_peak_at(host, pstate_index);
+         surf_workstation_set_pstate(host, pstate_index);
 }
 
 double SIMIX_host_get_consumed_energy(smx_host_t host) {
index f9c58eb..9c108af 100644 (file)
@@ -51,7 +51,7 @@ double SIMIX_host_get_current_power_peak(smx_host_t host);
 double SIMIX_host_get_power_peak_at(smx_host_t host, int pstate_index);
 int SIMIX_host_get_nb_pstates(smx_host_t host);
 double SIMIX_host_get_consumed_energy(smx_host_t host);
-void SIMIX_host_set_power_peak_at(smx_host_t host, int pstate_index);
+void SIMIX_host_set_pstate(smx_host_t host, int pstate_index);
 smx_synchro_t SIMIX_host_execute(const char *name,
     smx_host_t host, double flops_amount, double priority, double bound, unsigned long affinity_mask);
 smx_synchro_t SIMIX_host_parallel_execute(const char *name,
index 608bba4..395f84e 100644 (file)
@@ -46,9 +46,9 @@ int smpi_get_host_nb_pstates(void)
  *
  * \param pstate_index pstate to switch to
  */
-void smpi_set_host_power_peak_at(int pstate_index)
+void smpi_set_host_pstate(int pstate_index)
 {
-  simcall_host_set_power_peak_at(SIMIX_host_self(), pstate_index);
+  simcall_host_set_pstate(SIMIX_host_self(), pstate_index);
 }
 
 /**
@@ -96,10 +96,10 @@ integer smpi_get_host_nb_pstates_(void)
   return (integer)smpi_get_host_nb_pstates();
 }
 
-XBT_PUBLIC(void) smpi_set_host_power_peak_at_(integer *pstate_index);
-void smpi_set_host_power_peak_at_(integer *pstate_index)
+XBT_PUBLIC(void) smpi_set_host_pstate_(integer *pstate_index);
+void smpi_set_host_pstate_(integer *pstate_index)
 {
-  smpi_set_host_power_peak_at((int)*pstate_index);
+  smpi_set_host_pstate((int)*pstate_index);
 }
 
 XBT_PUBLIC(doublereal) smpi_get_host_consumed_energy_(void);
index 342c6e5..f5182c3 100644 (file)
@@ -341,14 +341,14 @@ int CpuCas01::getNbPstates()
   return xbt_dynar_length(p_powerPeakList);
 }
 
-void CpuCas01::setPowerPeakAt(int pstate_index)
+void CpuCas01::setPstate(int pstate_index)
 {
   xbt_dynar_t plist = p_powerPeakList;
   xbt_assert((pstate_index <= (int)xbt_dynar_length(plist)), "Invalid parameters (pstate index out of bounds)");
 
-  double new_power_peak = xbt_dynar_get_as(plist, pstate_index, double);
+  double new_pstate = xbt_dynar_get_as(plist, pstate_index, double);
   m_pstate = pstate_index;
-  m_powerPeak = new_power_peak;
+  m_powerPeak = new_pstate;
 }
 
 /**********
index 1973257..46e9caf 100644 (file)
@@ -58,7 +58,7 @@ public:
   double getCurrentPowerPeak();
   double getPowerPeakAt(int pstate_index);
   int getNbPstates();
-  void setPowerPeakAt(int pstate_index);
+  void setPstate(int pstate_index);
   bool isUsed();
   void setStateEvent(tmgr_trace_event_t stateEvent);
   void setPowerEvent(tmgr_trace_event_t stateEvent);
index c4bc20c..7e7ff09 100644 (file)
@@ -199,7 +199,7 @@ public:
 
   virtual int getNbPstates()=0;
 
-  virtual void setPowerPeakAt(int pstate_index)=0;
+  virtual void setPstate(int pstate_index)=0;
 
   void setState(e_surf_resource_state_t state);
 
index 83d176e..3cb1199 100644 (file)
@@ -139,7 +139,7 @@ public:
   double getCurrentPowerPeak() {THROW_UNIMPLEMENTED;};
   double getPowerPeakAt(int /*pstate_index*/) {THROW_UNIMPLEMENTED;};
   int getNbPstates() {THROW_UNIMPLEMENTED;};
-  void setPowerPeakAt(int /*pstate_index*/) {THROW_UNIMPLEMENTED;};
+  void setPstate(int /*pstate_index*/) {THROW_UNIMPLEMENTED;};
   void modified(bool modified);
 
   CpuTiTgmrPtr p_availTrace;       /*< Structure with data needed to integrate trace file */
index cb638c0..3387974 100644 (file)
@@ -356,8 +356,8 @@ int surf_workstation_get_nb_pstates(surf_resource_t resource){
   return get_casted_workstation(resource)->getNbPstates();
 }
 
-void surf_workstation_set_power_peak_at(surf_resource_t resource, int pstate_index){
-  return get_casted_workstation(resource)->setPowerPeakAt(pstate_index);
+void surf_workstation_set_pstate(surf_resource_t resource, int pstate_index){
+  return get_casted_workstation(resource)->setPstate(pstate_index);
 }
 
 double surf_workstation_get_consumed_energy(surf_resource_t resource){
index 6b021c5..3a5472b 100644 (file)
@@ -155,9 +155,9 @@ int Workstation::getNbPstates()
   return p_cpu->getNbPstates();
 }
 
-void Workstation::setPowerPeakAt(int pstate_index)
+void Workstation::setPstate(int pstate_index)
 {
-       p_cpu->setPowerPeakAt(pstate_index);
+       p_cpu->setPstate(pstate_index);
 }
 
 xbt_dict_t Workstation::getProperties()
index 13ccd60..4c39287 100644 (file)
@@ -237,7 +237,7 @@ public:
 
   virtual double getPowerPeakAt(int pstate_index);
   virtual int getNbPstates();
-  virtual void setPowerPeakAt(int pstate_index);
+  virtual void setPstate(int pstate_index);
 
   /**
    * @brief Return the storage of corresponding mount point
index db86aab..0904cf5 100644 (file)
@@ -443,7 +443,7 @@ int WorkstationL07::getNbPstates()
        return 0.0;
 }
 
-void WorkstationL07::setPowerPeakAt(int /*pstate_index*/)
+void WorkstationL07::setPstate(int /*pstate_index*/)
 {
        XBT_DEBUG("[ws_set_power_peak_at] Not implemented for workstation_ptask_L07");
 }
index 2b97f71..39cb5fe 100644 (file)
@@ -110,7 +110,7 @@ public:
   e_surf_resource_state_t getState();
   double getPowerPeakAt(int pstate_index);
   int getNbPstates();
-  void setPowerPeakAt(int pstate_index);
+  void setPstate(int pstate_index);
   double getConsumedEnergy();
 };
 
@@ -131,7 +131,7 @@ public:
   double getCurrentPowerPeak() {THROW_UNIMPLEMENTED;};
   double getPowerPeakAt(int /*pstate_index*/) {THROW_UNIMPLEMENTED;};
   int getNbPstates() {THROW_UNIMPLEMENTED;};
-  void setPowerPeakAt(int /*pstate_index*/) {THROW_UNIMPLEMENTED;};
+  void setPstate(int /*pstate_index*/) {THROW_UNIMPLEMENTED;};
   double getConsumedEnergy() {THROW_UNIMPLEMENTED;};
 };