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

Private GIT Repository
Allow changing communicator::send_count_before_flush at run-time.
[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 comp_maxiter;
44     extern unsigned lb_maxiter;
45     extern bool exit_on_close;
46
47     // Named parameters lists
48     extern struct loba_algorithms_type:
49         public named_object_list2<process, int, char** > {
50             loba_algorithms_type();
51     } loba_algorithms;
52
53     extern struct topologies_type:
54         public named_object_list<deployment_generator> {
55             topologies_type();
56     } topologies;
57
58     // Utility functions
59     bool parse_args(int* argc, char* argv[]);
60     void print();
61     void usage();
62
63 } // namespace opt
64
65 #endif // !OPTIONS_H
66
67 // Local variables:
68 // mode: c++
69 // End: