X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/2f810149832a2d855c33d0df5b02d736c2081e41..a6f00a784a0d052de2001804276ceee8e43a6334:/examples/msg/masterslave/masterslave_arg.c diff --git a/examples/msg/masterslave/masterslave_arg.c b/examples/msg/masterslave/masterslave_arg.c index 1fc804fe71..58c7d7b90c 100644 --- a/examples/msg/masterslave/masterslave_arg.c +++ b/examples/msg/masterslave/masterslave_arg.c @@ -102,7 +102,6 @@ int main(int argc, char *argv[]) exit(1); } - MSG_set_channel_number(0); MSG_function_register("master", master); MSG_function_register("slave", slave); @@ -110,10 +109,12 @@ int main(int argc, char *argv[]) number_of_jobs = atol(argv[2]); number_of_slaves = atol(argv[3]); - long number_max = MSG_get_host_number(); - XBT_INFO("Got %ld slaves, %ld tasks to process, and %d hosts", number_of_slaves, number_of_jobs,MSG_get_host_number()); + xbt_dynar_t host_dynar = MSG_hosts_as_dynar(); + long number_max = xbt_dynar_length(host_dynar); + XBT_INFO("Got %ld slaves, %ld tasks to process, and %ld hosts", number_of_slaves, number_of_jobs,number_max); - m_host_t *host_table = MSG_get_host_table(); + m_host_t *host_table = xbt_dynar_to_array(host_dynar); + //xbt_dynar_free(&host_dynar); MSG_process_create( "master", master,