Skip to content

Commit 9469c19

Browse files
committed
checkpoint
TODO - IO_DEVICES - btl/openib - topo/treematch - revamp OBJ_CACHE v1 vs v2
1 parent d6e7534 commit 9469c19

File tree

2 files changed

+29
-6
lines changed

2 files changed

+29
-6
lines changed

ompi/mca/topo/treematch/treematch/tm_hwloc.c

+8
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,11 @@ tm_topology_t* hwloc_to_tm(char *filename,double **pcost)
159159
exit(-1);
160160
}
161161

162+
#if HWLOC_API_VERSION < 0x20000
162163
hwloc_topology_ignore_all_keep_structure(topology);
164+
#else
165+
#warning FIXME hwloc v2
166+
#endif
163167
hwloc_topology_load(topology);
164168

165169

@@ -229,7 +233,11 @@ tm_topology_t* get_local_topo_with_hwloc(void)
229233

230234
/* Build the topology */
231235
hwloc_topology_init(&topology);
236+
#if HWLOC_API_VERSION < 0x20000
232237
hwloc_topology_ignore_all_keep_structure(topology);
238+
#else
239+
#warning FIXME hwloc v2
240+
#endif
233241
hwloc_topology_load(topology);
234242

235243
/* Test if symetric */

orte/mca/rmaps/round_robin/rmaps_rr.c

+21-6
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,13 @@ static int orte_rmaps_rr_map(orte_job_t *jdata)
171171
app->num_procs);
172172
}
173173
} else if (ORTE_MAPPING_BYL1CACHE == ORTE_GET_MAPPING_POLICY(jdata->map->mapping)) {
174-
rc = orte_rmaps_rr_byobj(jdata, app, &node_list, num_slots,
175-
app->num_procs, HWLOC_OBJ_CACHE, 1);
174+
rc = orte_rmaps_rr_byobj(jdata, app, &node_list, num_slots, app->num_procs,
175+
#if HWLOC_API_VERSION < 0x20000
176+
HWLOC_OBJ_CACHE, 1
177+
#else
178+
HWLOC_OBJ_L1CACHE, 0
179+
#endif
180+
);
176181
if (ORTE_ERR_NOT_FOUND == rc) {
177182
/* if the mapper couldn't map by this object because
178183
* it isn't available, but the error allows us to try
@@ -183,8 +188,13 @@ static int orte_rmaps_rr_map(orte_job_t *jdata)
183188
app->num_procs);
184189
}
185190
} else if (ORTE_MAPPING_BYL2CACHE == ORTE_GET_MAPPING_POLICY(jdata->map->mapping)) {
186-
rc = orte_rmaps_rr_byobj(jdata, app, &node_list, num_slots,
187-
app->num_procs, HWLOC_OBJ_CACHE, 2);
191+
rc = orte_rmaps_rr_byobj(jdata, app, &node_list, num_slots, app->num_procs,
192+
#if HWLOC_API_VERSION < 0x20000
193+
HWLOC_OBJ_CACHE, 2
194+
#else
195+
HWLOC_OBJ_L2CACHE, 0
196+
#endif
197+
);
188198
if (ORTE_ERR_NOT_FOUND == rc) {
189199
/* if the mapper couldn't map by this object because
190200
* it isn't available, but the error allows us to try
@@ -195,8 +205,13 @@ static int orte_rmaps_rr_map(orte_job_t *jdata)
195205
app->num_procs);
196206
}
197207
} else if (ORTE_MAPPING_BYL3CACHE == ORTE_GET_MAPPING_POLICY(jdata->map->mapping)) {
198-
rc = orte_rmaps_rr_byobj(jdata, app, &node_list, num_slots,
199-
app->num_procs, HWLOC_OBJ_CACHE, 3);
208+
rc = orte_rmaps_rr_byobj(jdata, app, &node_list, num_slots, app->num_procs,
209+
#if HWLOC_API_VERSION < 0x20000
210+
HWLOC_OBJ_CACHE, 3
211+
#else
212+
HWLOC_OBJ_L3CACHE, 0
213+
#endif
214+
);
200215
if (ORTE_ERR_NOT_FOUND == rc) {
201216
/* if the mapper couldn't map by this object because
202217
* it isn't available, but the error allows us to try

0 commit comments

Comments
 (0)