Fix the newly added FT event state when compiling --with-ft
This commit was SVN r30988.
Этот коммит содержится в:
родитель
ec3957ddde
Коммит
7304b700e1
@ -30,6 +30,10 @@
|
|||||||
#include "orte/mca/rml/base/base.h"
|
#include "orte/mca/rml/base/base.h"
|
||||||
#include "orte/mca/oob/base/base.h"
|
#include "orte/mca/oob/base/base.h"
|
||||||
|
|
||||||
|
#if OPAL_ENABLE_FT_CR == 1
|
||||||
|
#include "orte/mca/state/state.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The following file was created by configure. It contains extern
|
* The following file was created by configure. It contains extern
|
||||||
* statements and the definition of an array of pointers to each
|
* statements and the definition of an array of pointers to each
|
||||||
@ -88,8 +92,10 @@ static int orte_oob_base_open(mca_base_open_flag_t flags)
|
|||||||
OBJ_CONSTRUCT(&orte_oob_base.actives, opal_list_t);
|
OBJ_CONSTRUCT(&orte_oob_base.actives, opal_list_t);
|
||||||
|
|
||||||
#if OPAL_ENABLE_FT_CR == 1
|
#if OPAL_ENABLE_FT_CR == 1
|
||||||
/* register the FT event callback */
|
/* register the FT events callback */
|
||||||
orte_state.add_job_state(ORTE_JOB_STATE_FT_EVENT, orte_oob_ft_event, ORTE_ERROR_PRI);
|
orte_state.add_job_state(ORTE_JOB_STATE_FT_CHECKPOINT, orte_oob_base_ft_event, ORTE_ERROR_PRI);
|
||||||
|
orte_state.add_job_state(ORTE_JOB_STATE_FT_CONTINUE, orte_oob_base_ft_event, ORTE_ERROR_PRI);
|
||||||
|
orte_state.add_job_state(ORTE_JOB_STATE_FT_RESTART, orte_oob_base_ft_event, ORTE_ERROR_PRI);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Open up all available components */
|
/* Open up all available components */
|
||||||
|
@ -383,17 +383,22 @@ static void process_uri(char *uri)
|
|||||||
void orte_oob_base_ft_event(int sd, short argc, void *cbdata)
|
void orte_oob_base_ft_event(int sd, short argc, void *cbdata)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
mca_oob_module_t *mod;
|
mca_base_component_list_item_t *cli;
|
||||||
|
mca_oob_base_component_t *component;
|
||||||
orte_state_caddy_t *state = (orte_state_caddy_t*)cbdata;
|
orte_state_caddy_t *state = (orte_state_caddy_t*)cbdata;
|
||||||
|
|
||||||
/* loop across all available modules in priority order
|
/* loop across all available modules in priority order
|
||||||
* and call each one's ft_event handler
|
* and call each one's ft_event handler
|
||||||
*/
|
*/
|
||||||
OPAL_LIST_FOREACH(mod, &mca_oob_base_modules, mca_oob_module_t) {
|
OPAL_LIST_FOREACH(cli, &orte_oob_base.actives, mca_base_component_list_item_t) {
|
||||||
if (NULL != mod->ft_event) {
|
component = (mca_oob_base_component_t*)cli->cli_component;
|
||||||
if (ORTE_SUCCESS != (rc = mod->ft_event(state))) {
|
if (NULL == component->ft_event) {
|
||||||
ORTE_ERROR_LOG(rc);
|
/* doesn't support this ability */
|
||||||
}
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ORTE_SUCCESS != (rc = component->ft_event(state->job_state))) {
|
||||||
|
ORTE_ERROR_LOG(rc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
OBJ_RELEASE(state);
|
OBJ_RELEASE(state);
|
||||||
|
@ -55,6 +55,9 @@ typedef int (*mca_oob_base_component_set_addr_fn_t)(orte_process_name_t *peer,
|
|||||||
char **uris);
|
char **uris);
|
||||||
typedef bool (*mca_oob_base_component_is_reachable_fn_t)(orte_process_name_t *peer);
|
typedef bool (*mca_oob_base_component_is_reachable_fn_t)(orte_process_name_t *peer);
|
||||||
typedef void (*mca_oob_ping_callback_fn_t)(int status, void *cbdata);
|
typedef void (*mca_oob_ping_callback_fn_t)(int status, void *cbdata);
|
||||||
|
#if OPAL_ENABLE_FT_CR == 1
|
||||||
|
typedef int (*mca_oob_base_component_ft_event_fn_t)(int state);
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
mca_base_component_t oob_base;
|
mca_base_component_t oob_base;
|
||||||
@ -68,6 +71,9 @@ typedef struct {
|
|||||||
mca_oob_base_component_get_addr_fn_t get_addr;
|
mca_oob_base_component_get_addr_fn_t get_addr;
|
||||||
mca_oob_base_component_set_addr_fn_t set_addr;
|
mca_oob_base_component_set_addr_fn_t set_addr;
|
||||||
mca_oob_base_component_is_reachable_fn_t is_reachable;
|
mca_oob_base_component_is_reachable_fn_t is_reachable;
|
||||||
|
#if OPAL_ENABLE_FT_CR == 1
|
||||||
|
mca_oob_base_component_ft_event_fn_t ft_event;
|
||||||
|
#endif
|
||||||
} mca_oob_base_component_t;
|
} mca_oob_base_component_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -174,7 +174,9 @@ typedef int32_t orte_job_state_t;
|
|||||||
#define ORTE_JOB_STATE_ALLOC_FAILED (ORTE_JOB_STATE_ERROR + 18) /* job failed to obtain an allocation */
|
#define ORTE_JOB_STATE_ALLOC_FAILED (ORTE_JOB_STATE_ERROR + 18) /* job failed to obtain an allocation */
|
||||||
|
|
||||||
/* define an FT event */
|
/* define an FT event */
|
||||||
#define ORTE_JOB_STATE_FT_EVENT (ORTE_JOB_STATE_ERROR + 19)
|
#define ORTE_JOB_STATE_FT_CHECKPOINT (ORTE_JOB_STATE_ERROR + 19)
|
||||||
|
#define ORTE_JOB_STATE_FT_CONTINUE (ORTE_JOB_STATE_ERROR + 20)
|
||||||
|
#define ORTE_JOB_STATE_FT_RESTART (ORTE_JOB_STATE_ERROR + 21)
|
||||||
|
|
||||||
|
|
||||||
/* Define a boundary so that external developers
|
/* Define a boundary so that external developers
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user