OpenMPI  0.1.1
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 
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 */
58  /** List of 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;
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;
87  mca_base_component_t *component;
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
Information about a specific application to be launched in the RTE.
Definition: orte_globals.h:196
Common type for all MCA components.
Definition: mca.h:250
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
Definition: rmaps.h:82
The Open RTE Resource MAPping Subsystem (RMAPS)
uint32_t orte_jobid_t
Set the allowed range for ids in each space.
Definition: types.h:76
ORTE_DECLSPEC int orte_rmaps_base_close(void)
Close down the rmaps framework.
Definition: rmaps_base_close.c:29
The opal_list_t interface is used to provide a generic doubly-linked list container for Open MPI...
int rmaps_output
Verbose/debug output stream.
Definition: base.h:57
Top-level interface for all MCA components.
Definition: opal_list.h:98
ORTE_DECLSPEC orte_rmaps_base_t orte_rmaps_base
Global instance of rmaps-wide framework data.
Definition: rmaps_base_open.c:69
opal_list_t available_components
List of available components.
Definition: base.h:59
ORTE_DECLSPEC OBJ_CLASS_DECLARATION(mca_oob_base_info_t)
declare the association structure as a class
BEGIN_C_DECLS ORTE_DECLSPEC int orte_rmaps_base_open(void)
Open the rmaps framework.
Definition: rmaps_base_open.c:83
Select an rmaps component / module.
Definition: base.h:83
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.
Definition: opal_list.h:147
Global params for OpenRTE.
Struct to hold data global to the rmaps framework.
Definition: base.h:55
Definition: private.h:56