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
reactivate expception raising on host failure
[simgrid.git]
/
src
/
simix
/
smx_host.c
diff --git
a/src/simix/smx_host.c
b/src/simix/smx_host.c
index
c113725
..
a168ccf
100644
(file)
--- a/
src/simix/smx_host.c
+++ b/
src/simix/smx_host.c
@@
-1,4
+1,4
@@
-/* Copyright (c) 2007-201
2
. The SimGrid Team.
+/* Copyright (c) 2007-201
3
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
@@
-34,8
+34,8
@@
smx_host_t SIMIX_host_create(const char *name,
/* Update global variables */
xbt_lib_set(host_lib,name,SIMIX_HOST_LEVEL,smx_host);
/* Update global variables */
xbt_lib_set(host_lib,name,SIMIX_HOST_LEVEL,smx_host);
-
- return xbt_lib_get_
elm_or_null(host_lib, name
);
+
+ return xbt_lib_get_
or_null(host_lib, name, SIMIX_HOST_LEVEL
);
}
/**
}
/**
@@
-322,7
+322,10
@@
void SIMIX_host_restart_processes(smx_host_t host)
{
unsigned int cpt;
smx_process_arg_t arg;
{
unsigned int cpt;
smx_process_arg_t arg;
- xbt_dynar_foreach(SIMIX_host_priv(host)->auto_restart_processes,cpt,arg) {
+ xbt_dynar_t process_list = SIMIX_host_priv(host)->auto_restart_processes;
+ if(!process_list) return;
+
+ xbt_dynar_foreach(process_list,cpt,arg) {
smx_process_t process;
smx_process_t process;
@@
-353,7
+356,7
@@
void SIMIX_host_restart_processes(smx_host_t host)
}
}
}
}
- xbt_dynar_reset(
SIMIX_host_priv(host)->auto_restart_processes
);
+ xbt_dynar_reset(
process_list
);
}
void SIMIX_host_autorestart(smx_host_t host)
}
void SIMIX_host_autorestart(smx_host_t host)
@@
-552,7
+555,7
@@
void SIMIX_execution_finish(smx_action_t action)
case SIMIX_FAILED:
XBT_DEBUG("SIMIX_execution_finished: host '%s' failed", sg_host_name(simcall->issuer->smx_host));
simcall->issuer->context->iwannadie = 1;
case SIMIX_FAILED:
XBT_DEBUG("SIMIX_execution_finished: host '%s' failed", sg_host_name(simcall->issuer->smx_host));
simcall->issuer->context->iwannadie = 1;
-
//
SMX_EXCEPTION(simcall->issuer, host_error, 0, "Host failed");
+ SMX_EXCEPTION(simcall->issuer, host_error, 0, "Host failed");
break;
case SIMIX_CANCELED:
break;
case SIMIX_CANCELED:
@@
-623,10
+626,10
@@
void SIMIX_set_category(smx_action_t action, const char *category)
}
#endif
}
#endif
-xbt_d
ynar
_t SIMIX_pre_host_get_storage_list(smx_simcall_t simcall, smx_host_t host){
+xbt_d
ict
_t SIMIX_pre_host_get_storage_list(smx_simcall_t simcall, smx_host_t host){
return SIMIX_host_get_storage_list(host);
}
return SIMIX_host_get_storage_list(host);
}
-xbt_d
ynar
_t SIMIX_host_get_storage_list(smx_host_t host){
+xbt_d
ict
_t SIMIX_host_get_storage_list(smx_host_t host){
xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
return surf_workstation_model->extension.workstation.get_storage_list(host);
xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
return surf_workstation_model->extension.workstation.get_storage_list(host);