config_def.h 5.51 KB
Newer Older
1
/*
Julita Corbalan's avatar
Julita Corbalan committed
2
*
3
* This program is part of the EAR software.
Julita Corbalan's avatar
Julita Corbalan committed
4
*
5
6
7
* EAR provides a dynamic, transparent and ligth-weigth solution for
* Energy management. It has been developed in the context of the
* Barcelona Supercomputing Center (BSC)&Lenovo Collaboration project.
Julita Corbalan's avatar
Julita Corbalan committed
8
*
9
10
11
* Copyright © 2017-present BSC-Lenovo
* BSC Contact   mailto:ear-support@bsc.es
* Lenovo contact  mailto:hpchelp@lenovo.com
Julita Corbalan's avatar
Julita Corbalan committed
12
*
13
14
15
* This file is licensed under both the BSD-3 license for individual/non-commercial
* use and EPL-1.0 license for commercial use. Full text of both licenses can be
* found in COPYING.BSD and COPYING.EPL files.
Julita Corbalan's avatar
Julita Corbalan committed
16
17
18
19
20
*/

#ifndef EAR_CONFIG_DEF_H
#define EAR_CONFIG_DEF_H

Lluis Alonso's avatar
Lluis Alonso committed
21
22
23
24
25
26
27
28
29
30
31
32

/* LOADER definitions */
#define INTEL_EXT 	"so"
#define OPENMPI_EXT "ompi.so"
#define CUDA_EXT		"gen.so"
#define OPENMP_EXT	"gen.so"
#define DEF_EXT			"gen.so"

// Maximum number of tries when doing non-blocking communications
#define MAX_SOCKET_COMM_TRIES   1000000
//
#define EARDBD_TYPES            7
Julita Corbalan's avatar
Julita Corbalan committed
33
34
35
36
37
38
39
40
41
42
/* These flags configures EARL */
/* When set to 1, turbo is allowed */
#define USE_TURBO							0
/* When set to 1, frequency is set to default when a new loop starts.
 * Otherwise, the current frequency is used till the policy is applied */
#define RESET_FREQ							0
/* These three values are used to configure what is considered valid power
 * values. AVG power less than MIN_SIG_POWER or greather than MAX_SIG_POWER
 * generates a warning and a syslog message when activated. Values greather
 * than MAX_ERROR_POWER are considered an error and not reported into the DB */
43
#define MIN_SIG_POWER                       30.0
Lluis Alonso's avatar
Lluis Alonso committed
44
#define MAX_SIG_POWER                       700.0
Julita Corbalan's avatar
Julita Corbalan committed
45
46
#define MAX_ERROR_POWER                     1000.0
#define MAX_TEMP							150
Lluis Alonso's avatar
Lluis Alonso committed
47
48
#define MAX_POWER_CAP					0
#define DEF_POWER_CAP					-1
49
#define POWER_CAP_TYPE				"node"
Julita Corbalan's avatar
Julita Corbalan committed
50

Lluis Alonso's avatar
Lluis Alonso committed
51
52
53
/* When set to 1, powercap events will be reported to database */
#define REPORT_POWERCAP             0

Julita Corbalan's avatar
Julita Corbalan committed
54
55
56
57
58
59
60
61
62
63
64
/* These definitions affects to the output generated by services EAR services
 * When set to 1, some warning messages and written at syslog explicitly */
#define SYSLOG_MSG							1
/* When set to 1, verbose,debug, and error output is sent to eargmd.log file
 * stored at EAR_TMP */
#define EARGMD_FILE_LOG						1
/* When set to 1, verbose,debug, and error output is sent to eard.log file
 * stored at EAR_TMP */
#define EARD_FILE_LOG						1
/** These definitions affects DB configuration */
/* When set to 1, loops signatures are not reported to the DB to save space */
Lluis Alonso's avatar
Lluis Alonso committed
65
#define LARGE_CLUSTER                       0
Julita Corbalan's avatar
Julita Corbalan committed
66
67
/* When set to 1, some fields are neither created not reported to the DB to
 * save space */
68
#define DB_SIMPLE                           0
Julita Corbalan's avatar
Julita Corbalan committed
69
70
71
72
73
74
/* Maximum number of simultaneous DB connection for mysql user commands */
#define MAX_DB_CONNECTIONS					20
/* */
#define PERFORMANCE_GAIN                    0.75
#define EAR_ACCEPTED_TH                     0.05
#define EAR_MIN_P_STATE                     4
Lluis Alonso's avatar
Lluis Alonso committed
75
#define POWERMON_FREQ                       60
Julita Corbalan's avatar
Julita Corbalan committed
76
#define DAEMON_PORT_NUMBER                  50000
Lluis Alonso's avatar
Lluis Alonso committed
77
78
79
80
#define EARGM_PORT_NUMBER                   50001
#define DEF_DBD_SERVER_PORT									50002
#define DEF_DBD_MIRROR_PORT									50003
#define DEF_DBD_SYNCHR_PORT									50004
Julita Corbalan's avatar
Julita Corbalan committed
81
82
83
#define DEFAULT_T1                          60
#define DEFAULT_T2                          600
#define MAX_ENERGY                          300
Lluis Alonso's avatar
Lluis Alonso committed
84
#define DEFAULT_POWER                      	300 
Julita Corbalan's avatar
Julita Corbalan committed
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#define GRACE_T1                            3
#define EAR_OVERHEAD_CONTROL                1
#define MAX_TIME_DYNAIS_WITHOUT_SIGNATURE   15
#define MPI_CALLS_TO_CHECK_PERIODIC         1000
/* Maximum power error supported. It is used to compute the min time to compute
 * a valid signature */
#define MAX_POWER_ERROR                     0.05

/* Maximum dynais overhead supported per iteration */
#define MAX_DYNAIS_OVERHEAD                 5
/* When set to 1, Pieces of code are activated to reduce the overhead introduced
 * by dynais */
#define PERIOD                              10

/** Database Daemon Deaults */
/* Enabling it, the output of EARDBD is sended to the log file stored in TMP */
#define DEF_DBD_FILE_LOG					1
#define DEF_DBD_AGGREGATION_TIME			60
#define DEF_DBD_INSERTION_TIME				30
/* MegaBytes allocated for caching the node metrics. */
#define DEF_DBD_ALLOC_MBS					120

#define MAX_NODE_ENERGY_LOCK_TRIES      10000

109
110
111
112
113
114
115
116
/* Seconds between each EARDBD API connection retrys. */
#define EARDBD_API_RETRY_SECS		60


#define MIN_MPI_FOR_LOW_FREQ		20

#define EARGM_DEF_POWERCAP_LIMIT 0
#define EARGM_DEF_T1_POWER 60
Lluis Alonso's avatar
Lluis Alonso committed
117
/* 1=auto by default, 0=monitoring_only */
118
119
120
121
#define EARGM_POWERCAP_DEF_MODE 1
#define EARGM_POWERCAP_DEF_ACTION "no_action"
#define EARGM_ENERGYCAP_DEF_ACTION "no_action"
#define EARGM_POWERCAP_DEF_ACTION_LIMIT 90
Lluis Alonso's avatar
Lluis Alonso committed
122
#define EARGM_POWERCAP_DEF_ACTION_LOWER 25
123
124
125

#define LIMIT_LARGE_JOBS				2
#define RED_PSTATES_LARGE_JOBS 	1
Julita Corbalan's avatar
Julita Corbalan committed
126

Lluis Alonso's avatar
Lluis Alonso committed
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151


/* IMC Management and Phases management default options */
#define  EAR_eUFS   					1
#define  EAR_IMC_TH 					0.02
#define  EAR_USE_PHASES 			1
#define  EAR_USE_LB           1
#define  EAR_USE_TURBO_CP     1
#define  EAR_LB_TH						15.0



/* These two options go together. USE_EXT defines if a automatic network
 *  * extension must be added for inter-nodes communications. Targeted to
 *   * architectures where hostname returned is not valid to communicate across
 *    * nodes. In that case, NW_EXT specified the extension to concatenate to
 *     * hostname */
#define USE_EXT               0
#define NW_EXT                "-opa"

/** Specifies if the new version of the commands propagation is used and the number
 *  * of jumps per node. */
#define NUM_PROPS     3


Julita Corbalan's avatar
Julita Corbalan committed
152
153
#endif //EAR_CONFIG_DEF_H