Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

Commit

Permalink
Return NUMA node 0 if NUMA support isn't enabled
Browse files Browse the repository at this point in the history
Closes: #198
  • Loading branch information
flx42 committed Dec 7, 2016
1 parent 92c6cd8 commit 703b717
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/src/nvml/nvml.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ func GetDriverVersion() (string, error) {
func numaNode(busid string) (uint, error) {
b, err := ioutil.ReadFile(fmt.Sprintf("/sys/bus/pci/devices/%s/numa_node", strings.ToLower(busid)))
if err != nil {
return 0, fmt.Errorf("%v: %v", ErrCPUAffinity, err)
// XXX report node 0 if NUMA support isn't enabled
return 0, nil
}
node, err := strconv.ParseInt(string(bytes.TrimSpace(b)), 10, 8)
if err != nil {
Expand Down

0 comments on commit 703b717

Please # to comment.