Skip to content

Add support for HWLOC 2

Hans-Nikolai Viessmann requested to merge hans/sac2c:hans-hwloc2 into develop

Actually adding support for hwloc 2 was not that hard. Most of the changes effects accessing memory information within the topology, as well as binding based upon various filters. More details can be read here: https://www.open-mpi.org/projects/hwloc/doc/v2.1.0/a00343.php.

Other then some minor API changes within the HWLOC code in the runtime libraries, the only other change is that I've also added a HWLOC version check. Normally ldconfig/ldd should protect us from using the wrong version (v. compiled version) of HWLOC, however in the case where a user uses LD_LIBRARY_PATH/LD_PRELOAD we explicitly check that we are using the same major version as we compiled SaC with.

There is also a new test for when we use HWLOC with CUDA, however it doesn't work nicely as the CUDA_HWLOC initialisation function is 💩! We exit within the init function if something goes wrong, meaning gtest 💣. I will change this to something a bit better. Also I think we never un-init the HWLOC stuff in the CUDA case 😱, I'll add this as well if needed.

CUDA HWLOC init function changed, meaning that we have a more effective unit-test. Also, on closer inspection the CUDA HWLOC makes use of MT HWLOC functionality, as such we do not need a CUDA specific finialize function as this already handled for us. Comments added to cudabind.c explaining this.

Edited by Hans-Nikolai Viessmann

Merge request reports