[Openmp-commits] [PATCH] D13991: Adding Hwloc library option for affinity mechanism.

Jonathan Peyton via Openmp-commits openmp-commits at lists.llvm.org
Thu Oct 22 12:03:35 PDT 2015


jlpeyton created this revision.
jlpeyton added reviewers: AndreyChurbanov, tlwilmar, hfinkel.
jlpeyton added a subscriber: openmp-commits.
jlpeyton set the repository for this revision to rL LLVM.

These changes allow libhwloc to be used as the topology discovery/affinity mechanism for libomp.
It is supported on Unices.  The code additions:
1) Canonicalize KMP_CPU_* interface macros so bitmask operations are implementation
   independent and work with both hwloc bitmaps and libomp bitmaps.  So there are new KMP_CPU_ALLOC_* and KMP_CPU_ITERATE() macros
   and the like.  These are all in kmp.h and appropriately placed.
2) Hwloc topology discovery code in kmp_affinity.cpp.  This uses the hwloc
   interface to create a libomp address2os object which the rest of libomp
   knows how to handle already.
3) To build, use -DLIBOMP_USE_HWLOC=on and -DLIBOMP_HWLOC_INSTALL_DIR=/path/to/install/dir [default /usr/local].  If CMake can't find the library or hwloc.h, then it will tell you and exit.



Repository:
  rL LLVM

http://reviews.llvm.org/D13991

Files:
  runtime/Build_With_CMake.txt
  runtime/CMakeLists.txt
  runtime/cmake/LibompHandleFlags.cmake
  runtime/cmake/LibompMicroTests.cmake
  runtime/cmake/config-ix.cmake
  runtime/src/CMakeLists.txt
  runtime/src/i18n/en_US.txt
  runtime/src/kmp.h
  runtime/src/kmp_affinity.cpp
  runtime/src/kmp_affinity.h
  runtime/src/kmp_config.h.cmake
  runtime/src/kmp_ftn_entry.h
  runtime/src/kmp_global.c
  runtime/src/kmp_settings.c
  runtime/src/z_Linux_util.c
  runtime/test/CMakeLists.txt
  runtime/test/lit.cfg
  runtime/test/lit.site.cfg.in

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13991.38152.patch
Type: text/x-patch
Size: 57765 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20151022/02a10d66/attachment-0001.bin>


More information about the Openmp-commits mailing list