2008-02-28 04:57:57 +03:00
|
|
|
/*
|
2008-05-06 22:08:45 +04:00
|
|
|
* Copyright (c) 2004-2008 The Trustees of Indiana University and Indiana
|
2008-02-28 04:57:57 +03:00
|
|
|
* 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:
|
|
|
|
*
|
|
|
|
* The OpenRTE Environment-Specific Services
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef ORTE_ESS_H
|
|
|
|
#define ORTE_ESS_H
|
|
|
|
|
2008-04-30 23:49:53 +04:00
|
|
|
#include "orte_config.h"
|
|
|
|
#include "orte/types.h"
|
|
|
|
|
2008-02-28 04:57:57 +03:00
|
|
|
#include "opal/mca/mca.h"
|
|
|
|
|
2009-05-04 15:07:40 +04:00
|
|
|
#include "orte/util/proc_info.h"
|
|
|
|
|
2008-02-28 04:57:57 +03:00
|
|
|
BEGIN_C_DECLS
|
|
|
|
|
|
|
|
/*
|
|
|
|
* API functions
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Initialize the RTE for this environment
|
|
|
|
*/
|
2009-05-04 15:07:40 +04:00
|
|
|
typedef int (*orte_ess_base_module_init_fn_t)(void);
|
2008-02-28 04:57:57 +03:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Finalize the RTE for this environment
|
|
|
|
*/
|
|
|
|
typedef int (*orte_ess_base_module_finalize_fn_t)(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Abort the current application
|
|
|
|
*
|
|
|
|
* Aborts currently running application, NOTE: We do NOT call the
|
|
|
|
* regular C-library "abort" function, even
|
|
|
|
* though that would have alerted us to the fact that this is
|
|
|
|
* an abnormal termination, because it would automatically cause
|
|
|
|
* a core file to be generated. The "report" flag indicates if the
|
|
|
|
* function should create an appropriate file to alert the local
|
|
|
|
* orted that termination was abnormal.
|
|
|
|
*/
|
2008-08-07 13:36:10 +04:00
|
|
|
typedef void (*orte_ess_base_module_abort_fn_t)(int status, bool report) __opal_attribute_noreturn__;
|
2008-02-28 04:57:57 +03:00
|
|
|
|
2008-04-30 23:49:53 +04:00
|
|
|
/**
|
Per the RFC, extend the current use of the ompi_proc_t flags field (without changing the field itself).
The prior ompi_proc_t structure had a uint8_t flag field in it, where only one
bit was used to flag that a proc was "local". In that context, "local" was
constrained to mean "local to this node".
This commit provides a greater degree of granularity on the term "local", to include tests
to see if the proc is on the same socket, PC board, node, switch, CU (computing
unit), and cluster.
Add #define's to designate which bits stand for which local condition. This
was added to the OPAL layer to avoid conflicting with the proposed movement of
the BTLs. To make it easier to use, a set of macros have been defined - e.g.,
OPAL_PROC_ON_LOCAL_SOCKET - that test the specific bit. These can be used in
the code base to clearly indicate which sense of locality is being considered.
All locations in the code base that looked at the current proc_t field have
been changed to use the new macros.
Also modify the orte_ess modules so that each returns a uint8_t (to match the
ompi_proc_t field) that contains a complete description of the locality of this
proc. Obviously, not all environments will be capable of providing such detailed
info. Thus, getting a "false" from a test for "on_local_socket" may simply
indicate a lack of knowledge.
This commit was SVN r20496.
2009-02-10 05:20:16 +03:00
|
|
|
* Get the locality flag of the specified process
|
2008-04-30 23:49:53 +04:00
|
|
|
*
|
Per the RFC, extend the current use of the ompi_proc_t flags field (without changing the field itself).
The prior ompi_proc_t structure had a uint8_t flag field in it, where only one
bit was used to flag that a proc was "local". In that context, "local" was
constrained to mean "local to this node".
This commit provides a greater degree of granularity on the term "local", to include tests
to see if the proc is on the same socket, PC board, node, switch, CU (computing
unit), and cluster.
Add #define's to designate which bits stand for which local condition. This
was added to the OPAL layer to avoid conflicting with the proposed movement of
the BTLs. To make it easier to use, a set of macros have been defined - e.g.,
OPAL_PROC_ON_LOCAL_SOCKET - that test the specific bit. These can be used in
the code base to clearly indicate which sense of locality is being considered.
All locations in the code base that looked at the current proc_t field have
been changed to use the new macros.
Also modify the orte_ess modules so that each returns a uint8_t (to match the
ompi_proc_t field) that contains a complete description of the locality of this
proc. Obviously, not all environments will be capable of providing such detailed
info. Thus, getting a "false" from a test for "on_local_socket" may simply
indicate a lack of knowledge.
This commit was SVN r20496.
2009-02-10 05:20:16 +03:00
|
|
|
* MPI procs need to know whether a proc shares a common socket,
|
|
|
|
* board, node, computing unit, or cluster. This function provides
|
|
|
|
* a means for an MPI proc to query the locality of another proc.
|
2008-04-30 23:49:53 +04:00
|
|
|
*/
|
Per the RFC, extend the current use of the ompi_proc_t flags field (without changing the field itself).
The prior ompi_proc_t structure had a uint8_t flag field in it, where only one
bit was used to flag that a proc was "local". In that context, "local" was
constrained to mean "local to this node".
This commit provides a greater degree of granularity on the term "local", to include tests
to see if the proc is on the same socket, PC board, node, switch, CU (computing
unit), and cluster.
Add #define's to designate which bits stand for which local condition. This
was added to the OPAL layer to avoid conflicting with the proposed movement of
the BTLs. To make it easier to use, a set of macros have been defined - e.g.,
OPAL_PROC_ON_LOCAL_SOCKET - that test the specific bit. These can be used in
the code base to clearly indicate which sense of locality is being considered.
All locations in the code base that looked at the current proc_t field have
been changed to use the new macros.
Also modify the orte_ess modules so that each returns a uint8_t (to match the
ompi_proc_t field) that contains a complete description of the locality of this
proc. Obviously, not all environments will be capable of providing such detailed
info. Thus, getting a "false" from a test for "on_local_socket" may simply
indicate a lack of knowledge.
This commit was SVN r20496.
2009-02-10 05:20:16 +03:00
|
|
|
typedef uint8_t (*orte_ess_base_module_get_proc_locality_fn_t)(orte_process_name_t *proc);
|
2008-04-30 23:49:53 +04:00
|
|
|
|
2008-11-01 00:10:00 +03:00
|
|
|
/**
|
|
|
|
* Get the vpid of the daemon who hosts the specified proc
|
|
|
|
*
|
|
|
|
* In order to route messages to the correct place, the RML
|
|
|
|
* and routed modules need to know the vpid of the daemon
|
|
|
|
* that hosts the intended recipient. This API accesses
|
|
|
|
* the pidmap/nidmap to retrieve that info
|
|
|
|
*/
|
|
|
|
typedef orte_vpid_t (*orte_ess_base_module_proc_get_daemon_fn_t)(orte_process_name_t *proc);
|
|
|
|
|
2008-04-30 23:49:53 +04:00
|
|
|
/**
|
|
|
|
* Get the hostname where a proc resides
|
|
|
|
*
|
|
|
|
* MPI procs need to know the hostname where a specified proc resides.
|
|
|
|
* Different environments provide that info in different ways - e.g., they may
|
|
|
|
* provide a callable utility to return the answer, or download
|
|
|
|
* a map of information into each process. This API provides a
|
|
|
|
* means for each environment to do the "right thing".
|
|
|
|
*
|
|
|
|
* NOTE: To avoid memory waste, this function returns a pointer
|
|
|
|
* to a static storage. IT MUST NOT BE FREED!
|
|
|
|
*/
|
|
|
|
typedef char* (*orte_ess_base_module_proc_get_hostname_fn_t)(orte_process_name_t *proc);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the local rank of a remote process
|
|
|
|
*/
|
2008-09-25 17:39:08 +04:00
|
|
|
typedef orte_local_rank_t (*orte_ess_base_module_proc_get_local_rank_fn_t)(orte_process_name_t *proc);
|
2008-04-30 23:49:53 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the node rank of a remote process
|
|
|
|
*/
|
2008-09-25 17:39:08 +04:00
|
|
|
typedef orte_node_rank_t (*orte_ess_base_module_proc_get_node_rank_fn_t)(orte_process_name_t *proc);
|
2008-04-30 23:49:53 +04:00
|
|
|
|
2008-11-01 00:10:00 +03:00
|
|
|
/**
|
2008-11-18 18:35:50 +03:00
|
|
|
* Update thr pidmap
|
2008-11-01 00:10:00 +03:00
|
|
|
*
|
|
|
|
* When a job is dynamically launched via comm_spawn, the pre-existing daemons need to
|
|
|
|
* update their knowledge of the process map within the job so they can properly do
|
|
|
|
* things like route messages. This API allows daemons - and anyone else who wants to - to
|
|
|
|
* add a pidmap for a new job
|
|
|
|
*/
|
2008-11-18 18:35:50 +03:00
|
|
|
typedef int (*orte_ess_base_module_update_pidmap_fn_t)(opal_byte_object_t *bo);
|
2008-11-01 00:10:00 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Update a nidmap
|
|
|
|
*
|
|
|
|
* When a job is dynamically launched via comm_spawn, the pre-existing daemons need to
|
|
|
|
* update their knowledge of the node map that contains info on what daemon resides
|
|
|
|
* on which nodes
|
|
|
|
*/
|
|
|
|
typedef int (*orte_ess_base_module_update_nidmap_fn_t)(opal_byte_object_t *bo);
|
2008-04-30 23:49:53 +04:00
|
|
|
|
2008-11-01 00:10:00 +03:00
|
|
|
|
|
|
|
|
2008-03-05 07:57:23 +03:00
|
|
|
/**
|
|
|
|
* Handle fault tolerance updates
|
|
|
|
*
|
|
|
|
* @param[in] state Fault tolerance state update
|
|
|
|
*
|
|
|
|
* @retval ORTE_SUCCESS The operation completed successfully
|
|
|
|
* @retval ORTE_ERROR An unspecifed error occurred
|
|
|
|
*/
|
|
|
|
typedef int (*orte_ess_base_module_ft_event_fn_t)(int state);
|
2008-02-28 04:57:57 +03:00
|
|
|
|
|
|
|
/*
|
|
|
|
* the standard module data structure
|
|
|
|
*/
|
|
|
|
struct orte_ess_base_module_1_0_0_t {
|
2008-04-30 23:49:53 +04:00
|
|
|
orte_ess_base_module_init_fn_t init;
|
|
|
|
orte_ess_base_module_finalize_fn_t finalize;
|
|
|
|
orte_ess_base_module_abort_fn_t abort;
|
Per the RFC, extend the current use of the ompi_proc_t flags field (without changing the field itself).
The prior ompi_proc_t structure had a uint8_t flag field in it, where only one
bit was used to flag that a proc was "local". In that context, "local" was
constrained to mean "local to this node".
This commit provides a greater degree of granularity on the term "local", to include tests
to see if the proc is on the same socket, PC board, node, switch, CU (computing
unit), and cluster.
Add #define's to designate which bits stand for which local condition. This
was added to the OPAL layer to avoid conflicting with the proposed movement of
the BTLs. To make it easier to use, a set of macros have been defined - e.g.,
OPAL_PROC_ON_LOCAL_SOCKET - that test the specific bit. These can be used in
the code base to clearly indicate which sense of locality is being considered.
All locations in the code base that looked at the current proc_t field have
been changed to use the new macros.
Also modify the orte_ess modules so that each returns a uint8_t (to match the
ompi_proc_t field) that contains a complete description of the locality of this
proc. Obviously, not all environments will be capable of providing such detailed
info. Thus, getting a "false" from a test for "on_local_socket" may simply
indicate a lack of knowledge.
This commit was SVN r20496.
2009-02-10 05:20:16 +03:00
|
|
|
orte_ess_base_module_get_proc_locality_fn_t proc_get_locality;
|
2008-11-01 00:10:00 +03:00
|
|
|
orte_ess_base_module_proc_get_daemon_fn_t proc_get_daemon;
|
2008-04-30 23:49:53 +04:00
|
|
|
orte_ess_base_module_proc_get_hostname_fn_t proc_get_hostname;
|
|
|
|
orte_ess_base_module_proc_get_local_rank_fn_t get_local_rank;
|
|
|
|
orte_ess_base_module_proc_get_node_rank_fn_t get_node_rank;
|
2008-11-18 18:35:50 +03:00
|
|
|
orte_ess_base_module_update_pidmap_fn_t update_pidmap;
|
2008-11-01 00:10:00 +03:00
|
|
|
orte_ess_base_module_update_nidmap_fn_t update_nidmap;
|
2008-04-30 23:49:53 +04:00
|
|
|
orte_ess_base_module_ft_event_fn_t ft_event;
|
2008-02-28 04:57:57 +03:00
|
|
|
};
|
2008-05-06 22:08:45 +04:00
|
|
|
typedef struct orte_ess_base_module_1_0_0_t orte_ess_base_module_1_0_0_t;
|
|
|
|
typedef struct orte_ess_base_module_1_0_0_t orte_ess_base_module_t;
|
2008-02-28 04:57:57 +03:00
|
|
|
|
|
|
|
/*
|
|
|
|
* the standard component data structure
|
|
|
|
*/
|
2008-07-29 02:40:57 +04:00
|
|
|
struct orte_ess_base_component_2_0_0_t {
|
2008-05-06 22:08:45 +04:00
|
|
|
mca_base_component_t base_version;
|
2008-07-29 02:40:57 +04:00
|
|
|
mca_base_component_data_t base_data;
|
2008-02-28 04:57:57 +03:00
|
|
|
};
|
2008-07-29 02:40:57 +04:00
|
|
|
typedef struct orte_ess_base_component_2_0_0_t orte_ess_base_component_2_0_0_t;
|
|
|
|
typedef struct orte_ess_base_component_2_0_0_t orte_ess_base_component_t;
|
2008-02-28 04:57:57 +03:00
|
|
|
|
|
|
|
/*
|
2008-07-29 02:40:57 +04:00
|
|
|
* Macro for use in components that are of type ess
|
2008-02-28 04:57:57 +03:00
|
|
|
*/
|
2008-07-29 02:40:57 +04:00
|
|
|
#define ORTE_ESS_BASE_VERSION_2_0_0 \
|
|
|
|
MCA_BASE_VERSION_2_0_0, \
|
|
|
|
"ess", 2, 0, 0
|
2008-02-28 04:57:57 +03:00
|
|
|
|
|
|
|
/* Global structure for accessing ESS functions */
|
|
|
|
ORTE_DECLSPEC extern orte_ess_base_module_t orte_ess; /* holds selected module's function pointers */
|
|
|
|
|
|
|
|
END_C_DECLS
|
|
|
|
|
|
|
|
#endif
|