Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
further improve the MSG doc by documenting the examples
[simgrid.git] / examples / msg / tracing / trace_platform.c
1 /* Copyright (c) 2010. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 /** @addtogroup MSG_examples
8  * 
9  * - <b>tracing/trace_platform.c</b>: Demonstrates how to trace the platform
10  */
11
12 #include <stdio.h>
13 #include "msg/msg.h"
14 #include "xbt/sysdep.h"         /* calloc, printf */
15
16 #include "xbt/log.h"
17 #include "xbt/asserts.h"
18 XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example");
19
20 /** Main function */
21 int main(int argc, char *argv[])
22 {
23   MSG_global_init(&argc, argv);
24   if (argc < 2) {
25     printf("Usage: %s platform_file\n", argv[0]);
26     exit(1);
27   }
28
29   char *platform_file = argv[1];
30   MSG_create_environment(platform_file);
31   MSG_main();
32   MSG_clean();
33   return 0;
34 }