X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/26ba0ceb642e7e45fdf416ea0fe264583ffd27bf..ba7ceb6bb4bbcfed5106581edeab7fea90c8e26c:/examples/msg/tracing/user_variables.c diff --git a/examples/msg/tracing/user_variables.c b/examples/msg/tracing/user_variables.c index 5a3255bc14..b338130b8d 100644 --- a/examples/msg/tracing/user_variables.c +++ b/examples/msg/tracing/user_variables.c @@ -6,26 +6,18 @@ /** @addtogroup MSG_examples * - * - tracing/user_variables.c: This program demonstrates how to - * trace user variables associated to the hosts of the platform file. - * You might want to run this program with the following parameters: + * - tracing/user_variables.c: This program demonstrates how to trace user variables associated to the hosts of + * the platform file. You might want to run this program with the following parameters: * --cfg=tracing:yes * --cfg=tracing/platform:yes * (See \ref tracing_tracing_options for details) */ -#include #include "simgrid/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, "Messages specific for this msg example"); -int master(int argc, char *argv[]); - -int master(int argc, char *argv[]) +static int master(int argc, char *argv[]) { const char *hostname = MSG_host_get_name(MSG_host_self()); int i; @@ -56,7 +48,6 @@ int master(int argc, char *argv[]) return 0; } -/** Main function */ int main(int argc, char *argv[]) { MSG_init(&argc, argv); @@ -65,9 +56,7 @@ int main(int argc, char *argv[]) exit(1); } - char *platform_file = argv[1]; - char *deployment_file = argv[2]; - MSG_create_environment(platform_file); + MSG_create_environment(argv[1]); //declaring user variables TRACE_host_variable_declare("HDD_capacity"); @@ -76,7 +65,7 @@ int main(int argc, char *argv[]) //register functions and launch deployment MSG_function_register("master", master); MSG_function_register("slave", master); - MSG_launch_application(deployment_file); + MSG_launch_application(argv[2]); MSG_main();