4 #include <csignal> // std::sig_atomic_t
7 #include "named_object_list.h"
9 // These classes may use include options.h, so make forward declarations
10 class deployment_generator;
13 // Global parameters, shared by all the processes
17 extern const double load_ratio_threshold;
20 extern std::string program_name;
21 extern int help_requested;
22 extern bool version_requested;
23 extern int option_x; // hidden option (int), for testing
24 extern double option_X; // hidden option (double), for testing
26 // Simulation parameters
28 extern volatile std::sig_atomic_t exit_request;
30 // Platform and deployment
31 extern std::string platform_file;
32 extern std::string deployment_file;
34 // Automatic deployment
37 extern std::string topology;
38 extern unsigned nhosts;
40 extern bool random_distribution;
41 extern unsigned long random_seed;
44 // Load balancing algorithm
45 extern std::string loba_algo;
46 extern bool bookkeeping;
47 extern bool egocentric;
48 extern double min_transfer_amount;
49 extern double max_transfer_amount;
50 extern double min_lb_iter_duration;
51 extern bool integer_transfer;
52 extern unsigned loba_best_divisor;
54 // Application parameters
55 extern cost_func comp_cost;
56 extern cost_func comm_cost;
57 extern double min_comp_iter_duration;
58 extern unsigned comp_iter_delay;
59 extern double comp_time_delay;
61 // Parameters for the end of the simulation
62 extern double avg_load_ratio;
63 extern unsigned lb_maxiter;
64 extern unsigned comp_maxiter;
65 extern double time_limit;
66 extern int exit_on_convergence;
67 extern bool exit_on_close;
69 // Named parameters lists
70 extern struct loba_algorithms_type:
71 public named_object_list2<process, int, char** > {
72 loba_algorithms_type();
75 extern struct topologies_type:
76 public named_object_list<deployment_generator> {
81 bool parse_args(int* argc, char* argv[]);