Older Hwloc's (< 1.10.0) don't offer the HWLOC_OBJ_NUMANODE nor HWLOC_OBJ_PACKAGE types. Instead they are named HWLOC_OBJ_NODE and HWLOC_OBJ_SOCKET instead. This patch just defines the newer names when using an older Hwloc. Tested with 1.9.1, 1.10.1, and 1.11.6.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
runtime/src/kmp.h | ||
---|---|---|
91 ↗ | (On Diff #96592) | Both HWLOC 1.10 and 1.10.1 have version 0x00010a00; in 10.0 there is no HWLOC_OBJ_NUMANODE definition, but in 10.1 this definition is provided in deprecate.h header file (probably as a preparation for future renaming?). Is it safer to use: #ifndef HWLOC_OBJ_NUMANODE #define HWLOC_OBJ_NUMANODE HWLOC_OBJ_NODE #endif #ifndef HWLOC_OBJ_PACKAGE #define HWLOC_OBJ_PACKAGE HWLOC_OBJ_SOCKET #endif as opposed to version checking? |
Comment Actions
Updated the diff. I had gotten errors when I tried that first, but now I realize that the SOCKET name is used in address2os map creation. I've changed all of them to HWLOC_OBJ_PACKAGE now and added the #ifndef method.