Skip to content

Commit

Permalink
address PR, add error code in logs
Browse files Browse the repository at this point in the history
  • Loading branch information
dpower4 committed Oct 31, 2024
1 parent 4672cd0 commit 26bd0d1
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -313,11 +313,13 @@ int SetGpu(int gpu_id) {
return 0;
}

// Check if its NUMA node has CPUs.
bool HasCPUsForNumaNode(int node) {
struct bitmask *bm = numa_allocate_nodemask();

if (numa_node_to_cpus(node, bm) < 0) {
fprintf(stderr, "numa_node_to_cpus error on node: %d\n", node);
int numa_err = numa_node_to_cpus(node, bm);
if (numa_err != 0) {
fprintf(stderr, "numa_node_to_cpus error on node: %d, error code: %d\n", node, numa_err);
numa_bitmask_free(bm);
return false; // On error
}
Expand Down

0 comments on commit 26bd0d1

Please sign in to comment.