2005-03-14 23:57:21 +03:00
|
|
|
/*
|
2005-11-05 22:57:48 +03:00
|
|
|
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
|
|
|
* University Research and Technology
|
|
|
|
* Corporation. All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2005-09-01 05:07:30 +04:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
2005-03-14 23:57:21 +03:00
|
|
|
* University of Stuttgart. All rights reserved.
|
2005-03-24 15:43:37 +03:00
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2005-03-14 23:57:21 +03:00
|
|
|
* $COPYRIGHT$
|
2005-09-01 05:07:30 +04:00
|
|
|
*
|
2005-03-14 23:57:21 +03:00
|
|
|
* Additional copyrights may follow
|
2005-09-01 05:07:30 +04:00
|
|
|
*
|
2005-03-14 23:57:21 +03:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
/** @file:
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef ORTE_RMGR_BASE_H
|
|
|
|
#define ORTE_RMGR_BASE_H
|
|
|
|
|
|
|
|
/*
|
|
|
|
* includes
|
|
|
|
*/
|
|
|
|
#include "orte_config.h"
|
|
|
|
#include "include/orte_constants.h"
|
|
|
|
#include "include/orte_types.h"
|
|
|
|
|
2005-07-03 20:22:16 +04:00
|
|
|
#include "opal/class/opal_list.h"
|
2006-02-07 06:32:36 +03:00
|
|
|
#include "dss/dss.h"
|
2005-03-14 23:57:21 +03:00
|
|
|
#include "mca/mca.h"
|
|
|
|
#include "mca/gpr/gpr_types.h"
|
|
|
|
#include "mca/rmgr/rmgr.h"
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Global functions for MCA overall collective open and close
|
|
|
|
*/
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Internal definitions
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* function definitions
|
|
|
|
*/
|
|
|
|
OMPI_DECLSPEC int orte_rmgr_base_open(void);
|
|
|
|
OMPI_DECLSPEC int orte_rmgr_base_select(void);
|
|
|
|
OMPI_DECLSPEC int orte_rmgr_base_close(void);
|
|
|
|
|
|
|
|
OMPI_DECLSPEC int orte_rmgr_base_get_app_context(
|
|
|
|
orte_jobid_t jobid,
|
|
|
|
orte_app_context_t*** app_context,
|
|
|
|
size_t* num_context);
|
|
|
|
|
|
|
|
OMPI_DECLSPEC int orte_rmgr_base_put_app_context(
|
|
|
|
orte_jobid_t jobid,
|
|
|
|
orte_app_context_t** app_context,
|
|
|
|
size_t num_context);
|
|
|
|
|
|
|
|
OMPI_DECLSPEC int orte_rmgr_base_get_job_slots(
|
2005-09-01 05:07:30 +04:00
|
|
|
orte_jobid_t jobid,
|
2005-03-14 23:57:21 +03:00
|
|
|
size_t* num_slots);
|
|
|
|
|
|
|
|
OMPI_DECLSPEC int orte_rmgr_base_set_job_slots(
|
2005-09-01 05:07:30 +04:00
|
|
|
orte_jobid_t jobid,
|
2005-03-14 23:57:21 +03:00
|
|
|
size_t num_slots);
|
|
|
|
|
2005-03-31 19:47:37 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Pack/unpack
|
|
|
|
*/
|
|
|
|
|
|
|
|
OMPI_DECLSPEC int orte_rmgr_base_pack_cmd(
|
|
|
|
orte_buffer_t* buffer,
|
|
|
|
orte_rmgr_cmd_t cmd,
|
|
|
|
orte_jobid_t jobid);
|
|
|
|
|
|
|
|
OMPI_DECLSPEC int orte_rmgr_base_pack_create_cmd(
|
|
|
|
orte_buffer_t* buffer,
|
|
|
|
orte_app_context_t** context,
|
|
|
|
size_t num_context);
|
|
|
|
|
|
|
|
OMPI_DECLSPEC int orte_rmgr_base_pack_terminate_proc_cmd(
|
|
|
|
orte_buffer_t* buffer,
|
|
|
|
const orte_process_name_t* name);
|
|
|
|
|
|
|
|
OMPI_DECLSPEC int orte_rmgr_base_unpack_rsp(
|
|
|
|
orte_buffer_t* buffer);
|
|
|
|
|
|
|
|
OMPI_DECLSPEC int orte_rmgr_base_unpack_create_rsp(
|
|
|
|
orte_buffer_t* buffer,
|
|
|
|
orte_jobid_t*);
|
|
|
|
|
|
|
|
OMPI_DECLSPEC int orte_rmgr_base_cmd_dispatch(
|
|
|
|
orte_buffer_t* req,
|
|
|
|
orte_buffer_t* rsp);
|
|
|
|
|
2005-03-14 23:57:21 +03:00
|
|
|
/*
|
|
|
|
* Base functions that are common to all implementations - can be overridden
|
|
|
|
*/
|
|
|
|
int orte_rmgr_base_create_not_available(
|
2005-09-01 05:07:30 +04:00
|
|
|
orte_app_context_t** app_context,
|
|
|
|
size_t num_context,
|
2005-03-14 23:57:21 +03:00
|
|
|
orte_jobid_t* jobid);
|
|
|
|
int orte_rmgr_base_query_not_available(void);
|
|
|
|
int orte_rmgr_base_allocate_not_available(orte_jobid_t);
|
|
|
|
int orte_rmgr_base_deallocate_not_available(orte_jobid_t);
|
|
|
|
int orte_rmgr_base_map_not_available(orte_jobid_t);
|
|
|
|
int orte_rmgr_base_launch_not_available(orte_jobid_t);
|
|
|
|
int orte_rmgr_base_terminate_job_not_available(orte_jobid_t);
|
|
|
|
int orte_rmgr_base_terminate_proc_not_available(const orte_process_name_t*);
|
|
|
|
int orte_rmgr_base_proc_stage_gate_init(orte_jobid_t job);
|
2006-02-08 20:40:11 +03:00
|
|
|
int orte_rmgr_base_proc_stage_gate_subscribe(orte_jobid_t job, orte_gpr_notify_cb_fn_t, void*, orte_proc_state_t);
|
2005-09-01 05:07:30 +04:00
|
|
|
int orte_rmgr_base_proc_stage_gate_mgr(
|
|
|
|
orte_gpr_notify_message_t *msg);
|
|
|
|
int orte_rmgr_base_proc_stage_gate_mgr_abort(
|
|
|
|
orte_gpr_notify_message_t *msg);
|
2005-03-14 23:57:21 +03:00
|
|
|
int orte_rmgr_base_spawn_not_available(
|
2005-09-01 05:07:30 +04:00
|
|
|
orte_app_context_t** app_context,
|
|
|
|
size_t num_context,
|
2005-03-14 23:57:21 +03:00
|
|
|
orte_jobid_t* jobid,
|
2006-02-08 22:52:57 +03:00
|
|
|
orte_rmgr_cb_fn_t cbfn,
|
|
|
|
orte_proc_state_t cb_conditions);
|
2005-03-14 23:57:21 +03:00
|
|
|
int orte_rmgr_base_finalize_not_available(void);
|
|
|
|
|
2005-05-01 04:58:06 +04:00
|
|
|
/*
|
|
|
|
* DATA TYPE PACKING FUNCTIONS
|
|
|
|
*/
|
|
|
|
int orte_rmgr_base_pack_app_context(orte_buffer_t *buffer, void *src,
|
|
|
|
size_t num_vals, orte_data_type_t type);
|
|
|
|
|
|
|
|
int orte_rmgr_base_pack_app_context_map(orte_buffer_t *buffer, void *src,
|
|
|
|
size_t num_vals, orte_data_type_t type);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* DATA TYPE UNPACKING FUNCTIONS
|
|
|
|
*/
|
|
|
|
int orte_rmgr_base_unpack_app_context(orte_buffer_t *buffer, void *dest,
|
|
|
|
size_t *num_vals, orte_data_type_t type);
|
|
|
|
|
|
|
|
int orte_rmgr_base_unpack_app_context_map(orte_buffer_t *buffer, void *dest,
|
|
|
|
size_t *num_vals, orte_data_type_t type);
|
|
|
|
|
|
|
|
|
2006-02-07 06:32:36 +03:00
|
|
|
/*
|
|
|
|
* COMPARE FUNCTIONS
|
|
|
|
*/
|
|
|
|
int orte_rmgr_base_compare_app_context(orte_app_context_t *value1, orte_app_context_t *value2, orte_data_type_t type);
|
|
|
|
|
|
|
|
int orte_rmgr_base_compare_app_context_map(orte_app_context_map_t *value1, orte_app_context_map_t *value2, orte_data_type_t type);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* COPY FUNCTIONS
|
|
|
|
*/
|
|
|
|
int orte_rmgr_base_copy_app_context(orte_app_context_t **dest, orte_app_context_t *src, orte_data_type_t type);
|
|
|
|
|
|
|
|
int orte_rmgr_base_copy_app_context_map(orte_app_context_map_t **dest, orte_app_context_map_t *src, orte_data_type_t type);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* PRINT FUNCTIONS
|
|
|
|
*/
|
|
|
|
int orte_rmgr_base_print_app_context(char **output, char *prefix, orte_app_context_t *src, orte_data_type_t type);
|
|
|
|
|
|
|
|
int orte_rmgr_base_print_app_context_map(char **output, char *prefix, orte_app_context_map_t *src, orte_data_type_t type);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* SIZE FUNCTIONS
|
|
|
|
*/
|
|
|
|
int orte_rmgr_base_size_app_context(size_t *size, orte_app_context_t *src, orte_data_type_t type);
|
|
|
|
|
|
|
|
int orte_rmgr_base_size_app_context_map(size_t *size, orte_app_context_map_t *src, orte_data_type_t type);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* RELEASE FUNCTIONS
|
|
|
|
*/
|
|
|
|
void orte_rmgr_base_std_obj_release(orte_data_value_t *value);
|
|
|
|
|
2005-03-14 23:57:21 +03:00
|
|
|
/*
|
|
|
|
* globals that might be needed
|
|
|
|
*/
|
|
|
|
|
|
|
|
typedef struct orte_rmgr_base_t {
|
|
|
|
int rmgr_output;
|
2005-07-03 20:22:16 +04:00
|
|
|
opal_list_t rmgr_components;
|
2005-03-14 23:57:21 +03:00
|
|
|
} orte_rmgr_base_t;
|
|
|
|
|
|
|
|
OMPI_DECLSPEC extern orte_rmgr_base_t orte_rmgr_base;
|
|
|
|
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|