* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <stdio.h>
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <stdio.h>
#include "xbt/sysdep.h" /* calloc, printf */
/* Create a log channel to have nice outputs. */
#include "xbt/sysdep.h" /* calloc, printf */
/* Create a log channel to have nice outputs. */
XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test,
"Messages specific for this msg example");
XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test,
"Messages specific for this msg example");
XBT_INFO("create %s on PM(%s)", vm_name, MSG_host_get_name(pm));
msg_vm_t vm = MSG_vm_create_core(pm, vm_name);
XBT_INFO("create %s on PM(%s)", vm_name, MSG_host_get_name(pm));
msg_vm_t vm = MSG_vm_create_core(pm, vm_name);
memset(¶ms, 0, sizeof(params));
params.ramsize = 1L * 1024 * 1024 * 1024; // 1Gbytes
MSG_host_set_params(vm, ¶ms);
memset(¶ms, 0, sizeof(params));
params.ramsize = 1L * 1024 * 1024 * 1024; // 1Gbytes
MSG_host_set_params(vm, ¶ms);
XBT_INFO("# Shutdown the half of worker processes gracefuly. The remaining half will be forcibly killed.");
for (i = 0; i < nb_workers; i++) {
XBT_INFO("# Shutdown the half of worker processes gracefuly. The remaining half will be forcibly killed.");
for (i = 0; i < nb_workers; i++) {
msg_task_t finalize = MSG_task_create("finalize", 0, 0, 0);
MSG_task_send(finalize, mbox);
}
msg_task_t finalize = MSG_task_create("finalize", 0, 0, 0);
MSG_task_send(finalize, mbox);
}
int worker_fun(int argc, char *argv[])
{
const char *pr_name = MSG_process_get_name(MSG_process_self());
int worker_fun(int argc, char *argv[])
{
const char *pr_name = MSG_process_get_name(MSG_process_self());