A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Compile trace_mgr with g++. Next step: objectification
[simgrid.git]
/
src
/
simix
/
smx_host.cpp
diff --git
a/src/simix/smx_host.cpp
b/src/simix/smx_host.cpp
index
f0d4fdd
..
a47fa09
100644
(file)
--- a/
src/simix/smx_host.cpp
+++ b/
src/simix/smx_host.cpp
@@
-44,7
+44,7
@@
void SIMIX_host_on(sg_host_t h)
xbt_assert((host != NULL), "Invalid parameters");
xbt_assert((host != NULL), "Invalid parameters");
- if (h->is
O
ff()) {
+ if (h->is
_o
ff()) {
simgrid::surf::Host* surf_host = h->extension<simgrid::surf::Host>();
surf_host->turnOn();
simgrid::surf::Host* surf_host = h->extension<simgrid::surf::Host>();
surf_host->turnOn();
@@
-83,11
+83,6
@@
void SIMIX_host_on(sg_host_t h)
}
}
}
}
-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
*
/**
* \brief Stop the host if it is on
*
@@
-98,7
+93,7
@@
void SIMIX_host_off(sg_host_t h, smx_process_t issuer)
xbt_assert((host != NULL), "Invalid parameters");
xbt_assert((host != NULL), "Invalid parameters");
- if (h->is
O
n()) {
+ if (h->is
_o
n()) {
simgrid::surf::Host* surf_host = h->extension<simgrid::surf::Host>();
surf_host->turnOff();
simgrid::surf::Host* surf_host = h->extension<simgrid::surf::Host>();
surf_host->turnOff();
@@
-111,7
+106,7
@@
void SIMIX_host_off(sg_host_t h, smx_process_t issuer)
}
}
} else {
}
}
} else {
- XBT_INFO("Host %s is already off",h->
getN
ame().c_str());
+ XBT_INFO("Host %s is already off",h->
n
ame().c_str());
}
}
}
}
@@
-163,7
+158,7
@@
const char* SIMIX_host_self_get_name(void)
if (host == NULL || SIMIX_process_self() == simix_global->maestro_process)
return "";
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)
}
void _SIMIX_host_free_process_arg(void *data)
@@
-339,9
+334,11
@@
smx_synchro_t SIMIX_process_parallel_execute(const char *name,
/* 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. */
/* 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++) {
for (i = 1; i < host_nb; i++) {
- surf_host_model_t ws_model_tmp = surf_host_get_model(host_list[i]);
+ 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;
if (ws_model_tmp != ws_model) {
XBT_CRITICAL("mixing VMs and PMs is not supported");
DIE_IMPOSSIBLE;
@@
-351,7
+348,7
@@
smx_synchro_t SIMIX_process_parallel_execute(const char *name,
/* set surf's synchro */
if (!MC_is_active() && !MC_record_replay_is_active()) {
synchro->execution.surf_exec =
/* 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);
host_nb, host_list_cpy, flops_amount, bytes_amount, rate);
synchro->execution.surf_exec->setData(synchro);
@@
-478,7
+475,7
@@
void SIMIX_execution_finish(smx_synchro_t synchro)
(int)synchro->state);
}
/* check if the host is down */
(int)synchro->state);
}
/* check if the host is down */
- if (simcall->issuer->host->is
O
ff()) {
+ if (simcall->issuer->host->is
_o
ff()) {
simcall->issuer->context->iwannadie = 1;
}
simcall->issuer->context->iwannadie = 1;
}
@@
-496,7
+493,7
@@
void SIMIX_post_host_execute(smx_synchro_t synchro)
{
if (synchro->type == SIMIX_SYNC_EXECUTE && /* FIMXE: handle resource failure
* for parallel tasks too */
{
if (synchro->type == SIMIX_SYNC_EXECUTE && /* FIMXE: handle resource failure
* for parallel tasks too */
- synchro->execution.host->is
O
ff()) {
+ synchro->execution.host->is
_o
ff()) {
/* 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;
/* 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;