22c7f2b3e0
ns_replica.c - Removed the error logging since I use this function in orte_init_stage1 to check if we have created a cellid yet or not. ras_types.h & rase_base_node.h - This was an empty file. moved the orte_ras_node_t from base/ras_base_node.h to this file. - Changed the name of orte_ras_base_node_t to orte_ras_node_t to match the naming mechanisms in place. ras.h - Exposed 2 functions: - node_insert: This takes a list of orte_ras_base_node_t's and places them in the Node Segment of the GPR. This is to be used in orte_init_stage1 for singleton processes, and the hostfile parsing (see rds_hostfile.c). This just puts in the appropriate API interface to keep from calling the orte_ras_base_node_insert function directly. - node_query: This is used in hostfile parsing. This just puts in the appropriate API interface to keep from calling the orte_ras_base_node_query function directly. - Touched all of the implemented components to add reference to these new function pointers ras_base_select.c & ras_base_open.c - Add and set the global module reference rds.h - Exposed 1 function: - store_resource: This stores a list of rds_cell_desc_t's to the Resource Segment. This is used in conjunction with the orte_ras.node_insert function in both the orte_init_stage1 for singleton processes and rds_hostfile.c rds_base_select.c & rds_base_open.c - Add and set the global module reference rds_hostfile.c - Added functionality to create a new cellid for each hostfile, placing each entry in the hostfile into the same cellid. Currently this is commented out with the cellid hard coded to 0, with the intention of taking this out once ORTE is able to handle multiple cellid's - Instead of just adding hosts to the Node Segment via a direct call to the ras_base_node_insert() function. First add the hosts to the Resource Segment of the GPR using the orte_rds.store_resource() function then use the API version of orte_ras.node_insert() to store the hosts on the Node Segment. - Add 1 new function pointer to module as required by the API. rds_hostfile_component.c - Converted this to use the new MCA parameter registration orte_init_stage1.c - It is possible that a cellid was not created yet for the current environment. So I put in some logic to test if the cellid 0 existed. If it does then continue, otherwise create the cellid so we can properly interact with the GPR via the RDS. - For the singleton case we insert some 'dummy' data into the GPR. The RAS matches this logic, so I took out the duplicate GPR put logic, and replaced it with a call to the orte_ras.node_insert() function. - Further before calling orte_ras.node_insert() in the singleton case, we also call orte_rds.store_resource() to add the singleton node to the Resource Segment. Console: - Added a bunch of new functions. Still experimenting with many aspects of the implementation. This is a checkpoint, and has very limited functionality. - Should not be considered stable at the moment. This commit was SVN r6813.
111 строки
3.3 KiB
C
111 строки
3.3 KiB
C
/*
|
|
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
|
* 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$
|
|
*/
|
|
|
|
#ifndef ORTECONSOLE_H
|
|
#define ORTECONSOLE_H
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
extern "C" {
|
|
#endif
|
|
|
|
#define ORTE_CONSOLE_MAX_LINE_LENGTH 1024
|
|
#define ORTE_CONSOLE_MAX_ARGC 10
|
|
|
|
/*
|
|
* Local Structures
|
|
*/
|
|
|
|
/* Command line Structure */
|
|
typedef struct {
|
|
bool help;
|
|
char *hostfile;
|
|
|
|
opal_mutex_t lock;
|
|
opal_condition_t cond;
|
|
} orte_console_globals_t;
|
|
|
|
/* Console Command Types */
|
|
enum orte_console_type_t {
|
|
ORTE_CONSOLE_TYPE_NULL,
|
|
|
|
ORTE_CONSOLE_TYPE_STD,
|
|
ORTE_CONSOLE_TYPE_HIDDEN
|
|
};
|
|
typedef enum orte_console_type_t orte_console_type_t;
|
|
|
|
/* Contained parsed user input */
|
|
typedef struct {
|
|
/* Command Name */
|
|
char * cmd_name;
|
|
|
|
char ** argv;
|
|
int argc;
|
|
} orte_console_input_command_t;
|
|
|
|
/* Structure detailing each command allowed by the console */
|
|
typedef struct {
|
|
/* Full Name for the command */
|
|
const char * cmd_full_name;
|
|
/* Common abbreviation for this command */
|
|
const char * cmd_short_name;
|
|
/* Number of expected additional arguments */
|
|
int cmd_args;
|
|
/* Type of command */
|
|
orte_console_type_t cmd_type;
|
|
/* Pointer to the function to execute */
|
|
int (*cmd_function) (orte_console_input_command_t);
|
|
/* Short illustration of how the command should be used */
|
|
const char * cmd_usage;
|
|
/* Short description of what this command does */
|
|
const char * cmd_description;
|
|
} orte_console_command_t;
|
|
|
|
/* Local list of allocated hosts */
|
|
static opal_list_t orte_console_hosts;
|
|
|
|
/*
|
|
* Function for each command
|
|
*/
|
|
static int orte_console_exit(orte_console_input_command_t);
|
|
static int orte_console_help(orte_console_input_command_t);
|
|
|
|
static int orte_console_boot_daemons(orte_console_input_command_t);
|
|
static int orte_console_clean(orte_console_input_command_t);
|
|
static int orte_console_add_host(orte_console_input_command_t);
|
|
static int orte_console_remove_host(orte_console_input_command_t);
|
|
static int orte_console_display_configuration(orte_console_input_command_t);
|
|
static int orte_console_launch_job(orte_console_input_command_t);
|
|
static int orte_console_halt_daemons(orte_console_input_command_t);
|
|
|
|
static int orte_console_contactinfo(orte_console_input_command_t);
|
|
static int orte_console_dumpvm(orte_console_input_command_t);
|
|
|
|
static int orte_console_devel(orte_console_input_command_t);
|
|
|
|
/*
|
|
* Support Functions
|
|
*/
|
|
static char *orte_console_get_input_line(void);
|
|
static int orte_console_send_command(orte_daemon_cmd_flag_t usercmd);
|
|
static int orte_console_parse_command(char * usercmd, orte_console_input_command_t *input_command);
|
|
static int orte_console_execute_command(orte_console_input_command_t command);
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
}
|
|
#endif
|
|
|
|
#endif /* ORTECONSOLE_H */
|