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
Check that a host is available before launching a process.
[simgrid.git]
/
src
/
simix
/
smx_process.c
diff --git
a/src/simix/smx_process.c
b/src/simix/smx_process.c
index
eb7799f
..
0dad0f0
100644
(file)
--- a/
src/simix/smx_process.c
+++ b/
src/simix/smx_process.c
@@
-58,10
+58,17
@@
smx_process_t SIMIX_process_create(const char *name,
const char *hostname, int argc,
char **argv, xbt_dict_t properties)
{
const char *hostname, int argc,
char **argv, xbt_dict_t properties)
{
- smx_simdata_process_t simdata =
xbt_new0(s_smx_simdata_process_t, 1)
;
- smx_process_t process =
xbt_new0(s_smx_process_t, 1)
;
+ smx_simdata_process_t simdata =
NULL
;
+ smx_process_t process =
NULL
;
smx_process_t self = NULL;
smx_host_t host = SIMIX_host_get_by_name(hostname);
smx_process_t self = NULL;
smx_host_t host = SIMIX_host_get_by_name(hostname);
+
+ if (!SIMIX_host_get_state(host)) {
+ WARN2("Cannot launch process '%s' on failed host '%s'", name, hostname);
+ return NULL;
+ }
+ simdata = xbt_new0(s_smx_simdata_process_t, 1);
+ process = xbt_new0(s_smx_process_t, 1);
/*char alias[MAX_ALIAS_NAME + 1] = {0};
msg_mailbox_t mailbox; */
/*char alias[MAX_ALIAS_NAME + 1] = {0};
msg_mailbox_t mailbox; */