@@ -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 ))) {
0 commit comments