argv[0] = xbt_strdup(slavename);
argv[1] = bprintf("%d",i);
argv[2] = NULL;
- msg_vm_t vm = MSG_vm_start(slaves[i],2);
+
+ char vmName[64];
+ snprintf(vmName, 64, "vm_%d", i);
+
+ msg_vm_t vm = MSG_vm_start(slaves[i],vmName,2);
MSG_vm_bind(vm, MSG_process_create_with_arguments(slavename,slave_fun,NULL,slaves[i],2,argv));
}
res = MSG_main();
XBT_INFO("Simulation time %g", MSG_get_clock());
- MSG_clean();
free(hosts);
free(hostnames);
xbt_dynar_free(&hosts_dynar);
XBT_PUBLIC(void) MSG_init_nocheck(int *argc, char **argv);
XBT_PUBLIC(msg_error_t) MSG_main(void);
- XBT_PUBLIC(msg_error_t) MSG_clean(void);
XBT_PUBLIC(void) MSG_function_register(const char *name,
xbt_main_func_t code);
XBT_PUBLIC(void) MSG_function_register_default(xbt_main_func_t code);
#define MSG_process_change_host(h) MSG_process_migrate(MSG_process_self(),h);
XBT_PUBLIC(msg_error_t) MSG_get_errno(void);
+ XBT_PUBLIC(msg_error_t) MSG_clean(void);
+
XBT_PUBLIC(msg_error_t) MSG_task_get(msg_task_t * task, m_channel_t channel);
XBT_PUBLIC(msg_error_t) MSG_task_get_with_timeout(msg_task_t * task,
m_channel_t channel,
XBT_PUBLIC(int) MSG_get_channel_number(void);
#endif
-#include "instr/instr.h"
-
/** @brief Opaque type describing a Virtual Machine.
* @ingroup msg_VMs
*
* Usual lack of guaranty of any kind applies here, and is even increased.
*
*/
-typedef struct msg_vm *msg_vm_t;
/* This function should not be called directly, but rather from MSG_vm_start_from_template that does not exist yet*/
-XBT_PUBLIC(msg_vm_t) MSG_vm_start(msg_host_t location, int coreAmount);
+XBT_PUBLIC(msg_vm_t) MSG_vm_start(msg_host_t location, const char *name, int coreAmount);
XBT_PUBLIC(int) MSG_vm_is_suspended(msg_vm_t);
XBT_PUBLIC(int) MSG_vm_is_running(msg_vm_t);
xbt_dynar_t<msg_vm_t> MSG_vm_get_list_from_hosts(msg_dynar_t<msg_host_t>)
+ des fonctions de filtrage sur les dynar
*/
+#include "instr/instr.h"
+
/* ****************************************************************************************** */