Ejemplo n.º 1
0
/*** CPU burning */
void gras_cpu_burn(double flops)
{
  smx_action_t execution;

  if (flops > 0){
    execution = SIMIX_req_host_execute("task", SIMIX_host_self(), flops, 1);
    SIMIX_req_host_execution_wait(execution);
  }
}
Ejemplo n.º 2
0
void smpi_execute_flops(double flops) {
  smx_action_t action;
  smx_host_t host;
  host = SIMIX_host_self();

  XBT_DEBUG("Handle real computation time: %f flops", flops);
  action = simcall_host_execute("computation", host, flops, 1);
#ifdef HAVE_TRACING
  simcall_set_category (action, TRACE_internal_smpi_get_category());
#endif
  simcall_host_execution_wait(action);
}
Ejemplo n.º 3
0
/**
 * \brief Return the total energy consumed by a host (in Joules)
 *
 * \return Returns the consumed energy
 */
double smpi_get_host_consumed_energy() {
  return sg_host_get_consumed_energy(SIMIX_host_self());
}
Ejemplo n.º 4
0
/** @brief Gets the pstate at which the processor currently running */
int smpi_get_host_pstate() {
  return sg_host_get_pstate(SIMIX_host_self());
}
Ejemplo n.º 5
0
/**
 * \brief Sets the pstate at which the processor should run
 *
 * \param pstate_index pstate to switch to
 */
void smpi_set_host_pstate(int pstate_index)
{
  sg_host_set_pstate(SIMIX_host_self(), pstate_index);
}
Ejemplo n.º 6
0
/**
 * \brief Return the number of pstates defined for the current host
 */
int smpi_get_host_nb_pstates()
{
  return sg_host_get_nb_pstates(SIMIX_host_self());
}
Ejemplo n.º 7
0
/**
 * \brief Return the current speed of the processor (in flop/s)
 *
 * \return Returns the current processor speed
 */
double smpi_get_host_current_power_peak()
{
  return SIMIX_host_self()->getPstateSpeedCurrent();
}
Ejemplo n.º 8
0
/**
 * \brief Return the speed of the processor (in flop/s) at a given pstate
 *
 * \param pstate_index pstate to test
 * \return Returns the processor speed associated with pstate_index
 */
double smpi_get_host_power_peak_at(int pstate_index)
{
  return SIMIX_host_self()->getPstateSpeed(pstate_index);
}
Ejemplo n.º 9
0
/**
 * \brief Return the current speed of the processor (in flop/s)
 *
 * \return Returns the current processor speed
 */
double smpi_get_host_current_power_peak(void)
{
  return SIMIX_host_self()->currentPowerPeak();
}
Ejemplo n.º 10
0
/**
 * \brief Return the speed of the processor (in flop/s) at a given pstate
 *
 * \param pstate_index pstate to test
 * \return Returns the processor speed associated with pstate_index
 */
double smpi_get_host_power_peak_at(int pstate_index)
{
  return SIMIX_host_self()->powerPeakAt(pstate_index);
}
Ejemplo n.º 11
0
/**
 * \brief Return the current speed of the processor (in flop/s)
 *
 * \return Returns the current processor speed
 */
double smpi_get_host_current_power_peak(void)
{
  return simcall_host_get_current_power_peak(SIMIX_host_self());
}
Ejemplo n.º 12
0
/**
 * \brief Return the speed of the processor (in flop/s) at a given pstate
 *
 * \param pstate_index pstate to test
 * \return Returns the processor speed associated with pstate_index
 */
double smpi_get_host_power_peak_at(int pstate_index)
{
  return simcall_host_get_power_peak_at(SIMIX_host_self(), pstate_index);
}