Skip to content

Commit 55a5d3a

Browse files
author
Ralph Castain
authored
Merge pull request #4279 from rhc54/topic/dbgr
Begin cleaning up debugger support
2 parents 98aee54 + d5ce3c3 commit 55a5d3a

File tree

4 files changed

+26
-13
lines changed

4 files changed

+26
-13
lines changed

orte/mca/rmaps/base/rmaps_base_support_fns.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -590,9 +590,13 @@ orte_proc_t* orte_rmaps_base_setup_proc(orte_job_t *jdata,
590590

591591
OBJ_RETAIN(node); /* maintain accounting on object */
592592
proc->node = node;
593-
node->num_procs++;
594-
if (node->slots_inuse < node->slots) {
595-
++node->slots_inuse;
593+
/* if this is a debugger job, then it doesn't count against
594+
* available slots - otherwise, it does */
595+
if (!ORTE_FLAG_TEST(jdata, ORTE_JOB_FLAG_DEBUGGER_DAEMON)) {
596+
node->num_procs++;
597+
if (node->slots_inuse < node->slots) {
598+
++node->slots_inuse;
599+
}
596600
}
597601
if (0 > (rc = opal_pointer_array_add(node->procs, (void*)proc))) {
598602
ORTE_ERROR_LOG(rc);

orte/mca/rmaps/ppr/rmaps_ppr.c

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,8 @@ static int ppr_mapper(orte_job_t *jdata)
276276
/* add the node to the map, if needed */
277277
if (!ORTE_FLAG_TEST(node, ORTE_NODE_FLAG_MAPPED)) {
278278
ORTE_FLAG_SET(node, ORTE_NODE_FLAG_MAPPED);
279+
OBJ_RETAIN(node);
280+
opal_pointer_array_add(jdata->map->nodes, node);
279281
jdata->map->num_nodes++;
280282
}
281283
/* if we are mapping solely at the node level, just put
@@ -620,7 +622,7 @@ static int assign_locations(orte_job_t *jdata)
620622
orte_node_t *node;
621623
orte_proc_t *proc;
622624
orte_app_context_t *app;
623-
opal_hwloc_level_t level;
625+
hwloc_obj_type_t level;
624626
hwloc_obj_t obj;
625627
unsigned int cache_level=0;
626628
int ppr, cnt, nobjs, nprocs_mapped;
@@ -643,24 +645,24 @@ static int assign_locations(orte_job_t *jdata)
643645

644646
/* pickup the object level */
645647
if (ORTE_MAPPING_BYNODE == ORTE_GET_MAPPING_POLICY(jdata->map->mapping)) {
646-
level = OPAL_HWLOC_NODE_LEVEL;
648+
level = HWLOC_OBJ_MACHINE;
647649
} else if (ORTE_MAPPING_BYHWTHREAD == ORTE_GET_MAPPING_POLICY(jdata->map->mapping)) {
648-
level = OPAL_HWLOC_HWTHREAD_LEVEL;
650+
level = HWLOC_OBJ_PU;
649651
} else if (ORTE_MAPPING_BYCORE == ORTE_GET_MAPPING_POLICY(jdata->map->mapping)) {
650-
level = OPAL_HWLOC_CORE_LEVEL;
652+
level = HWLOC_OBJ_CORE;
651653
} else if (ORTE_MAPPING_BYSOCKET == ORTE_GET_MAPPING_POLICY(jdata->map->mapping)) {
652-
level = OPAL_HWLOC_SOCKET_LEVEL;
654+
level = HWLOC_OBJ_SOCKET;
653655
} else if (ORTE_MAPPING_BYL1CACHE == ORTE_GET_MAPPING_POLICY(jdata->map->mapping)) {
654-
level = OPAL_HWLOC_L1CACHE_LEVEL;
656+
level = HWLOC_OBJ_L1CACHE;
655657
cache_level = 1;
656658
} else if (ORTE_MAPPING_BYL2CACHE == ORTE_GET_MAPPING_POLICY(jdata->map->mapping)) {
657-
level = OPAL_HWLOC_L2CACHE_LEVEL;
659+
level = HWLOC_OBJ_L2CACHE;
658660
cache_level = 2;
659661
} else if (ORTE_MAPPING_BYL3CACHE == ORTE_GET_MAPPING_POLICY(jdata->map->mapping)) {
660-
level = OPAL_HWLOC_L3CACHE_LEVEL;
662+
level = HWLOC_OBJ_L3CACHE;
661663
cache_level = 3;
662664
} else if (ORTE_MAPPING_BYNUMA == ORTE_GET_MAPPING_POLICY(jdata->map->mapping)) {
663-
level = OPAL_HWLOC_NUMA_LEVEL;
665+
level = HWLOC_OBJ_NUMANODE;
664666
} else {
665667
ORTE_ERROR_LOG(ORTE_ERR_NOT_FOUND);
666668
return ORTE_ERR_TAKE_NEXT_OPTION;
@@ -689,7 +691,7 @@ static int assign_locations(orte_job_t *jdata)
689691
true, node->name);
690692
return ORTE_ERR_SILENT;
691693
}
692-
if (OPAL_HWLOC_NODE_LEVEL == level) {
694+
if (HWLOC_OBJ_MACHINE == level) {
693695
obj = hwloc_get_root_obj(node->topology->topo);
694696
for (j=0; j < node->procs->size; j++) {
695697
if (NULL == (proc = (orte_proc_t*)opal_pointer_array_get_item(node->procs, j))) {

orte/mca/rmaps/round_robin/rmaps_rr_mappers.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ int orte_rmaps_rr_byslot(orte_job_t *jdata,
9595
/* add this node to the map - do it only once */
9696
if (!ORTE_FLAG_TEST(node, ORTE_NODE_FLAG_MAPPED)) {
9797
ORTE_FLAG_SET(node, ORTE_NODE_FLAG_MAPPED);
98+
OBJ_RETAIN(node);
99+
opal_pointer_array_add(jdata->map->nodes, node);
98100
++(jdata->map->num_nodes);
99101
}
100102
if (NULL == (proc = orte_rmaps_base_setup_proc(jdata, node, app->idx))) {

orte/orted/pmix/pmix_server_dyn.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,11 @@ int pmix_server_spawn_fn(opal_process_name_t *requestor,
448448
orte_set_attribute(&jdata->attributes, ORTE_JOB_INDEX_ARGV,
449449
ORTE_ATTR_GLOBAL, &flag, OPAL_BOOL);
450450

451+
/*** DEBUGGER DAEMONS ***/
452+
} else if (0 == strcmp(info->key, OPAL_PMIX_DEBUGGER_DAEMONS)) {
453+
ORTE_FLAG_SET(jdata, ORTE_JOB_FLAG_DEBUGGER_DAEMON);
454+
ORTE_SET_MAPPING_DIRECTIVE(jdata->map->mapping, ORTE_MAPPING_DEBUGGER);
455+
451456
/*** DEFAULT - CACHE FOR INCLUSION WITH JOB INFO ***/
452457
} else {
453458
/* cache for inclusion with job info at registration */

0 commit comments

Comments
 (0)