- XBT_INFO("Number of host '%d'",nb_hosts);
- for(i = 0 ; i<nb_hosts; i++)
- {
- char* name_host = bprintf("%d",i);
- MSG_process_create( name_host, host, NULL, xbt_dynar_get_as(hosts,i,msg_host_t) );
+ XBT_INFO("Number of host '%d'",MSG_get_host_number());
+ xbt_dynar_foreach (hosts, i, h){
+ char* name_host = bprintf("%u",i);
+ MSG_process_create(name_host, host, NULL, h);