- 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()
- 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
- 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++
* - <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.
*
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);
// 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);
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,
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
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());
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);
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,
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
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);
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);
}
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);
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();
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);
};
* @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
*
* \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));
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
* \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);
}
/**
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;
}
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;
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,
[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",
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;
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)
}
-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) {
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,
*
* \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);
}
/**
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);
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;
}
/**********
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);
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);
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 */
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){
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()
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
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");
}
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();
};
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;};
};