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
Merge branch 'master' of github.com:mquinson/simgrid
[simgrid.git]
/
src
/
simix
/
smx_network.c
diff --git
a/src/simix/smx_network.c
b/src/simix/smx_network.c
index
fbeb548
..
a671d9f
100644
(file)
--- a/
src/simix/smx_network.c
+++ b/
src/simix/smx_network.c
@@
-616,7
+616,7
@@
void simcall_HANDLER_comm_wait(smx_simcall_t simcall, smx_synchro_t synchro, dou
if (synchro->state != SIMIX_WAITING && synchro->state != SIMIX_RUNNING) {
SIMIX_comm_finish(synchro);
} else { /* if (timeout >= 0) { we need a surf sleep action even when there is no timeout, otherwise surf won't tell us when the host fails */
if (synchro->state != SIMIX_WAITING && synchro->state != SIMIX_RUNNING) {
SIMIX_comm_finish(synchro);
} else { /* if (timeout >= 0) { we need a surf sleep action even when there is no timeout, otherwise surf won't tell us when the host fails */
- sleep = surf_
workstation
_sleep(simcall->issuer->smx_host, timeout);
+ sleep = surf_
host
_sleep(simcall->issuer->smx_host, timeout);
surf_action_set_data(sleep, synchro);
if (simcall->issuer == synchro->comm.src_proc)
surf_action_set_data(sleep, synchro);
if (simcall->issuer == synchro->comm.src_proc)
@@
-733,7
+733,7
@@
static XBT_INLINE void SIMIX_comm_start(smx_synchro_t synchro)
XBT_DEBUG("Starting communication %p from '%s' to '%s'", synchro,
SIMIX_host_get_name(sender), SIMIX_host_get_name(receiver));
XBT_DEBUG("Starting communication %p from '%s' to '%s'", synchro,
SIMIX_host_get_name(sender), SIMIX_host_get_name(receiver));
- synchro->comm.surf_comm = surf_
workstation_model_communicate(surf_workstation
_model,
+ synchro->comm.surf_comm = surf_
host_model_communicate(surf_host
_model,
sender, receiver,
synchro->comm.task_size, synchro->comm.rate);
sender, receiver,
synchro->comm.task_size, synchro->comm.rate);
@@
-777,7
+777,6
@@
void SIMIX_comm_finish(smx_synchro_t synchro)
unsigned int destroy_count = 0;
smx_simcall_t simcall;
unsigned int destroy_count = 0;
smx_simcall_t simcall;
-
while ((simcall = xbt_fifo_shift(synchro->simcalls))) {
/* If a waitany simcall is waiting for this synchro to finish, then remove
while ((simcall = xbt_fifo_shift(synchro->simcalls))) {
/* If a waitany simcall is waiting for this synchro to finish, then remove
@@
-800,6
+799,13
@@
void SIMIX_comm_finish(smx_synchro_t synchro)
XBT_DEBUG("SIMIX_comm_finish: synchro state = %d", (int)synchro->state);
/* Check out for errors */
XBT_DEBUG("SIMIX_comm_finish: synchro state = %d", (int)synchro->state);
/* Check out for errors */
+
+ if (surf_host_get_state(surf_host_resource_priv(
+ simcall->issuer->smx_host)) != SURF_RESOURCE_ON) {
+ simcall->issuer->context->iwannadie = 1;
+ SMX_EXCEPTION(simcall->issuer, host_error, 0, "Host failed");
+ } else
+
switch (synchro->state) {
case SIMIX_DONE:
switch (synchro->state) {
case SIMIX_DONE:
@@
-834,6
+840,7
@@
void SIMIX_comm_finish(smx_synchro_t synchro)
break;
case SIMIX_LINK_FAILURE:
break;
case SIMIX_LINK_FAILURE:
+
XBT_DEBUG("Link failure in synchro %p between '%s' and '%s': posting an exception to the issuer: %s (%p) detached:%d",
synchro,
synchro->comm.src_proc ? sg_host_name(synchro->comm.src_proc->smx_host) : NULL,
XBT_DEBUG("Link failure in synchro %p between '%s' and '%s': posting an exception to the issuer: %s (%p) detached:%d",
synchro,
synchro->comm.src_proc ? sg_host_name(synchro->comm.src_proc->smx_host) : NULL,
@@
-872,7
+879,7
@@
void SIMIX_comm_finish(smx_synchro_t synchro)
}
}
}
}
- if (surf_
resource_get_state(surf_workstation
_resource_priv(simcall->issuer->smx_host)) != SURF_RESOURCE_ON) {
+ if (surf_
host_get_state(surf_host
_resource_priv(simcall->issuer->smx_host)) != SURF_RESOURCE_ON) {
simcall->issuer->context->iwannadie = 1;
}
simcall->issuer->context->iwannadie = 1;
}