Skip to content

Commit

Permalink
Merge pull request pmodels#7069 from hzhou/2407_hydra_bind
Browse files Browse the repository at this point in the history
hydra: check return code from hwloc_set_cpubind

Approved-by: Ken Raffenetti
  • Loading branch information
hzhou authored Aug 7, 2024
2 parents dc5e618 + b3f77b4 commit 38385fb
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/pm/hydra/lib/tools/topo/hwloc/topo_hwloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -693,9 +693,14 @@ HYD_status HYDT_topo_hwloc_bind(int idx)
HYDU_dump_noprefix(stdout, "process %d binding: %s\n", idx, binding);
MPL_free(binding);
}
hwloc_set_cpubind(topology, HYDT_topo_hwloc_info.bitmap[id], 0);
hwloc_set_membind(topology, HYDT_topo_hwloc_info.bitmap[id],
HYDT_topo_hwloc_info.membind, 0);
int rc;
rc = hwloc_set_cpubind(topology, HYDT_topo_hwloc_info.bitmap[id], 0);
HYDU_ERR_CHKANDJUMP(status, rc, HYD_INTERNAL_ERROR,
"hwloc_set_cpubind failed, rc = %d\n", rc);
rc = hwloc_set_membind(topology, HYDT_topo_hwloc_info.bitmap[id],
HYDT_topo_hwloc_info.membind, 0);
HYDU_ERR_CHKANDJUMP(status, rc, HYD_INTERNAL_ERROR,
"hwloc_set_membind failed, rc = %d\n", rc);
}


Expand Down

0 comments on commit 38385fb

Please sign in to comment.