2006-09-15 01:29:51 +04: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.
|
|
|
|
* 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:
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef ORTE_RAS_PRIVATE_H
|
|
|
|
#define ORTE_RAS_PRIVATE_H
|
|
|
|
|
|
|
|
/*
|
|
|
|
* includes
|
|
|
|
*/
|
|
|
|
#include "orte_config.h"
|
|
|
|
#include "orte/orte_constants.h"
|
|
|
|
|
2006-10-17 20:06:17 +04:00
|
|
|
#include "opal/class/opal_list.h"
|
|
|
|
|
2006-09-15 01:29:51 +04:00
|
|
|
#include "orte/dss/dss_types.h"
|
|
|
|
#include "orte/mca/ns/ns_types.h"
|
|
|
|
#include "orte/mca/rml/rml_types.h"
|
|
|
|
#include "orte/mca/ras/ras_types.h"
|
|
|
|
|
|
|
|
#include "orte/mca/ras/ras.h"
|
|
|
|
#include "orte/mca/ras/base/base.h"
|
|
|
|
|
|
|
|
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Define the RAS command flag */
|
|
|
|
typedef uint8_t orte_ras_cmd_flag_t;
|
|
|
|
#define ORTE_RAS_CMD ORTE_UINT8
|
|
|
|
|
|
|
|
/* define some commands */
|
|
|
|
#define ORTE_RAS_ALLOCATE_CMD 0x01
|
|
|
|
#define ORTE_RAS_DEALLOCATE_CMD 0x02
|
|
|
|
|
|
|
|
/*
|
|
|
|
* API function definitions
|
|
|
|
*/
|
2006-10-17 20:06:17 +04:00
|
|
|
ORTE_DECLSPEC int orte_ras_base_allocate(orte_jobid_t job, opal_list_t *attributes);
|
2006-09-15 01:29:51 +04:00
|
|
|
ORTE_DECLSPEC int orte_ras_base_deallocate(orte_jobid_t job);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* NO_OP functions
|
|
|
|
*/
|
2006-10-17 21:34:06 +04:00
|
|
|
int orte_ras_base_allocate_no_op(orte_jobid_t job, opal_list_t *attributes);
|
2006-09-15 01:29:51 +04:00
|
|
|
|
|
|
|
int orte_ras_base_node_insert_no_op(opal_list_t *);
|
|
|
|
|
|
|
|
int orte_ras_base_node_query_no_op(opal_list_t *);
|
|
|
|
|
|
|
|
int orte_ras_base_deallocate_no_op(orte_jobid_t job);
|
|
|
|
|
|
|
|
int orte_ras_base_node_query_alloc_no_op(opal_list_t*, orte_jobid_t);
|
|
|
|
|
|
|
|
orte_ras_node_t* orte_ras_base_node_lookup_no_op(orte_cellid_t, const char* nodename);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Internal support functions
|
|
|
|
*/
|
|
|
|
ORTE_DECLSPEC int orte_ras_base_allocate_nodes(orte_jobid_t jobid,
|
|
|
|
opal_list_t* nodes);
|
|
|
|
|
2006-10-17 20:06:17 +04:00
|
|
|
ORTE_DECLSPEC int orte_ras_base_reallocate(orte_jobid_t parent_jobid,
|
|
|
|
orte_jobid_t child_jobid);
|
|
|
|
|
2006-09-15 01:29:51 +04:00
|
|
|
/*
|
|
|
|
* Query the registry for all available nodes
|
|
|
|
*/
|
2006-10-05 09:22:22 +04:00
|
|
|
ORTE_DECLSPEC int orte_ras_base_node_query(opal_list_t*);
|
2006-09-15 01:29:51 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Query the registry for a specific node
|
|
|
|
*/
|
2006-10-05 09:22:22 +04:00
|
|
|
ORTE_DECLSPEC orte_ras_node_t* orte_ras_base_node_lookup(orte_cellid_t, const char* nodename);
|
2006-09-15 01:29:51 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Query the registry for all nodes allocated to a specific job
|
|
|
|
*/
|
2006-10-05 09:22:22 +04:00
|
|
|
ORTE_DECLSPEC int orte_ras_base_node_query_alloc(opal_list_t*, orte_jobid_t);
|
2006-09-15 01:29:51 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Add the specified node definitions to the registry
|
|
|
|
*/
|
2006-10-05 09:22:22 +04:00
|
|
|
ORTE_DECLSPEC int orte_ras_base_node_insert(opal_list_t*);
|
2006-09-15 01:29:51 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Delete the specified nodes from the registry
|
|
|
|
*/
|
2006-10-05 09:22:22 +04:00
|
|
|
ORTE_DECLSPEC int orte_ras_base_node_delete(opal_list_t*);
|
2006-09-15 01:29:51 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Assign the allocated slots on the specified nodes to the
|
|
|
|
* indicated jobid.
|
|
|
|
*/
|
2006-10-05 09:22:22 +04:00
|
|
|
ORTE_DECLSPEC int orte_ras_base_node_assign(opal_list_t*, orte_jobid_t);
|
2006-09-15 01:29:51 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Check to see if the node segment is empty
|
|
|
|
*/
|
2006-10-05 09:22:22 +04:00
|
|
|
ORTE_DECLSPEC int orte_ras_base_node_segment_empty(bool *empty);
|
2006-09-15 01:29:51 +04:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* oob interface
|
|
|
|
*/
|
|
|
|
int orte_ras_base_comm_start(void);
|
2006-10-02 04:46:31 +04:00
|
|
|
int orte_ras_base_comm_stop(void);
|
2006-09-15 01:29:51 +04:00
|
|
|
void orte_ras_base_recv(int status, orte_process_name_t* sender,
|
|
|
|
orte_buffer_t* buffer, orte_rml_tag_t tag, void* cbdata);
|
|
|
|
|
|
|
|
/** Local data type functions */
|
|
|
|
int orte_ras_base_copy_node(orte_ras_node_t **dest, orte_ras_node_t *src, orte_data_type_t type);
|
|
|
|
int orte_ras_base_compare_node(orte_ras_node_t *value1, orte_ras_node_t *value2, orte_data_type_t type);
|
|
|
|
int orte_ras_base_pack_node(orte_buffer_t *buffer, void *src,
|
|
|
|
orte_std_cntr_t num_vals, orte_data_type_t type);
|
|
|
|
int orte_ras_base_print_node(char **output, char *prefix, orte_ras_node_t *src, orte_data_type_t type);
|
|
|
|
void orte_ras_base_std_obj_release(orte_data_value_t *value);
|
|
|
|
int orte_ras_base_size_node(size_t *size, orte_ras_node_t *src, orte_data_type_t type);
|
|
|
|
int orte_ras_base_unpack_node(orte_buffer_t *buffer, void *dest,
|
|
|
|
orte_std_cntr_t *num_vals, orte_data_type_t type);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|