-/* $Id$ */
-
-/* Copyright (c) 2002,2003,2004 Arnaud Legrand. All rights reserved. */
+/* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team.
+ * 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. */
int master(int argc, char *argv[]);
int slave(int argc, char *argv[]);
int forwarder(int argc, char *argv[]);
-MSG_error_t test_all(const char *platform_file, const char *application_file);
+MSG_error_t test_all(const char *platform_file,
+ const char *application_file);
typedef enum {
PORT_22 = 0,
double task_comp_size = 0;
double task_comm_size = 0;
-
int i;
xbt_assert1(sscanf(argv[1], "%d", &number_of_tasks),
for (i = 0; i < number_of_tasks; i++) {
sprintf(sprintf_buffer, "Task_%d", i);
todo[i] =
- MSG_task_create(sprintf_buffer, task_comp_size, task_comm_size, NULL);
+ MSG_task_create(sprintf_buffer, task_comp_size, task_comm_size,
+ NULL);
}
}
}
INFO0
- ("All tasks have been dispatched. Let's tell everybody the computation is over.");
- for (i = 0; i < slaves_count; i++)
- MSG_task_put(MSG_task_create("finalize", 0, 0, FINALIZE),
- slaves[i], PORT_22);
+ ("All tasks have been dispatched. Let's tell everybody the computation is over.");
+ for (i = 0; i < slaves_count; i++) {
+ m_task_t finalize = MSG_task_create("finalize", 0, 0, FINALIZE);
+ MSG_task_put(finalize, slaves[i], PORT_22);
+ }
INFO0("Goodbye now!");
free(slaves);
INFO1("Received \"%s\"", MSG_task_get_name(task));
if (MSG_task_get_data(task) == FINALIZE) {
INFO0
- ("All tasks have been dispatched. Let's tell everybody the computation is over.");
+ ("All tasks have been dispatched. Let's tell everybody the computation is over.");
for (i = 0; i < slaves_count; i++)
MSG_task_put(MSG_task_create("finalize", 0, 0, FINALIZE),
slaves[i], PORT_22);
} /* end_of_forwarder */
/** Test function */
-MSG_error_t test_all(const char *platform_file, const char *application_file)
+MSG_error_t test_all(const char *platform_file,
+ const char *application_file)
{
MSG_error_t res = MSG_OK;
- /* MSG_config("surf_workstation_model","KCCFLN05"); */
+ /* MSG_config("workstation/model","KCCFLN05"); */
{ /* Simulation setting */
MSG_set_channel_number(MAX_CHANNEL);
MSG_create_environment(platform_file);