xbt_assert((host != NULL), "Invalid parameters");
- if (h->isOff()) {
+ if (h->is_off()) {
simgrid::surf::Host* surf_host = h->extension<simgrid::surf::Host>();
surf_host->turnOn();
}
}
-void simcall_HANDLER_host_off(smx_simcall_t simcall, sg_host_t h)
-{
- SIMIX_host_off(h, simcall->issuer);
-}
-
/**
* \brief Stop the host if it is on
*
xbt_assert((host != NULL), "Invalid parameters");
- if (h->isOn()) {
+ if (h->is_on()) {
simgrid::surf::Host* surf_host = h->extension<simgrid::surf::Host>();
surf_host->turnOff();
}
}
} else {
- XBT_INFO("Host %s is already off",h->getName().c_str());
+ XBT_INFO("Host %s is already off",h->name().c_str());
}
}
if (host == NULL || SIMIX_process_self() == simix_global->maestro_process)
return "";
- return SIMIX_host_get_name(host);
+ return sg_host_get_name(host);
}
void _SIMIX_host_free_process_arg(void *data)
/* FIXME: what happens if host_list contains VMs and PMs. If
* execute_parallel_task() does not change the state of the model, we can mix
* them. */
- surf_host_model_t ws_model = surf_host_get_model(host_list[0]);
+ surf_host_model_t ws_model =
+ host_list[0]->extension<simgrid::surf::Host>()->getModel();
for (i = 1; i < host_nb; i++) {
- surf_host_model_t ws_model_tmp = surf_host_get_model(host_list[0]);
+ surf_host_model_t ws_model_tmp =
+ host_list[i]->extension<simgrid::surf::Host>()->getModel();
if (ws_model_tmp != ws_model) {
XBT_CRITICAL("mixing VMs and PMs is not supported");
DIE_IMPOSSIBLE;
/* set surf's synchro */
if (!MC_is_active() && !MC_record_replay_is_active()) {
synchro->execution.surf_exec =
- surf_host_model_execute_parallel_task(surf_host_model,
+ surf_host_model->executeParallelTask(
host_nb, host_list_cpy, flops_amount, bytes_amount, rate);
synchro->execution.surf_exec->setData(synchro);
(int)synchro->state);
}
/* check if the host is down */
- if (simcall->issuer->host->isOff()) {
+ if (simcall->issuer->host->is_off()) {
simcall->issuer->context->iwannadie = 1;
}
{
if (synchro->type == SIMIX_SYNC_EXECUTE && /* FIMXE: handle resource failure
* for parallel tasks too */
- synchro->execution.host->isOff()) {
+ synchro->execution.host->is_off()) {
/* If the host running the synchro failed, notice it so that the asking
* process can be killed if it runs on that host itself */
synchro->state = SIMIX_FAILED;
synchro->comm.surf_comm->setCategory(category);
}
}
-
-/**
- * \brief Function to get the parameters of the given the SIMIX host.
- *
- * \param host the host to get_phys_host (a sg_host_t)
- * \param param the parameter object space to be overwritten (a ws_params_t)
- */
-void SIMIX_host_get_params(sg_host_t ind_vm, vm_params_t params)
-{
- ind_vm->extension<simgrid::surf::Host>()->getParams(params);
-}
-
-void SIMIX_host_set_params(sg_host_t ind_vm, vm_params_t params)
-{
- ind_vm->extension<simgrid::surf::Host>()->setParams(params);
-}
-
-xbt_dict_t SIMIX_host_get_mounted_storage_list(sg_host_t host)
-{
- xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
- return host->extension<simgrid::surf::Host>()->getMountedStorageList();
-}
-
-xbt_dynar_t SIMIX_host_get_attached_storage_list(sg_host_t host)
-{
- xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
- return host->extension<simgrid::surf::Host>()->getAttachedStorageList();
-}