OpenMPI  0.1.1
ess.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2004-2008 The Trustees of Indiana University and Indiana
3  * University Research and Technology
4  * Corporation. All rights reserved.
5  * Copyright (c) 2004-2011 The University of Tennessee and The University
6  * of Tennessee Research Foundation. All rights
7  * reserved.
8  * Copyright (c) 2004-2010 High Performance Computing Center Stuttgart,
9  * University of Stuttgart. All rights reserved.
10  * Copyright (c) 2004-2005 The Regents of the University of California.
11  * All rights reserved.
12  * $COPYRIGHT$
13  *
14  * Additional copyrights may follow
15  *
16  * $HEADER$
17  */
18 /** @file:
19  *
20  * The OpenRTE Environment-Specific Services
21  *
22  */
23 
24 #ifndef ORTE_ESS_H
25 #define ORTE_ESS_H
26 
27 #include "orte_config.h"
28 #include "orte/types.h"
29 
30 #include "opal/mca/mca.h"
32 
33 #include "orte/util/proc_info.h"
34 
35 BEGIN_C_DECLS
36 
37 /*
38  * API functions
39  */
40 
41 /*
42  * Initialize the RTE for this environment
43  */
44 typedef int (*orte_ess_base_module_init_fn_t)(void);
45 
46 /*
47  * Finalize the RTE for this environment
48  */
49 typedef int (*orte_ess_base_module_finalize_fn_t)(void);
50 
51 /**
52  * Abort the current application
53  *
54  * Aborts currently running application, NOTE: We do NOT call the
55  * regular C-library "abort" function, even
56  * though that would have alerted us to the fact that this is
57  * an abnormal termination, because it would automatically cause
58  * a core file to be generated. The "report" flag indicates if the
59  * function should create an appropriate file to alert the local
60  * orted that termination was abnormal.
61  */
62 typedef void (*orte_ess_base_module_abort_fn_t)(int status, bool report)
63  __opal_attribute_noreturn_funcptr__;
64 
65 /**
66  * Get the locality flag of the specified process
67  *
68  * MPI procs need to know whether a proc shares a common socket,
69  * board, node, computing unit, or cluster. This function provides
70  * a means for an MPI proc to query the locality of another proc.
71  */
72 typedef opal_paffinity_locality_t (*orte_ess_base_module_get_proc_locality_fn_t)(orte_process_name_t *proc);
73 
74 /**
75  * Get the vpid of the daemon who hosts the specified proc
76  *
77  * In order to route messages to the correct place, the RML
78  * and routed modules need to know the vpid of the daemon
79  * that hosts the intended recipient. This API accesses
80  * the pidmap/nidmap to retrieve that info
81  */
83 
84 /**
85  * Get the hostname where a proc resides
86  *
87  * MPI procs need to know the hostname where a specified proc resides.
88  * Different environments provide that info in different ways - e.g., they may
89  * provide a callable utility to return the answer, or download
90  * a map of information into each process. This API provides a
91  * means for each environment to do the "right thing".
92  *
93  * NOTE: To avoid memory waste, this function returns a pointer
94  * to a static storage. IT MUST NOT BE FREED!
95  */
96 typedef char* (*orte_ess_base_module_proc_get_hostname_fn_t)(orte_process_name_t *proc);
97 
98 /**
99  * Get the local rank of a remote process
100  */
102 
103 /**
104  * Get the node rank of a remote process
105  */
107 
108 /**
109  * Update the epoch
110  *
111  * The epochs of the processes are stored in the process_name struct, but this
112  * will get the most up to date version stored within the orte_proc_t struct.
113  * Obviously the epoch of the proc that is passed in will be ignored.
114  */
115 #if ORTE_ENABLE_EPOCH
117 #else
119 #endif
120 
121 /**
122  * Update the pidmap
123  *
124  * When a job is dynamically launched via comm_spawn, the pre-existing daemons need to
125  * update their knowledge of the process map within the job so they can properly do
126  * things like route messages. This API allows daemons - and anyone else who wants to - to
127  * add a pidmap for a new job
128  */
130 
131 /**
132  * Update a nidmap
133  *
134  * When a job is dynamically launched via comm_spawn, the pre-existing daemons need to
135  * update their knowledge of the node map that contains info on what daemon resides
136  * on which nodes
137  */
139 
140 /**
141  * Handle fault tolerance updates
142  *
143  * @param[in] state Fault tolerance state update
144  *
145  * @retval ORTE_SUCCESS The operation completed successfully
146  * @retval ORTE_ERROR An unspecifed error occurred
147  */
148 typedef int (*orte_ess_base_module_ft_event_fn_t)(int state);
149 
150 /*
151  * the standard module data structure
152  */
154  orte_ess_base_module_init_fn_t init;
155  orte_ess_base_module_finalize_fn_t finalize;
166 };
169 
170 /*
171  * the standard component data structure
172  */
174  mca_base_component_t base_version;
175  mca_base_component_data_t base_data;
176 };
179 
180 /*
181  * Macro for use in components that are of type ess
182  */
183 #define ORTE_ESS_BASE_VERSION_2_0_0 \
184  MCA_BASE_VERSION_2_0_0, \
185  "ess", 2, 0, 0
186 
187 /* Global structure for accessing ESS functions */
188 ORTE_DECLSPEC extern orte_ess_base_module_t orte_ess; /* holds selected module's function pointers */
189 
190 END_C_DECLS
191 
192 #endif
opal_paffinity_locality_t(* orte_ess_base_module_get_proc_locality_fn_t)(orte_process_name_t *proc)
Get the locality flag of the specified process.
Definition: ess.h:72
Common type for all MCA components.
Definition: mca.h:250
Populates global structure with process-specific information.
orte_local_rank_t(* orte_ess_base_module_proc_get_local_rank_fn_t)(orte_process_name_t *proc)
Get the local rank of a remote process.
Definition: ess.h:101
Definition: types.h:146
char *(* orte_ess_base_module_proc_get_hostname_fn_t)(orte_process_name_t *proc)
Get the hostname where a proc resides.
Definition: ess.h:96
int(* orte_ess_base_module_proc_get_epoch_fn_t)(orte_process_name_t *proc)
Update the epoch.
Definition: ess.h:118
Definition: ess.h:153
int(* orte_ess_base_module_update_nidmap_fn_t)(opal_byte_object_t *bo)
Update a nidmap.
Definition: ess.h:138
Top-level interface for all MCA components.
int(* orte_ess_base_module_update_pidmap_fn_t)(opal_byte_object_t *bo)
Update the pidmap.
Definition: ess.h:129
int(* orte_ess_base_module_ft_event_fn_t)(int state)
Handle fault tolerance updates.
Definition: ess.h:148
orte_vpid_t(* orte_ess_base_module_proc_get_daemon_fn_t)(orte_process_name_t *proc)
Get the vpid of the daemon who hosts the specified proc.
Definition: ess.h:82
paffinity (processor affinity) framework component interface definitions.
orte_node_rank_t(* orte_ess_base_module_proc_get_node_rank_fn_t)(orte_process_name_t *proc)
Get the node rank of a remote process.
Definition: ess.h:106
Meta data for MCA v2.0.0 components.
Definition: mca.h:309
Definition: dss_types.h:47
void(* orte_ess_base_module_abort_fn_t)(int status, bool report) __opal_attribute_noreturn_funcptr__
Abort the current application.
Definition: ess.h:62
uint16_t orte_local_rank_t
rank on node, used for both local and node rank.
Definition: types.h:46
Definition: ess.h:173