X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d0392de9a3c0fbe9065924ca323d78c99ed03c7c..23976cb525fd51c66ef8e1234cdc5626fca83990:/examples/msg/trace-masterworker/trace-masterworker.c diff --git a/examples/msg/trace-masterworker/trace-masterworker.c b/examples/msg/trace-masterworker/trace-masterworker.c index ee5ffca02d..abe6badfa0 100644 --- a/examples/msg/trace-masterworker/trace-masterworker.c +++ b/examples/msg/trace-masterworker/trace-masterworker.c @@ -1,19 +1,8 @@ -/* Copyright (c) 2010-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2010-2016. 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. */ -/** @addtogroup MSG_examples - * - * - Master/Worker: trace-masterworker/trace-masterworker.c This is an augmented version of our basic - * master/worker example. It uses several tracing functions that enable the tracing of categorized resource - * utilization, the use of trace marks, and user variables associated to the hosts of the platform file. You might - * want to run this program with the following configuration options: - * --cfg=tracing/categorized:yes, --cfg=tracing/uncategorized:yes, - * --cfg=viva/categorized:viva_cat.plist, and --cfg=viva/uncategorized:viva_uncat.plist. - */ - #include "simgrid/msg.h" XBT_LOG_NEW_DEFAULT_CATEGORY(msg_trace_masterworker, "Messages specific for this msg example"); @@ -29,8 +18,7 @@ static int master(int argc, char *argv[]) TRACE_host_variable_set(MSG_host_get_name(MSG_host_self()), "is_master", 1); TRACE_mark("msmark", "start_send_tasks"); - int i; - for (i = 0; i < number_of_tasks; i++) { + for (int i = 0; i < number_of_tasks; i++) { msg_task_t task = NULL; task = MSG_task_create("task", task_comp_size, task_comm_size, NULL); @@ -44,7 +32,7 @@ static int master(int argc, char *argv[]) } TRACE_mark("msmark", "finish_send_tasks"); - for (i = 0; i < workers_count; i++) { + for (int i = 0; i < workers_count; i++) { msg_task_t finalize = MSG_task_create("finalize", 0, 0, 0); MSG_task_set_category(finalize, "finalize"); MSG_task_send(finalize, "master_mailbox");