OpenMPI 0.1.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

base.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
3 * University Research and Technology
4 * Corporation. All rights reserved.
5 * Copyright (c) 2004-2005 The University of Tennessee and The University
6 * of Tennessee Research Foundation. All rights
7 * reserved.
8 * Copyright (c) 2004-2005 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 (c) 2011 Cisco Systems, Inc. All rights reserved.
13 * $COPYRIGHT$
14 *
15 * Additional copyrights may follow
16 *
17 * $HEADER$
18 */
19 /** @file:
20 * rmaps framework base functionality.
21 */
22
23 #ifndef ORTE_MCA_RMAPS_BASE_H
24 #define ORTE_MCA_RMAPS_BASE_H
25
26 /*
27 * includes
28 */
29 #include "orte_config.h"
30 #include "orte/types.h"
31
32 #include "opal/class/opal_list.h"
33 #include "opal/mca/mca.h"
34
35 #include "orte/runtime/orte_globals.h"
36
37 #include "orte/mca/rmaps/rmaps.h"
38
39 BEGIN_C_DECLS
40
41 /**
42 * Open the rmaps framework
43 */
44 ORTE_DECLSPEC int orte_rmaps_base_open(void);
45
46 #if !ORTE_DISABLE_FULL_SUPPORT
47
48 /*
49 * Global functions for MCA overall collective open and close
50 */
51
52 /**
53 * Struct to hold data global to the rmaps framework
54 */
55 typedef struct {
56 /** Verbose/debug output stream */
57 int rmaps_output;
58 /** List of available components */
59 opal_list_t available_components;
60 /* list of selected modules */
61 opal_list_t selected_modules;
62 /* default ppr */
63 char *ppr;
64 /* cpus per rank */
65 int cpus_per_rank;
66 /* display the map after it is computed */
67 bool display_map;
68 /* slot list, if provided by user */
69 char *slot_list;
70 /* default mapping directives */
71 orte_mapping_policy_t mapping;
72 orte_ranking_policy_t ranking;
73 } orte_rmaps_base_t;
74
75 /**
76 * Global instance of rmaps-wide framework data
77 */
78 ORTE_DECLSPEC extern orte_rmaps_base_t orte_rmaps_base;
79
80 /**
81 * Select an rmaps component / module
82 */
83 typedef struct {
84 opal_list_item_t super;
85 int pri;
86 orte_rmaps_base_module_t *module;
87 mca_base_component_t *component;
88 } orte_rmaps_base_selected_module_t;
89 OBJ_CLASS_DECLARATION(orte_rmaps_base_selected_module_t);
90
91 ORTE_DECLSPEC int orte_rmaps_base_select(void);
92
93 /**
94 * Utility routines to get/set vpid mapping for the job
95 */
96
97 ORTE_DECLSPEC int orte_rmaps_base_get_vpid_range(orte_jobid_t jobid,
98 orte_vpid_t *start, orte_vpid_t *range);
99 ORTE_DECLSPEC int orte_rmaps_base_set_vpid_range(orte_jobid_t jobid,
100 orte_vpid_t start, orte_vpid_t range);
101
102 /* pretty-print functions */
103 ORTE_DECLSPEC char* orte_rmaps_base_print_mapping(orte_mapping_policy_t mapping);
104 ORTE_DECLSPEC char* orte_rmaps_base_print_ranking(orte_ranking_policy_t ranking);
105
106 /**
107 * Close down the rmaps framework
108 */
109 ORTE_DECLSPEC int orte_rmaps_base_close(void);
110
111 #if OPAL_HAVE_HWLOC
112 ORTE_DECLSPEC int orte_rmaps_base_prep_topology(hwloc_topology_t topo);
113 #endif
114
115 ORTE_DECLSPEC int orte_rmaps_base_filter_nodes(orte_app_context_t *app,
116 opal_list_t *nodes,
117 bool remove);
118
119 #endif /* ORTE_DISABLE_FULL_SUPPORT */
120
121 END_C_DECLS
122
123 #endif
orte_app_context_t
Information about a specific application to be launched in the RTE.
Definition: orte_globals.h:196
mca_base_component_2_0_0_t
Common type for all MCA components.
Definition: mca.h:250
orte_rmaps_base_filter_nodes
ORTE_DECLSPEC int orte_rmaps_base_filter_nodes(orte_app_context_t *app, opal_list_t *nodes, bool remove)
Definition: rmaps_base_support_fns.c:52
orte_rmaps_base_module_1_3_0_t
Definition: rmaps.h:82
rmaps.h
The Open RTE Resource MAPping Subsystem (RMAPS)
orte_jobid_t
uint32_t orte_jobid_t
Set the allowed range for ids in each space.
Definition: types.h:76
orte_rmaps_base_close
ORTE_DECLSPEC int orte_rmaps_base_close(void)
Close down the rmaps framework.
Definition: rmaps_base_close.c:29
opal_list.h
The opal_list_t interface is used to provide a generic doubly-linked list container for Open MPI...
orte_rmaps_base_t::rmaps_output
int rmaps_output
Verbose/debug output stream.
Definition: base.h:57
mca.h
Top-level interface for all MCA components.
opal_list_item_t
Definition: opal_list.h:98
types.h
orte_rmaps_base
ORTE_DECLSPEC orte_rmaps_base_t orte_rmaps_base
Global instance of rmaps-wide framework data.
Definition: rmaps_base_open.c:69
orte_rmaps_base_t::available_components
opal_list_t available_components
List of available components.
Definition: base.h:59
OBJ_CLASS_DECLARATION
ORTE_DECLSPEC OBJ_CLASS_DECLARATION(mca_oob_base_info_t)
declare the association structure as a class
orte_rmaps_base_open
BEGIN_C_DECLS ORTE_DECLSPEC int orte_rmaps_base_open(void)
Open the rmaps framework.
Definition: rmaps_base_open.c:83
orte_rmaps_base_selected_module_t
Select an rmaps component / module.
Definition: base.h:83
orte_rmaps_base_get_vpid_range
ORTE_DECLSPEC int orte_rmaps_base_get_vpid_range(orte_jobid_t jobid, orte_vpid_t *start, orte_vpid_t *range)
Utility routines to get/set vpid mapping for the job.
opal_list_t
Definition: opal_list.h:147
orte_globals.h
Global params for OpenRTE.
orte_rmaps_base_t
Struct to hold data global to the rmaps framework.
Definition: base.h:55
hwloc_topology
Definition: private.h:56