X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/60dfbf03645430333993376b5bc0f567ec417b38..c714798d5c146946f9ccce06da87bc1707b2de2d:/teshsuite/simdag/platforms/basic_tracing.c diff --git a/teshsuite/simdag/platforms/basic_tracing.c b/teshsuite/simdag/platforms/basic_tracing.c index 10bb847641..293aa6e8ad 100644 --- a/teshsuite/simdag/platforms/basic_tracing.c +++ b/teshsuite/simdag/platforms/basic_tracing.c @@ -23,10 +23,15 @@ int host(int argc, char *argv[]) int main(int argc, char **argv) { int res; + xbt_dynar_t all_hosts; + m_host_t first_host; MSG_global_init(&argc, argv); MSG_create_environment(argv[1]); MSG_function_register("host", host); - MSG_process_create( "host", host, NULL, MSG_get_host_table()[0] ); + all_hosts = MSG_hosts_as_dynar(); + first_host = xbt_dynar_pop_as(all_hosts,m_host_t); + MSG_process_create( "host", host, NULL, first_host); + xbt_dynar_free(&all_hosts); res = MSG_main(); XBT_INFO("Simulation time %g", MSG_get_clock());