Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
2933c33bb93ca5298d9c6021d5e8d2017e8a0777
[simgrid.git] / examples / c / app-chainsend / chainsend.c
1 /* Copyright (c) 2007-2021. 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 #include "chainsend.h"
8
9 XBT_LOG_NEW_DEFAULT_CATEGORY(chainsend, "Messages specific for chainsend");
10
11 int main(int argc, char* argv[])
12 {
13   simgrid_init(&argc, argv);
14
15   simgrid_load_platform(argv[1]);
16
17   /* Trace categories */
18   TRACE_category_with_color("host0", "0 0 1");
19   TRACE_category_with_color("host1", "0 1 0");
20   TRACE_category_with_color("host2", "0 1 1");
21   TRACE_category_with_color("host3", "1 0 0");
22   TRACE_category_with_color("host4", "1 0 1");
23   TRACE_category_with_color("host5", "0 0 0");
24   TRACE_category_with_color("host6", "1 1 0");
25   TRACE_category_with_color("host7", "1 1 1");
26   TRACE_category_with_color("host8", "0 1 0");
27
28   /*   Application deployment */
29   simgrid_register_function("broadcaster", broadcaster);
30   simgrid_register_function("peer", peer);
31
32   simgrid_load_deployment(argv[2]);
33
34   simgrid_run();
35   XBT_INFO("Total simulation time: %e", simgrid_get_clock());
36
37   return 0;
38 }