X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ae6b6e727bc0b3b7726f48fbac4449c3a9c479a2..b9684d3607aa558c95b7185ddf147b478a7e367f:/src/surf/sg_platf.cpp diff --git a/src/surf/sg_platf.cpp b/src/surf/sg_platf.cpp index c675e25805..7b85965e5d 100644 --- a/src/surf/sg_platf.cpp +++ b/src/surf/sg_platf.cpp @@ -237,12 +237,9 @@ void sg_platf_new_link(sg_platf_link_cbarg_t link){ void sg_platf_new_cluster(sg_platf_cluster_cbarg_t cluster) { using simgrid::routing::AsCluster; - using simgrid::routing::AsClusterTorus; - using simgrid::routing::AsClusterFatTree; - using simgrid::routing::AsCluster; - using simgrid::routing::AsClusterTorus; using simgrid::routing::AsClusterDragonfly; using simgrid::routing::AsClusterFatTree; + using simgrid::routing::AsClusterTorus; int rankId=0; @@ -573,14 +570,14 @@ void sg_platf_new_process(sg_platf_process_cbarg_t process) msg->data[msg->used-3]='\0'; xbt_die("%s", msg->data); } - xbt_main_func_t parse_code = SIMIX_get_registered_function(process->function); - xbt_assert(parse_code, "Function '%s' unknown", process->function); + simgrid::simix::ActorCodeFactory& factory = SIMIX_get_actor_code_factory(process->function); + xbt_assert(factory, "Function '%s' unknown", process->function); double start_time = process->start_time; double kill_time = process->kill_time; int auto_restart = process->on_failure == SURF_PROCESS_ON_FAILURE_DIE ? 0 : 1; - std::function code = simgrid::xbt::wrapMain(parse_code, process->argc, process->argv); + std::function code = factory(simgrid::xbt::args(process->argc, process->argv)); smx_process_arg_t arg = nullptr; smx_process_t process_created = nullptr;