Rename an mca param to something more intuitive and set its default to 0 so the module only runs if a non-zero value is provided
This commit was SVN r23609.
Этот коммит содержится в:
родитель
a2f349167e
Коммит
ace1f60429
@ -168,7 +168,7 @@ static void start(orte_jobid_t jobid)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* setup the send */
|
/* setup the send */
|
||||||
time = mca_sensor_heartbeat_component.beat * 1000; /* convert to microsecs */
|
time = mca_sensor_heartbeat_component.rate * 1000; /* convert to microsecs */
|
||||||
send_ev = (opal_event_t*)malloc(sizeof(opal_event_t));
|
send_ev = (opal_event_t*)malloc(sizeof(opal_event_t));
|
||||||
opal_evtimer_set(send_ev, send_heartbeat, send_ev);
|
opal_evtimer_set(send_ev, send_heartbeat, send_ev);
|
||||||
send_time.tv_sec = time / 1000000;
|
send_time.tv_sec = time / 1000000;
|
||||||
|
@ -23,7 +23,7 @@ BEGIN_C_DECLS
|
|||||||
|
|
||||||
struct orte_sensor_heartbeat_component_t {
|
struct orte_sensor_heartbeat_component_t {
|
||||||
orte_sensor_base_component_t super;
|
orte_sensor_base_component_t super;
|
||||||
int beat;
|
int rate;
|
||||||
int check;
|
int check;
|
||||||
int missed;
|
int missed;
|
||||||
};
|
};
|
||||||
|
@ -58,10 +58,10 @@ static int orte_sensor_heartbeat_open(void)
|
|||||||
int tmp;
|
int tmp;
|
||||||
|
|
||||||
/* lookup parameters */
|
/* lookup parameters */
|
||||||
mca_base_param_reg_int(c, "beat",
|
mca_base_param_reg_int(c, "rate",
|
||||||
"Heartbeat rate in milliseconds (default=100)",
|
"Heartbeat rate in milliseconds (default=0)",
|
||||||
false, false, 100, &tmp);
|
false, false, 0, &tmp);
|
||||||
mca_sensor_heartbeat_component.beat = tmp;
|
mca_sensor_heartbeat_component.rate = tmp;
|
||||||
|
|
||||||
mca_base_param_reg_int(c, "check",
|
mca_base_param_reg_int(c, "check",
|
||||||
"Check for failure rate in milliseconds (default=500)",
|
"Check for failure rate in milliseconds (default=500)",
|
||||||
@ -80,7 +80,7 @@ static int orte_sensor_heartbeat_open(void)
|
|||||||
static int orte_sensor_heartbeat_query(mca_base_module_t **module, int *priority)
|
static int orte_sensor_heartbeat_query(mca_base_module_t **module, int *priority)
|
||||||
{
|
{
|
||||||
/* only usable by daemons and HNPs */
|
/* only usable by daemons and HNPs */
|
||||||
if (0 < mca_sensor_heartbeat_component.beat &&
|
if (0 < mca_sensor_heartbeat_component.rate &&
|
||||||
(ORTE_PROC_IS_DAEMON || ORTE_PROC_IS_HNP)) {
|
(ORTE_PROC_IS_DAEMON || ORTE_PROC_IS_HNP)) {
|
||||||
*priority = 10; /* use if we were built */
|
*priority = 10; /* use if we were built */
|
||||||
*module = (mca_base_module_t *)&orte_sensor_heartbeat_module;
|
*module = (mca_base_module_t *)&orte_sensor_heartbeat_module;
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user