-#include "msg/msg.h" /* Yeah! If you want to use msg, you
- need to include msg/msg.h */
-#include "xbt/sysdep.h" /* calloc, printf */
+#include "msg/msg.h" /* Yeah! If you want to use msg, you
+ need to include msg/msg.h */
+#include "xbt/sysdep.h" /* calloc, printf */
/* Create a log channel to have nice outputs. */
#include "xbt/log.h"
#include "xbt/asserts.h"
XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test,
/* Create a log channel to have nice outputs. */
#include "xbt/log.h"
#include "xbt/asserts.h"
XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test,
int execute(int argc, char *argv[]);
int redistribute(int argc, char *argv[]);
int execute(int argc, char *argv[]);
int redistribute(int argc, char *argv[]);
for (i = 1; i <= host_list_size; i++) {
m_host_list[i - 1] = MSG_get_host_by_name(argv[i]);
xbt_assert1(m_host_list[i - 1] != NULL,
for (i = 1; i <= host_list_size; i++) {
m_host_list[i - 1] = MSG_get_host_by_name(argv[i]);
xbt_assert1(m_host_list[i - 1] != NULL,
}
xbt_assert1(sscanf(argv[argc - 2], "%lg", &computation_amount),
}
xbt_assert1(sscanf(argv[argc - 2], "%lg", &computation_amount),
xbt_assert1(sscanf(argv[argc - 1], "%lg", &communication_amount),
xbt_assert1(sscanf(argv[argc - 1], "%lg", &communication_amount),
for (i = 0; i < host_list_size; i++) {
computation_duration[i] = computation_amount / host_list_size;
for (j = 0; j < host_list_size; j++)
for (i = 0; i < host_list_size; i++) {
computation_duration[i] = computation_amount / host_list_size;
for (j = 0; j < host_list_size; j++)
- communication_table[i * host_list_size + j] =
- communication_amount / (host_list_size * host_list_size);
+ communication_table[i * host_list_size + j] =
+ communication_amount / (host_list_size * host_list_size);
}
sprintf(buffer, "redist#0\n");
task = MSG_parallel_task_create(buffer,
}
sprintf(buffer, "redist#0\n");
task = MSG_parallel_task_create(buffer,
for (i = 1; i <= host_list_size; i++) {
m_host_list[i - 1] = MSG_get_host_by_name(argv[i]);
xbt_assert1(m_host_list[i - 1] != NULL,
for (i = 1; i <= host_list_size; i++) {
m_host_list[i - 1] = MSG_get_host_by_name(argv[i]);
xbt_assert1(m_host_list[i - 1] != NULL,
}
xbt_assert1(sscanf(argv[argc - 1], "%lg", &communication_amount),
}
xbt_assert1(sscanf(argv[argc - 1], "%lg", &communication_amount),
- communication_table[i * host_list_size + j] =
- communication_amount / (host_list_size * host_list_size);
+ communication_table[i * host_list_size + j] =
+ communication_amount / (host_list_size * host_list_size);
}
sprintf(buffer, "redist#0\n");
task = MSG_parallel_task_create(buffer,
}
sprintf(buffer, "redist#0\n");
task = MSG_parallel_task_create(buffer,
/* Application deployment */
MSG_function_register("execute", execute);
MSG_function_register("redistribute", redistribute);
MSG_launch_application(application_file);
/* Application deployment */
MSG_function_register("execute", execute);
MSG_function_register("redistribute", redistribute);
MSG_launch_application(application_file);