double task1_remain_prev = MSG_task_get_flops_amount(task1);
{
- const double cpu_speed = MSG_get_host_speed(pm0);
+ const double cpu_speed = MSG_host_get_speed(pm0);
int i = 0;
for (i = 0; i < 10; i++) {
double new_bound = (cpu_speed / 10) * i;
static void test_one_task(msg_host_t hostA)
{
- const double cpu_speed = MSG_get_host_speed(hostA);
+ const double cpu_speed = MSG_host_get_speed(hostA);
const double computation_amount = cpu_speed * 10;
const char *hostA_name = MSG_host_get_name(hostA);
static void test_two_tasks(msg_host_t hostA, msg_host_t hostB)
{
- const double cpu_speed = MSG_get_host_speed(hostA);
- xbt_assert(cpu_speed == MSG_get_host_speed(hostB));
+ const double cpu_speed = MSG_host_get_speed(hostA);
+ xbt_assert(cpu_speed == MSG_host_get_speed(hostB));
const double computation_amount = cpu_speed * 10;
const char *hostA_name = MSG_host_get_name(hostA);
const char *hostB_name = MSG_host_get_name(hostB);
{
msg_host_t vm0 = MSG_vm_create_core(pm0, "VM0");
- const double cpu_speed = MSG_get_host_speed(pm0);
+ const double cpu_speed = MSG_host_get_speed(pm0);
MSG_vm_set_bound(vm0, cpu_speed / 10);
MSG_vm_start(vm0);
MSG_host_set_params(vm0, ¶ms);
MSG_vm_start(vm0);
- const double cpu_speed = MSG_get_host_speed(pm0);
+ const double cpu_speed = MSG_host_get_speed(pm0);
MSG_vm_start(vm0);
XBT_INFO("# 10. Test migration");
msg_host_t pm2 = xbt_dynar_get_as(hosts_dynar, 2, msg_host_t);
XBT_INFO("%s: %d core(s), %f flops/s per each", MSG_host_get_name(pm0), MSG_host_get_core_number(pm0),
- MSG_get_host_speed(pm0));
+ MSG_host_get_speed(pm0));
XBT_INFO("%s: %d core(s), %f flops/s per each", MSG_host_get_name(pm1), MSG_host_get_core_number(pm1),
- MSG_get_host_speed(pm1));
+ MSG_host_get_speed(pm1));
XBT_INFO("%s: %d core(s), %f flops/s per each", MSG_host_get_name(pm2), MSG_host_get_core_number(pm2),
- MSG_get_host_speed(pm2));
+ MSG_host_get_speed(pm2));
MSG_process_create("master", master_main, NULL, pm0);
hosts = MSG_hosts_as_dynar();
xbt_dynar_foreach(hosts, i, host){
- XBT_INFO("Host '%s' runs at %.0f flops/s",MSG_host_get_name(host), MSG_get_host_speed(host));
+ XBT_INFO("Host '%s' runs at %.0f flops/s",MSG_host_get_name(host), MSG_host_get_speed(host));
}
MSG_launch_application(argv[2]);
XBT_PUBLIC(void) MSG_host_on(msg_host_t host);
XBT_PUBLIC(void) MSG_host_off(msg_host_t host);
XBT_PUBLIC(msg_host_t) MSG_host_self(void);
-XBT_PUBLIC(double) MSG_get_host_speed(msg_host_t h);
+XBT_PUBLIC(double) MSG_host_get_speed(msg_host_t h);
XBT_PUBLIC(int) MSG_host_get_core_number(msg_host_t h);
XBT_PUBLIC(xbt_swag_t) MSG_host_get_process_list(msg_host_t h);
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_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_nb_pstates(msg_host_t h);
return -1;
}
- return (jdouble) MSG_get_host_speed(host);
+ return (jdouble) MSG_host_get_speed(host);
}
JNIEXPORT jdouble JNICALL
/** \ingroup m_host_management
* \brief Return the speed of the processor (in flop/s), regardless of the current load on the machine.
*/
-double MSG_get_host_speed(msg_host_t host) {
+double MSG_host_get_speed(msg_host_t host) {
return host->speed();
}
+/** \ingroup m_host_management
+ * \brief Return the speed of the processor (in flop/s), regardless of the current load on the machine.
+ * Deprecated: use MSG_host_get_speed
+ */
+double MSG_get_host_speed(msg_host_t host) {
+ XBT_WARN("MSG_get_host_speed is deprecated: use MSG_host_get_speed");
+ return MSG_host_get_speed(host);
+}
+
+
/** \ingroup m_host_management
* \brief Return the number of cores.
*
{
/* For the moment, intensity_rate is the percentage against the migration
* bandwidth */
- double host_speed = MSG_get_host_speed(pm);
+ double host_speed = MSG_host_get_speed(pm);
double update_speed = ((double)dp_intensity/100) * mig_netspeed;
msg_vm_t vm = MSG_vm_create_core(pm, name);