- New: MSG_process_ref/unref(). Fiddle with the process refcounting.
- Renamed MSG_energy_plugin_init() -> MSG_host_energy_plugin_init()
to make room for the upcoming network energy plugin.
+ - Drop MSG_host_get_current_power_peak: dupplicates MSG_host_get_speed
Java
- Ensure that an actor can kill itself with Process::exit()
- s4u::Host::onSpeedChange: when the pstate is changed, or when an
event from the availability_file changes the avail speed.
- Links are now usable from s4u
+ - Drop Host::getPstateSpeedCurrent() which dupplicates Host::speed()
SimDag
- Backwards Compatibility breaks
> [MyHost2:dvfs_test:(3) 1.000000] [java/INFO] Current power peak=2.0E7
> [MyHost1:dvfs_test:(2) 6.000000] [java/INFO] Task2 simulation time: 5.0
> [MyHost1:dvfs_test:(2) 6.000000] [java/INFO] Count of Processor states=3
+> [MyHost1:dvfs_test:(2) 6.000000] [java/INFO] Current power peak=2.0E7
> [MyHost2:dvfs_test:(3) 6.000000] [java/INFO] Task2 simulation time: 5.0
> [MyHost2:dvfs_test:(3) 6.000000] [java/INFO] Count of Processor states=3
-> [MyHost1:dvfs_test:(2) 6.000000] [java/INFO] Current power peak=2.0E7
> [MyHost2:dvfs_test:(3) 6.000000] [java/INFO] Current power peak=2.0E7
> [6.000000] [surf_energy/INFO] Total energy consumption: 1890.000000 Joules (used hosts: 1290.000000 Joules; unused/idle hosts: 600.000000)
> [6.000000] [java/INFO] MSG_main finished; Cleaning up the simulation...
$ ${bindir:=.}/energy-pstate/energy-pstate$EXEEXT ${srcdir:=.}/../platforms/energy_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
> [ 0.000000] (1:dvfs_test@MyHost1) Count of Processor states=3
-> [ 0.000000] (2:dvfs_test@MyHost2) Count of Processor states=3
> [ 0.000000] (1:dvfs_test@MyHost1) Current power peak=100000000.000000
+> [ 0.000000] (2:dvfs_test@MyHost2) Count of Processor states=3
> [ 0.000000] (2:dvfs_test@MyHost2) Current power peak=100000000.000000
> [ 1.000000] (1:dvfs_test@MyHost1) Task1 simulation time: 1.000000e+00
> [ 1.000000] (2:dvfs_test@MyHost2) Task1 simulation time: 1.000000e+00
> [ 1.000000] (2:dvfs_test@MyHost2) Current power peak=20000000.000000
> [ 6.000000] (1:dvfs_test@MyHost1) Task2 simulation time: 5.000000e+00
> [ 6.000000] (1:dvfs_test@MyHost1) Count of Processor states=3
+> [ 6.000000] (1:dvfs_test@MyHost1) Current power peak=20000000.000000
> [ 6.000000] (2:dvfs_test@MyHost2) Task2 simulation time: 5.000000e+00
> [ 6.000000] (2:dvfs_test@MyHost2) Count of Processor states=3
-> [ 6.000000] (1:dvfs_test@MyHost1) Current power peak=20000000.000000
> [ 6.000000] (2:dvfs_test@MyHost2) Current power peak=20000000.000000
> [ 6.000000] (0:maestro@) Total simulation time: 6.000000e+00
$ ${bindir:=.}/energy-pstate/energy-pstate$EXEEXT ${srcdir:=.}/../platforms/energy_cluster.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
> [ 0.000000] (1:dvfs_test@MyHost1) Count of Processor states=3
-> [ 0.000000] (2:dvfs_test@MyHost2) Count of Processor states=3
> [ 0.000000] (1:dvfs_test@MyHost1) Current power peak=100000000.000000
+> [ 0.000000] (2:dvfs_test@MyHost2) Count of Processor states=3
> [ 0.000000] (2:dvfs_test@MyHost2) Current power peak=100000000.000000
> [ 1.000000] (1:dvfs_test@MyHost1) Task1 simulation time: 1.000000e+00
> [ 1.000000] (2:dvfs_test@MyHost2) Task1 simulation time: 1.000000e+00
> [ 1.000000] (2:dvfs_test@MyHost2) Current power peak=20000000.000000
> [ 6.000000] (1:dvfs_test@MyHost1) Task2 simulation time: 5.000000e+00
> [ 6.000000] (1:dvfs_test@MyHost1) Count of Processor states=3
+> [ 6.000000] (1:dvfs_test@MyHost1) Current power peak=20000000.000000
> [ 6.000000] (2:dvfs_test@MyHost2) Task2 simulation time: 5.000000e+00
> [ 6.000000] (2:dvfs_test@MyHost2) Count of Processor states=3
-> [ 6.000000] (1:dvfs_test@MyHost1) Current power peak=20000000.000000
> [ 6.000000] (2:dvfs_test@MyHost2) Current power peak=20000000.000000
> [ 6.000000] (0:maestro@) Total simulation time: 6.000000e+00
XBT_PUBLIC(int) MSG_host_is_on(msg_host_t h);
XBT_PUBLIC(int) MSG_host_is_off(msg_host_t h);
-// deprecated
-XBT_PUBLIC(double) MSG_get_host_speed(msg_host_t h);
-
+XBT_PUBLIC(double) MSG_get_host_speed(msg_host_t h); /* deprecated */
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);
+#define MSG_host_get_current_power_peak(h) MSG_host_get_speed(h) /* deprecated */
XBT_PUBLIC(int) MSG_host_get_nb_pstates(msg_host_t h);
-#define MSG_host_get_pstate(h) sg_host_get_pstate(h)
-#define MSG_host_set_pstate(h, pstate) sg_host_set_pstate(h, pstate)
+#define MSG_host_get_pstate(h) sg_host_get_pstate(h) /* deprecated */
+#define MSG_host_set_pstate(h, pstate) sg_host_set_pstate(h, pstate) /* deprecated */
XBT_PUBLIC(xbt_dynar_t) MSG_hosts_as_dynar();
XBT_PUBLIC(int) MSG_get_host_number();
XBT_PUBLIC(xbt_dict_t) MSG_host_get_mounted_storage_list(msg_host_t host);
const char*property(const char*key);
void setProperty(const char*key, const char *value);
xbt_swag_t processes();
- double getPstateSpeedCurrent();
double getPstateSpeed(int pstate_index);
int pstatesCount() const;
void setPstate(int pstate_index);
return host->getPstateSpeed(pstate_index);
}
-/** \ingroup m_host_management
- * \brief Return the current speed of the processor (in flop/s)
- *
- * \param host host to test
- * \return Returns the current processor speed
- */
-double MSG_host_get_current_power_peak(msg_host_t host) {
- xbt_assert((host != nullptr), "Invalid parameters (host is nullptr)");
- return host->getPstateSpeedCurrent();
-}
-
/** \ingroup m_host_management
* \brief Return the total count of pstates defined for a host. See also @ref SURF_plugin_energy.
*
});
}
-/** Get the peak power of a host */
-double Host::getPstateSpeedCurrent()
-{
- return simgrid::simix::kernelImmediate([this] {
- return this->pimpl_cpu->getPstateSpeedCurrent();
- });
-}
-
-/** Get one power peak (in flops/s) of a host at a given pstate */
+/** @brief Get the peak processor speed (in flops/s), at the specified pstate */
double Host::getPstateSpeed(int pstate_index)
{
return simgrid::simix::kernelImmediate([this, pstate_index] {
});
}
-/** @brief Get the speed of the cpu associated to a host */
+/** @brief Get the peak processor speed (in flops/s), at the current pstate */
double Host::speed() {
return pimpl_cpu->getSpeed(1.0);
}
+
/** @brief Returns the number of core of the processor. */
int Host::coreCount() {
return pimpl_cpu->coreCount();
*/
double smpi_get_host_current_power_peak()
{
- return SIMIX_host_self()->getPstateSpeedCurrent();
+ return SIMIX_host_self()->speed();
}
/**
Cpu::~Cpu() = default;
-/** @brief The amount of flop per second that this CPU can compute at its current DVFS level */
-double Cpu::getPstateSpeedCurrent()
-{
- return speed_.peak;
-}
-
int Cpu::getNbPStates()
{
return speedPerPstate_.size();
virtual double getAvailableSpeed();
/** @brief Get the current Cpu computational speed */
- virtual double getPstateSpeedCurrent();
virtual double getPstateSpeed(int pstate_index);
virtual int getNbPStates();
speed = PJ_type_variable_new ("power", nullptr, container->type);
}
- double current_speed_state = host.getPstateSpeedCurrent();
+ double current_speed_state = host.speed();
new_pajeSetVariable (0, container, speed, current_speed_state);
}
if (TRACE_uncategorized()){
double start_time = this->last_updated;
double finish_time = surf_get_clock();
double cpu_load;
- double current_speed = host->pimpl_cpu->getPstateSpeedCurrent();
+ double current_speed = host->speed();
if (current_speed <= 0)
// Some users declare a pstate of speed 0 flops (e.g., to model boot time).
// We consider that the machine is then fully loaded. That's arbitrary but it avoids a NaN