@@ -39,10 +39,7 @@ BEGIN_C_DECLS
3939 * hwloc_topology_load() can be expensive (and/or serialized by the
4040 * OS); it may not be desireable to call this function in every MPI
4141 * process on a machine. Hence, it is the responsibility for an upper
42- * layer to both fill opal_hwloc_topology in some scalable way, as
43- * well as to invoke opal_hwloc_base_set_process_membind_policy()
44- * (after opal_hwloc_topology has been loaded) to set the process-wide
45- * memory affinity policy.
42+ * layer to both fill opal_hwloc_topology in some scalable way.
4643 */
4744
4845/**
@@ -53,63 +50,6 @@ OPAL_DECLSPEC extern bool opal_hwloc_topology_inited;
5350
5451OPAL_DECLSPEC extern mca_base_framework_t opal_hwloc_base_framework ;
5552
56- /* we always must have some minimal locality support */
57- #define OPAL_HWLOC_PRINT_MAX_SIZE 50
58- #define OPAL_HWLOC_PRINT_NUM_BUFS 16
59- typedef struct {
60- char * buffers [OPAL_HWLOC_PRINT_NUM_BUFS ];
61- int cntr ;
62- } opal_hwloc_print_buffers_t ;
63- opal_hwloc_print_buffers_t * opal_hwloc_get_print_buffer (void );
64-
65- /* convenience macro for debugging */
66- #define OPAL_HWLOC_SHOW_BINDING (n , v , t ) \
67- do { \
68- char tmp1[1024]; \
69- hwloc_cpuset_t bind; \
70- bind = opal_hwloc_alloc(); \
71- if (hwloc_get_cpubind(t, bind, HWLOC_CPUBIND_PROCESS) < 0) { \
72- opal_output_verbose(n, v, "CANNOT DETERMINE BINDING AT %s:%d", __FILE__, __LINE__); \
73- } else { \
74- opal_hwloc_base_cset2mapstr(tmp1, sizeof(tmp1), t, bind); \
75- opal_output_verbose(n, v, "BINDINGS AT %s:%d: %s", __FILE__, __LINE__, tmp1); \
76- } \
77- hwloc_bitmap_free(bind); \
78- } while (0);
79-
80- #if HWLOC_API_VERSION < 0x20000
81- # define OPAL_HWLOC_MAKE_OBJ_CACHE (level , obj , cache_level ) \
82- do { \
83- obj = HWLOC_OBJ_CACHE; \
84- cache_level = level; \
85- } while (0)
86- #else
87- # define OPAL_HWLOC_MAKE_OBJ_CACHE (level , obj , cache_level ) \
88- do { \
89- obj = HWLOC_OBJ_L##level##CACHE; \
90- cache_level = 0; \
91- } while (0)
92- #endif
93-
94- struct opal_rmaps_numa_node_t {
95- opal_list_item_t super ;
96- int index ;
97- float dist_from_closed ;
98- };
99- typedef struct opal_rmaps_numa_node_t opal_rmaps_numa_node_t ;
100- OBJ_CLASS_DECLARATION (opal_rmaps_numa_node_t );
101-
102- /**
103- * Enum for what memory allocation policy we want for user allocations.
104- * MAP = memory allocation policy.
105- */
106- typedef enum { OPAL_HWLOC_BASE_MAP_NONE , OPAL_HWLOC_BASE_MAP_LOCAL_ONLY } opal_hwloc_base_map_t ;
107-
108- /**
109- * Global reflecting the MAP (set by MCA param).
110- */
111- OPAL_DECLSPEC extern opal_hwloc_base_map_t opal_hwloc_base_map ;
112-
11353/**
11454 * Enum for what to do if the hwloc framework tries to bind memory
11555 * and fails. BFA = bind failure action.
@@ -120,21 +60,12 @@ typedef enum {
12060 OPAL_HWLOC_BASE_MBFA_ERROR
12161} opal_hwloc_base_mbfa_t ;
12262
123- /**
124- * Global reflecting the BFA (set by MCA param).
125- */
126- OPAL_DECLSPEC extern opal_hwloc_base_mbfa_t opal_hwloc_base_mbfa ;
127-
12863/**
12964 * Discover / load the hwloc topology (i.e., call hwloc_topology_init() and
13065 * hwloc_topology_load()).
13166 */
13267OPAL_DECLSPEC int opal_hwloc_base_get_topology (void );
13368
134- /**
135- * Free the hwloc topology.
136- */
137- OPAL_DECLSPEC void opal_hwloc_base_free_topology (hwloc_topology_t topo );
13869OPAL_DECLSPEC unsigned int opal_hwloc_base_get_nbobjs_by_type (hwloc_topology_t topo ,
13970 hwloc_obj_type_t target ,
14071 unsigned cache_level ,
@@ -146,29 +77,12 @@ OPAL_DECLSPEC hwloc_obj_t opal_hwloc_base_get_obj_by_type(hwloc_topology_t topo,
14677 unsigned int instance ,
14778 opal_hwloc_resource_type_t rtype );
14879
149- /**
150- * This function sets the process-wide memory affinity policy
151- * according to opal_hwloc_base_map and opal_hwloc_base_mbfa. It needs
152- * to be a separate, standalone function (as opposed to being done
153- * during opal_hwloc_base_open()) because opal_hwloc_topology is not
154- * loaded by opal_hwloc_base_open(). Hence, an upper layer needs to
155- * invoke this function after opal_hwloc_topology has been loaded.
156- */
157- OPAL_DECLSPEC int opal_hwloc_base_set_process_membind_policy (void );
158-
15980OPAL_DECLSPEC int opal_hwloc_base_membind (opal_hwloc_base_memory_segment_t * segs , size_t count ,
16081 int node_id );
16182
16283OPAL_DECLSPEC int opal_hwloc_base_memory_set (opal_hwloc_base_memory_segment_t * segments ,
16384 size_t num_segments );
16485
165- /**
166- * Make a prettyprint string for a hwloc_cpuset_t (e.g., "socket
167- * 2[core 3]").
168- */
169- OPAL_DECLSPEC int opal_hwloc_base_cset2str (char * str , int len , hwloc_topology_t topo ,
170- hwloc_cpuset_t cpuset );
171-
17286/* extract a location from the locality string */
17387OPAL_DECLSPEC char * opal_hwloc_base_get_location (char * locality , hwloc_obj_type_t type ,
17488 unsigned index );
0 commit comments