Skip to content

Commit

Permalink
add nodes to job data for ALL jobs included in the launch message
Browse files Browse the repository at this point in the history
Signed-off-by: HawkmoonEternal <[email protected]>
(cherry picked from commit 594888e)
  • Loading branch information
HawkmoonEternal authored and rhc54 committed Dec 11, 2023
1 parent 33aa509 commit b5c3da1
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/mca/odls/base/odls_base_default_fns.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,31 @@ int prte_odls_base_default_construct_child_list(pmix_data_buffer_t *buffer, pmix
/* connect the two */
PMIX_RETAIN(dmn->node);
pptr->node = dmn->node;

/* add the node to the job map, if needed */
if (!PRTE_FLAG_TEST(pptr->node, PRTE_NODE_FLAG_MAPPED)) {
PMIX_RETAIN(pptr->node);
pmix_pointer_array_add(jdata->map->nodes, pptr->node);
jdata->map->num_nodes++;
PRTE_FLAG_SET(pptr->node, PRTE_NODE_FLAG_MAPPED);
}
/* add this proc to that node */
PMIX_RETAIN(pptr);
pmix_pointer_array_add(pptr->node->procs, pptr);
pptr->node->num_procs++;
/* and connect it back to its job object, if not already done */
if (NULL == pptr->job) {
PMIX_RETAIN(jdata);
pptr->job = jdata;
}
}
/* reset the mapped flags */
for (n = 0; n < jdata->map->nodes->size; n++) {
if (NULL
!= (node = (prte_node_t *) pmix_pointer_array_get_item(jdata->map->nodes, n))) {
PRTE_FLAG_UNSET(node, PRTE_NODE_FLAG_MAPPED);
}

}
}
/* release the buffer */
Expand Down

0 comments on commit b5c3da1

Please sign in to comment.