2007-03-16 23:11:45 +00:00
|
|
|
/*
|
2009-04-30 16:55:39 +00:00
|
|
|
* Copyright (c) 2004-2009 The Trustees of Indiana University.
|
2007-03-16 23:11:45 +00:00
|
|
|
* All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
|
|
|
* All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
*
|
|
|
|
* FULL SNAPC component
|
|
|
|
*
|
|
|
|
* Simple, braindead implementation.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MCA_SNAPC_FULL_EXPORT_H
|
|
|
|
#define MCA_SNAPC_FULL_EXPORT_H
|
|
|
|
|
|
|
|
#include "orte_config.h"
|
|
|
|
|
|
|
|
#include "opal/mca/mca.h"
|
2007-10-08 20:53:02 +00:00
|
|
|
#include "opal/event/event.h"
|
2008-02-28 01:57:57 +00:00
|
|
|
|
2009-04-30 16:55:39 +00:00
|
|
|
#include "orte/mca/filem/filem.h"
|
2007-03-16 23:11:45 +00:00
|
|
|
#include "orte/mca/snapc/snapc.h"
|
|
|
|
|
2008-02-28 01:57:57 +00:00
|
|
|
BEGIN_C_DECLS
|
2007-03-16 23:11:45 +00:00
|
|
|
|
2008-02-28 01:57:57 +00:00
|
|
|
/*
|
|
|
|
* cmds for base receive
|
|
|
|
*/
|
|
|
|
typedef uint8_t orte_snapc_full_cmd_flag_t;
|
|
|
|
#define ORTE_SNAPC_FULL_CMD OPAL_UINT8
|
2009-04-30 16:55:39 +00:00
|
|
|
#define ORTE_SNAPC_FULL_UPDATE_JOB_STATE_CMD 1
|
|
|
|
#define ORTE_SNAPC_FULL_UPDATE_JOB_STATE_QUICK_CMD 2
|
|
|
|
#define ORTE_SNAPC_FULL_UPDATE_ORTED_STATE_CMD 3
|
|
|
|
#define ORTE_SNAPC_FULL_UPDATE_ORTED_STATE_QUICK_CMD 4
|
|
|
|
#define ORTE_SNAPC_FULL_VPID_ASSOC_CMD 5
|
|
|
|
#define ORTE_SNAPC_FULL_ESTABLISH_DIR_CMD 6
|
|
|
|
#define ORTE_SNAPC_FULL_MAX 7
|
2008-03-05 04:57:23 +00:00
|
|
|
|
2007-03-16 23:11:45 +00:00
|
|
|
/*
|
|
|
|
* Local Component structures
|
|
|
|
*/
|
|
|
|
struct orte_snapc_full_component_t {
|
|
|
|
orte_snapc_base_component_t super; /** Base SNAPC component */
|
|
|
|
};
|
|
|
|
typedef struct orte_snapc_full_component_t orte_snapc_full_component_t;
|
2007-04-01 16:08:27 +00:00
|
|
|
OPAL_MODULE_DECLSPEC extern orte_snapc_full_component_t mca_snapc_full_component;
|
2007-03-16 23:11:45 +00:00
|
|
|
|
2009-04-30 16:55:39 +00:00
|
|
|
/*
|
|
|
|
* Global Coordinator per orted metadata
|
|
|
|
*/
|
|
|
|
struct orte_snapc_full_orted_snapshot_t {
|
2007-03-16 23:11:45 +00:00
|
|
|
/** Base SNAPC Global snapshot type */
|
2009-04-30 16:55:39 +00:00
|
|
|
orte_snapc_base_global_snapshot_t super;
|
2007-10-09 19:52:47 +00:00
|
|
|
|
2009-04-30 16:55:39 +00:00
|
|
|
/** ORTE Process name */
|
|
|
|
orte_process_name_t process_name;
|
|
|
|
|
|
|
|
/** State of the checkpoint */
|
|
|
|
int state;
|
|
|
|
|
|
|
|
/** OPAL CRS Component */
|
|
|
|
char * opal_crs;
|
2007-03-16 23:11:45 +00:00
|
|
|
|
2009-04-30 16:55:39 +00:00
|
|
|
/** Term flag */
|
|
|
|
bool term;
|
2007-03-16 23:11:45 +00:00
|
|
|
|
2009-04-30 16:55:39 +00:00
|
|
|
/** FileM request */
|
|
|
|
orte_filem_base_request_t *filem_request;
|
|
|
|
};
|
|
|
|
typedef struct orte_snapc_full_orted_snapshot_t orte_snapc_full_orted_snapshot_t;
|
|
|
|
OBJ_CLASS_DECLARATION(orte_snapc_full_orted_snapshot_t);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Local Coordinator per app metadata
|
|
|
|
*/
|
|
|
|
struct orte_snapc_full_app_snapshot_t {
|
2007-10-08 20:53:02 +00:00
|
|
|
/** Base SNAPC Global snapshot type */
|
2009-04-30 16:55:39 +00:00
|
|
|
orte_snapc_base_local_snapshot_t super;
|
2007-10-08 20:53:02 +00:00
|
|
|
|
|
|
|
/** Named Pipe Read and Write */
|
|
|
|
char * comm_pipe_r;
|
|
|
|
char * comm_pipe_w;
|
|
|
|
int comm_pipe_r_fd;
|
|
|
|
int comm_pipe_w_fd;
|
|
|
|
|
|
|
|
/* An opal event handle for the read pipe */
|
|
|
|
struct opal_event comm_pipe_r_eh;
|
|
|
|
bool is_eh_active;
|
|
|
|
|
2009-04-30 16:55:39 +00:00
|
|
|
/** Process pid */
|
|
|
|
pid_t process_pid;
|
2007-10-08 20:53:02 +00:00
|
|
|
|
2009-04-30 16:55:39 +00:00
|
|
|
/** Term */
|
|
|
|
bool term;
|
|
|
|
};
|
|
|
|
typedef struct orte_snapc_full_app_snapshot_t orte_snapc_full_app_snapshot_t;
|
|
|
|
OBJ_CLASS_DECLARATION(orte_snapc_full_app_snapshot_t);
|
2007-10-08 20:53:02 +00:00
|
|
|
|
2007-09-24 16:19:45 +00:00
|
|
|
extern bool orte_snapc_full_skip_filem;
|
2009-04-30 16:55:39 +00:00
|
|
|
extern bool orte_snapc_full_skip_app;
|
|
|
|
extern bool orte_snapc_full_timing_enabled;
|
2007-09-24 16:19:45 +00:00
|
|
|
|
2008-05-06 18:08:45 +00:00
|
|
|
int orte_snapc_full_component_query(mca_base_module_t **module, int *priority);
|
|
|
|
|
2007-03-16 23:11:45 +00:00
|
|
|
/*
|
|
|
|
* Module functions
|
|
|
|
*/
|
|
|
|
int orte_snapc_full_module_init(bool seed, bool app);
|
|
|
|
int orte_snapc_full_module_finalize(void);
|
|
|
|
|
|
|
|
int orte_snapc_full_setup_job(orte_jobid_t jobid);
|
|
|
|
int orte_snapc_full_release_job(orte_jobid_t jobid);
|
|
|
|
|
2008-09-22 16:49:56 +00:00
|
|
|
int orte_snapc_full_ft_event(int state);
|
|
|
|
|
2007-03-16 23:11:45 +00:00
|
|
|
/*
|
|
|
|
* Global Coordinator Functionality
|
|
|
|
*/
|
|
|
|
int global_coord_init(void);
|
|
|
|
int global_coord_finalize(void);
|
|
|
|
int global_coord_setup_job(orte_jobid_t jobid);
|
|
|
|
int global_coord_release_job(orte_jobid_t jobid);
|
2009-04-30 16:55:39 +00:00
|
|
|
int global_coord_orted_state_update(orte_process_name_t proc_name,
|
|
|
|
int proc_ckpt_state,
|
|
|
|
char **proc_ckpt_ref,
|
|
|
|
char **proc_ckpt_loc,
|
|
|
|
char **agent_ckpt);
|
2007-03-16 23:11:45 +00:00
|
|
|
/*
|
|
|
|
* Local Coordinator Functionality
|
|
|
|
*/
|
|
|
|
int local_coord_init(void);
|
|
|
|
int local_coord_finalize(void);
|
2007-06-18 15:39:04 +00:00
|
|
|
int local_coord_setup_job(orte_jobid_t jobid);
|
|
|
|
int local_coord_release_job(orte_jobid_t jobid);
|
2008-02-28 01:57:57 +00:00
|
|
|
int local_coord_job_state_update(orte_jobid_t jobid,
|
2009-04-30 16:55:39 +00:00
|
|
|
int job_ckpt_state,
|
2008-02-28 01:57:57 +00:00
|
|
|
char **job_ckpt_ref,
|
|
|
|
char **job_ckpt_loc);
|
2007-03-16 23:11:45 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Application Coordinator Functionality
|
|
|
|
*/
|
|
|
|
int app_coord_init(void);
|
|
|
|
int app_coord_finalize(void);
|
2008-09-22 16:49:56 +00:00
|
|
|
int app_coord_ft_event(int state);
|
2007-03-16 23:11:45 +00:00
|
|
|
|
2008-02-28 01:57:57 +00:00
|
|
|
END_C_DECLS
|
2007-03-16 23:11:45 +00:00
|
|
|
|
|
|
|
#endif /* MCA_SNAPC_FULL_EXPORT_H */
|