-/* Copyright (c) 2007, 2009, 2010. The SimGrid Team.
+/* Copyright (c) 2007, 2009-2013. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
arg->name = (char*)(process->argv)[0];
arg->code = parse_code;
arg->data = NULL;
- arg->hostname = host->name;
+ arg->hostname = sg_host_name(host);
arg->argc = process->argc;
arg->argv = (char**)(process->argv);
arg->kill_time = kill_time;
arg->hostname, start_time);
SIMIX_timer_set(start_time, &SIMIX_process_create_from_wrapper, arg);
} else { // start_time <= SIMIX_get_clock()
- XBT_DEBUG("Starting Process %s(%s) right now", process->argv[0], host->name);
+ XBT_DEBUG("Starting Process %s(%s) right now", process->argv[0], sg_host_name(host));
if (simix_global->create_process_function)
simix_global->create_process_function(&process_created,
(char*)(process->argv)[0],
parse_code,
NULL,
- host->name,
+ sg_host_name(host),
kill_time,
process->argc,
(char**)(process->argv),
current_property_set,
auto_restart);
else
- simcall_process_create(&process_created, (char*)(process->argv)[0], parse_code, NULL, host->name, kill_time, process->argc,
+ simcall_process_create(&process_created, (char*)(process->argv)[0], parse_code, NULL, sg_host_name(host), kill_time, process->argc,
(char**)process->argv, current_property_set,auto_restart);
/* verify if process has been created (won't be the case if the host is currently dead, but that's fine) */
*/
void SIMIX_launch_application(const char *file)
{
- xbt_ex_t e;
-
_XBT_GNUC_UNUSED int parse_status;
xbt_assert(simix_global,
"SIMIX_global_init has to be called before SIMIX_launch_application.");
parse_status = surf_parse();
surf_parse_close();
xbt_assert(!parse_status, "Parse error at %s:%d", file,surf_parse_lineno);
- } CATCH(e) {
+ }
+ CATCH_ANONYMOUS {
XBT_ERROR("Unrecoverable error at %s:%d. The full exception stack follows, in case it helps you to diagnose the problem.",
file, surf_parse_lineno);
RETHROW;
smx_host_t host = SIMIX_host_get_by_name(process_host);
if (!host)
THROWF(arg_error, 0, "Host '%s' unknown", process_host);
- process.host = host->name;
+ process.host = sg_host_name(host);
process.argc = 1 + xbt_dynar_length(arguments);
process.argv = (const char**)xbt_new(char *, process.argc + 1);