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
ldd should protect us from using the wrong version (v. compiled version) of HWLOC, however in the case where a user uses
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
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.