2004-07-01 15:33:17 +00:00
|
|
|
/*
|
2004-11-22 01:38:40 +00:00
|
|
|
* 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.
|
2004-11-28 20:09:25 +00:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
2004-11-22 01:38:40 +00:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
2004-07-01 15:33:17 +00:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
/** @file:
|
|
|
|
*/
|
|
|
|
|
2004-07-01 19:21:56 +00:00
|
|
|
#ifndef MCA_NS_BASE_H
|
2004-07-01 15:33:17 +00:00
|
|
|
#define MCA_NS_BASE_H
|
|
|
|
|
|
|
|
/*
|
|
|
|
* includes
|
|
|
|
*/
|
|
|
|
#include "ompi_config.h"
|
|
|
|
#include "class/ompi_list.h"
|
|
|
|
#include "mca/mca.h"
|
|
|
|
#include "mca/ns/ns.h"
|
|
|
|
|
|
|
|
|
2004-09-30 21:34:29 +00:00
|
|
|
#define OMPI_NAME_ARGS(n) (n).cellid,(n).jobid,(n).vpid
|
|
|
|
|
|
|
|
|
2004-07-01 15:33:17 +00:00
|
|
|
/*
|
|
|
|
* Global functions for MCA overall collective open and close
|
|
|
|
*/
|
2004-07-11 04:34:47 +00:00
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
2004-10-20 18:18:07 +00:00
|
|
|
/** List of names for general use
|
|
|
|
*/
|
|
|
|
struct ompi_name_server_namelist_t {
|
|
|
|
ompi_list_item_t item; /**< Allows this item to be placed on a list */
|
|
|
|
ompi_process_name_t *name; /**< Name of a process */
|
|
|
|
};
|
|
|
|
typedef struct ompi_name_server_namelist_t ompi_name_server_namelist_t;
|
|
|
|
|
2004-10-22 16:06:05 +00:00
|
|
|
OMPI_DECLSPEC OBJ_CLASS_DECLARATION(ompi_name_server_namelist_t);
|
2004-10-20 18:18:07 +00:00
|
|
|
|
2004-10-22 16:06:05 +00:00
|
|
|
OMPI_DECLSPEC int mca_ns_base_open(void);
|
|
|
|
OMPI_DECLSPEC int mca_ns_base_select(bool *allow_multi_user_threads,
|
2004-07-13 11:56:26 +00:00
|
|
|
bool *have_hidden_threads);
|
2004-10-22 16:06:05 +00:00
|
|
|
OMPI_DECLSPEC int mca_ns_base_close(void);
|
2004-07-11 00:57:30 +00:00
|
|
|
|
2004-07-13 11:56:26 +00:00
|
|
|
/*
|
|
|
|
* Base functions that are common to all implementations - can be overridden
|
|
|
|
*/
|
|
|
|
|
2004-11-20 19:20:13 +00:00
|
|
|
OMPI_DECLSPEC int mca_ns_base_assign_cellid_to_process(ompi_process_name_t* name);
|
2004-08-24 19:05:04 +00:00
|
|
|
|
2004-11-20 19:20:13 +00:00
|
|
|
OMPI_DECLSPEC ompi_process_name_t* mca_ns_base_create_process_name(mca_ns_base_cellid_t cell,
|
2004-07-27 23:49:08 +00:00
|
|
|
mca_ns_base_jobid_t job,
|
|
|
|
mca_ns_base_vpid_t vpid);
|
2004-07-13 11:56:26 +00:00
|
|
|
|
2004-11-20 19:20:13 +00:00
|
|
|
OMPI_DECLSPEC ompi_process_name_t* mca_ns_base_copy_process_name(ompi_process_name_t* name);
|
2004-08-13 15:09:24 +00:00
|
|
|
|
2004-11-20 19:20:13 +00:00
|
|
|
OMPI_DECLSPEC ompi_process_name_t* mca_ns_base_convert_string_to_process_name(const char* name);
|
2004-08-10 17:58:23 +00:00
|
|
|
|
2004-11-20 19:20:13 +00:00
|
|
|
OMPI_DECLSPEC char* mca_ns_base_get_proc_name_string(const ompi_process_name_t* name);
|
2004-07-13 11:56:26 +00:00
|
|
|
|
2004-11-20 19:20:13 +00:00
|
|
|
OMPI_DECLSPEC char* mca_ns_base_get_vpid_string(const ompi_process_name_t* name);
|
2004-07-13 11:56:26 +00:00
|
|
|
|
2004-11-30 16:27:32 +00:00
|
|
|
OMPI_DECLSPEC char* mca_ns_base_convert_vpid_to_string(const mca_ns_base_vpid_t vpid);
|
|
|
|
|
|
|
|
OMPI_DECLSPEC mca_ns_base_vpid_t mca_ns_base_convert_string_to_vpid(const char* vpid_string);
|
|
|
|
|
2004-11-20 19:20:13 +00:00
|
|
|
OMPI_DECLSPEC char* mca_ns_base_get_jobid_string(const ompi_process_name_t* name);
|
2004-07-13 11:56:26 +00:00
|
|
|
|
2004-11-20 19:20:13 +00:00
|
|
|
OMPI_DECLSPEC char* mca_ns_base_convert_jobid_to_string(const mca_ns_base_jobid_t jobid);
|
2004-10-20 18:18:07 +00:00
|
|
|
|
2004-11-20 19:20:13 +00:00
|
|
|
OMPI_DECLSPEC mca_ns_base_jobid_t mca_ns_base_convert_string_to_jobid(const char* jobid_string);
|
2004-07-11 00:57:30 +00:00
|
|
|
|
2004-11-20 19:20:13 +00:00
|
|
|
OMPI_DECLSPEC char* mca_ns_base_get_cellid_string(const ompi_process_name_t* name);
|
2004-07-11 00:57:30 +00:00
|
|
|
|
2004-11-30 16:27:32 +00:00
|
|
|
OMPI_DECLSPEC mca_ns_base_cellid_t mca_ns_base_convert_string_to_cellid(const char* cellid_string);
|
|
|
|
|
|
|
|
OMPI_DECLSPEC char* mca_ns_base_convert_cellid_to_string(const mca_ns_base_cellid_t cellid);
|
|
|
|
|
2004-11-20 19:20:13 +00:00
|
|
|
OMPI_DECLSPEC mca_ns_base_vpid_t mca_ns_base_get_vpid(const ompi_process_name_t* name);
|
2004-07-11 00:57:30 +00:00
|
|
|
|
2004-11-20 19:20:13 +00:00
|
|
|
OMPI_DECLSPEC mca_ns_base_jobid_t mca_ns_base_get_jobid(const ompi_process_name_t* name);
|
2004-07-11 00:57:30 +00:00
|
|
|
|
2004-11-20 19:20:13 +00:00
|
|
|
OMPI_DECLSPEC mca_ns_base_cellid_t mca_ns_base_get_cellid(const ompi_process_name_t* name);
|
|
|
|
|
|
|
|
OMPI_DECLSPEC int mca_ns_base_compare(ompi_ns_cmp_bitmask_t fields,
|
2004-07-13 11:56:26 +00:00
|
|
|
const ompi_process_name_t* name1,
|
|
|
|
const ompi_process_name_t* name2);
|
2004-07-11 00:57:30 +00:00
|
|
|
|
2004-11-20 19:20:13 +00:00
|
|
|
OMPI_DECLSPEC int mca_ns_base_pack_name(void *dest, void *src, int n);
|
|
|
|
|
|
|
|
OMPI_DECLSPEC int mca_ns_base_unpack_name(void *dest, void *src, int n);
|
2004-11-30 16:27:32 +00:00
|
|
|
|
|
|
|
OMPI_DECLSPEC int mca_ns_base_pack_cellid(void *dest, void *src, int n);
|
|
|
|
|
|
|
|
OMPI_DECLSPEC int mca_ns_base_unpack_cellid(void *dest, void *src, int n);
|
2004-11-20 19:20:13 +00:00
|
|
|
|
|
|
|
OMPI_DECLSPEC int mca_ns_base_pack_jobid(void *dest, void *src, int n);
|
|
|
|
|
|
|
|
OMPI_DECLSPEC int mca_ns_base_unpack_jobid(void *dest, void *src, int n);
|
|
|
|
|
|
|
|
OMPI_DECLSPEC int mca_ns_base_free_name(ompi_process_name_t* name);
|
2004-07-11 00:57:30 +00:00
|
|
|
|
2004-12-03 21:05:22 +00:00
|
|
|
OMPI_DECLSPEC mca_ns_base_cellid_t mca_ns_base_create_cellid_not_available(void);
|
|
|
|
|
|
|
|
OMPI_DECLSPEC mca_ns_base_jobid_t mca_ns_base_create_jobid_not_available(void);
|
|
|
|
|
|
|
|
OMPI_DECLSPEC mca_ns_base_vpid_t mca_ns_base_get_vpid_range_not_available(mca_ns_base_jobid_t job,
|
|
|
|
mca_ns_base_vpid_t range);
|
|
|
|
|
2004-12-20 01:48:37 +00:00
|
|
|
OMPI_DECLSPEC mca_ns_base_vpid_t mca_ns_base_derive_vpid(mca_ns_base_vpid_t base_vpid, int offset);
|
2004-07-11 00:57:30 +00:00
|
|
|
|
2005-01-07 16:03:55 +00:00
|
|
|
OMPI_DECLSPEC mca_ns_base_vpid_t mca_ns_base_get_allocated_vpids_not_available(mca_ns_base_jobid_t jobid);
|
2004-07-01 15:33:17 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* globals that might be needed
|
|
|
|
*/
|
|
|
|
|
2004-10-22 16:06:05 +00:00
|
|
|
OMPI_DECLSPEC extern int mca_ns_base_output;
|
|
|
|
OMPI_DECLSPEC extern mca_ns_base_module_t ompi_name_server; /* holds selected module's function pointers */
|
|
|
|
OMPI_DECLSPEC extern bool mca_ns_base_selected;
|
|
|
|
OMPI_DECLSPEC extern ompi_list_t mca_ns_base_components_available;
|
|
|
|
OMPI_DECLSPEC extern mca_ns_base_component_t mca_ns_base_selected_component;
|
2004-07-01 15:33:17 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* external API functions will be documented in the mca/ns/ns.h file
|
|
|
|
*/
|
|
|
|
|
2004-10-20 22:31:03 +00:00
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
2004-07-01 15:33:17 +00:00
|
|
|
#endif
|