]> AND Private Git Repository - loba.git/blob - options.h
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
Display load average and standard deviation at the end.
[loba.git] / options.h
1 #ifndef OPTIONS_H
2 #define OPTIONS_H
3
4 #include <string>
5 #include "cost_func.h"
6 #include "deployment.h"
7 #include "named_object_list.h"
8 #include "process.h"
9
10 // Global parameters, shared by all the processes
11 namespace opt {
12
13     // Constants
14     extern const double load_ratio_threshold;
15
16     // Global options
17     extern std::string program_name;
18     extern int help_requested;
19     extern bool version_requested;
20
21     // Simulation parameters
22     extern unsigned log_rate;
23
24     // Platform and deployment
25     extern std::string platform_file;
26     extern std::string deployment_file;
27
28     // Automatic deployment
29     namespace auto_depl {
30         extern bool        enabled;
31         extern std::string topology;
32         extern unsigned    nhosts;
33         extern double      load;
34     }
35
36     // Load balancing algorithm
37     extern std::string loba_algo;
38     extern bool bookkeeping;
39
40     // Application parameters
41     extern cost_func comp_cost;
42     extern cost_func comm_cost;
43     extern unsigned maxiter;
44     extern bool exit_on_close;
45
46     // Named parameters lists
47     extern struct loba_algorithms_type:
48         public named_object_list2<process, int, char** > {
49             loba_algorithms_type();
50     } loba_algorithms;
51
52     extern struct topologies_type:
53         public named_object_list<deployment_generator> {
54             topologies_type();
55     } topologies;
56
57     // Utility functions
58     int parse_args(int* argc, char* argv[]);
59     void print();
60     void usage();
61
62 } // namespace opt
63
64 #endif // !OPTIONS_H
65
66 // Local variables:
67 // mode: c++
68 // End: