Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
bypass simix in simcall to surf::Cpu::setPState
authorMartin Quinson <martin.quinson@loria.fr>
Sat, 9 Jan 2016 23:26:22 +0000 (00:26 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Sat, 9 Jan 2016 23:26:22 +0000 (00:26 +0100)
src/include/surf/surf.h
src/simgrid/host.cpp
src/simix/smx_host.cpp
src/simix/smx_host_private.h
src/surf/surf_c_bindings.cpp

index 25e8a47..279955a 100644 (file)
@@ -450,7 +450,6 @@ XBT_PUBLIC(double) surf_host_get_current_power_peak(sg_host_t host);
  */
 XBT_PUBLIC(double) surf_host_get_power_peak_at(sg_host_t host, int pstate_index);
 
  */
 XBT_PUBLIC(double) surf_host_get_power_peak_at(sg_host_t host, int pstate_index);
 
-XBT_PUBLIC(void) surf_host_set_pstate(sg_host_t host, int pstate_index);
 XBT_PUBLIC(double) surf_host_get_wattmin_at(sg_host_t resource, int pstate);
 XBT_PUBLIC(double) surf_host_get_wattmax_at(sg_host_t resource, int pstate);
 
 XBT_PUBLIC(double) surf_host_get_wattmin_at(sg_host_t resource, int pstate);
 XBT_PUBLIC(double) surf_host_get_wattmax_at(sg_host_t resource, int pstate);
 
index c5c4823..61de103 100644 (file)
@@ -251,8 +251,9 @@ Host* Host::by_name_or_create(const char* name)
 /** Set the pstate at which the host should run */
 void Host::setPstate(int pstate_index)
 {
 /** Set the pstate at which the host should run */
 void Host::setPstate(int pstate_index)
 {
-  simgrid::simix::kernel(
-    std::bind(SIMIX_host_set_pstate, this, pstate_index));
+  simgrid::simix::kernel(std::bind(
+      &simgrid::surf::Cpu::setPState, p_cpu, pstate_index
+  ));
 }
 
 /** Get the amount of watt dissipated at the given pstate when the host is idling */
 }
 
 /** Get the amount of watt dissipated at the given pstate when the host is idling */
index a6c4cb9..34d253e 100644 (file)
@@ -186,9 +186,6 @@ double SIMIX_host_get_power_peak_at(sg_host_t host, int pstate_index) {
          return surf_host_get_power_peak_at(host, pstate_index);
 }
 
          return surf_host_get_power_peak_at(host, pstate_index);
 }
 
-void SIMIX_host_set_pstate(sg_host_t host, int pstate_index) {
-         surf_host_set_pstate(host, pstate_index);
-}
 double SIMIX_host_get_wattmin_at(sg_host_t host,int pstate) {
          return surf_host_get_wattmin_at(host,pstate);
 }
 double SIMIX_host_get_wattmin_at(sg_host_t host,int pstate) {
          return surf_host_get_wattmin_at(host,pstate);
 }
index a0b132c..5d25ef4 100644 (file)
@@ -43,7 +43,6 @@ XBT_PRIVATE double SIMIX_host_get_current_power_peak(sg_host_t host);
 XBT_PRIVATE double SIMIX_host_get_power_peak_at(sg_host_t host, int pstate_index);
 XBT_PRIVATE double SIMIX_host_get_wattmin_at(sg_host_t host,int pstate);
 XBT_PRIVATE double SIMIX_host_get_wattmax_at(sg_host_t host,int pstate);
 XBT_PRIVATE double SIMIX_host_get_power_peak_at(sg_host_t host, int pstate_index);
 XBT_PRIVATE double SIMIX_host_get_wattmin_at(sg_host_t host,int pstate);
 XBT_PRIVATE double SIMIX_host_get_wattmax_at(sg_host_t host,int pstate);
-XBT_PRIVATE void SIMIX_host_set_pstate(sg_host_t host, int pstate_index);
 XBT_PRIVATE smx_synchro_t SIMIX_process_execute(smx_process_t issuer, const char *name,
     double flops_amount, double priority, double bound, unsigned long affinity_mask);
 XBT_PRIVATE smx_synchro_t SIMIX_process_parallel_execute(const char *name,
 XBT_PRIVATE smx_synchro_t SIMIX_process_execute(smx_process_t issuer, const char *name,
     double flops_amount, double priority, double bound, unsigned long affinity_mask);
 XBT_PRIVATE smx_synchro_t SIMIX_process_parallel_execute(const char *name,
index a683814..d1907c6 100644 (file)
@@ -267,10 +267,6 @@ double surf_host_get_power_peak_at(sg_host_t host, int pstate_index){
   return host->p_cpu->getPowerPeakAt(pstate_index);
 }
 
   return host->p_cpu->getPowerPeakAt(pstate_index);
 }
 
-void surf_host_set_pstate(sg_host_t host, int pstate_index){
-  host->p_cpu->setPState(pstate_index);
-}
-
 using simgrid::energy::HostEnergy;
 using simgrid::energy::surf_energy;
 
 using simgrid::energy::HostEnergy;
 using simgrid::energy::surf_energy;