Skip to content

Commit

Permalink
Review update.
Browse files Browse the repository at this point in the history
+ Update to BUILD_HWLOC.

Co-authored-by: Tobias Ribizel <tobias.ribizel@kit.edu>
  • Loading branch information
pratikvn and Tobias Ribizel committed Jan 28, 2021
1 parent badf8e3 commit 6d6fbd1
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 19 deletions.
15 changes: 8 additions & 7 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ stages:
BUILD_OMP: "OFF"
BUILD_CUDA: "OFF"
BUILD_HIP: "OFF"
DISABLE_HWLOC: "OFF"
BUILD_HWLOC: "ON"
RUN_EXAMPLES: "OFF"
CONFIG_LOG: "ON"
CXX_FLAGS: ""
Expand Down Expand Up @@ -64,7 +64,7 @@ stages:
-DGINKGO_DEVEL_TOOLS=OFF -DGINKGO_BUILD_REFERENCE=${BUILD_REFERENCE}
-DGINKGO_BUILD_OMP=${BUILD_OMP} -DGINKGO_BUILD_CUDA=${BUILD_CUDA}
-DGINKGO_BUILD_HIP=${BUILD_HIP}
-DGINKGO_DISABLE_HWLOC=${DISABLE_HWLOC}
-DGINKGO_BUILD_HWLOC=${BUILD_HWLOC}
-DGINKGO_BUILD_TESTS=ON -DGINKGO_BUILD_EXAMPLES=ON
-DGINKGO_RUN_EXAMPLES=${RUN_EXAMPLES}
-DGINKGO_CONFIG_LOG_DETAILED=${CONFIG_LOG}
Expand Down Expand Up @@ -96,7 +96,7 @@ stages:
-DGINKGO_DEVEL_TOOLS=OFF -DGINKGO_BUILD_REFERENCE=${BUILD_REFERENCE}
-DGINKGO_BUILD_OMP=${BUILD_OMP} -DGINKGO_BUILD_CUDA=${BUILD_CUDA}
-DGINKGO_BUILD_HIP=${BUILD_HIP}
-DGINKGO_DISABLE_HWLOC=${DISABLE_HWLOC}
-DGINKGO_BUILD_HWLOC=${BUILD_HWLOC}
-DGINKGO_BUILD_TESTS=ON -DGINKGO_BUILD_EXAMPLES=ON
-DGINKGO_CONFIG_LOG_DETAILED=${CONFIG_LOG}
-DGINKGO_RUN_EXAMPLES=${RUN_EXAMPLES}
Expand Down Expand Up @@ -266,7 +266,7 @@ build/cuda92/intel/cuda/release/static:
CXX_COMPILER: "icpc"
BUILD_OMP: "ON"
BUILD_CUDA: "ON"
DISABLE_HWLOC: "ON"
BUILD_HWLOC: "OFF"
BUILD_TYPE: "Release"
BUILD_SHARED_LIBS: "OFF"
CUDA_ARCH: 35
Expand Down Expand Up @@ -422,7 +422,7 @@ build/clang-cuda101/clang/cuda/debug/static:

# cuda 10.2 and friends

# Use TPL hwloc
# works when there is no hwloc and tpl hwloc is also switched off.
build/cuda102/gcc/all/debug/shared:
<<: *default_build_with_test
image: localhost:5000/gko-cuda102-gnu8-llvm8-intel2019
Expand All @@ -432,7 +432,7 @@ build/cuda102/gcc/all/debug/shared:
BUILD_CUDA: "ON"
BUILD_HIP: "ON"
BUILD_TYPE: "Debug"
DISABLE_HWLOC: "ON"
BUILD_HWLOC: "OFF"
CUDA_ARCH: 35
only:
variables:
Expand All @@ -442,6 +442,7 @@ build/cuda102/gcc/all/debug/shared:
- cuda
- gpu

# Use TPL hwloc when no system hwloc is available
build/cuda102/clang/all/release/static:
<<: *default_build_with_test
image: localhost:5000/gko-cuda102-gnu8-llvm8-intel2019
Expand Down Expand Up @@ -587,7 +588,7 @@ build/nocuda/gcc/core/debug/static:
BUILD_REFERENCE: "OFF"
BUILD_TYPE: "Debug"
BUILD_SHARED_LIBS: "OFF"
DISABLE_HWLOC: "ON"
BUILD_HWLOC: "OFF"
only:
variables:
- $RUN_CI_TAG
Expand Down
14 changes: 7 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ set(GINKGO_HIP_AMDGPU "" CACHE STRING
"The amdgpu_target(s) variable passed to hipcc. The default is none (auto).")
option(GINKGO_JACOBI_FULL_OPTIMIZATIONS "Use all the optimizations for the CUDA Jacobi algorithm" OFF)
option(BUILD_SHARED_LIBS "Build shared (.so, .dylib, .dll) libraries" ON)
option(GINKGO_DISABLE_HWLOC "Disable HWLOC " OFF)
option(GINKGO_BUILD_HWLOC "Build Ginkgo with HWLOC. Default is ON. If a system HWLOC is not found, then we try to build it ourselves. Switch this OFF to disable HWLOC." ON)

set(GINKGO_CIRCULAR_DEPS_FLAGS "-Wl,--no-undefined")

Expand Down Expand Up @@ -144,14 +144,14 @@ if(PAPI_sde_FOUND)
set(GINKGO_HAVE_PAPI_SDE 1)
endif()

if(GINKGO_DISABLE_HWLOC)
set(GINKGO_USE_EXTERNAL_HWLOC 0)
set(GINKGO_HAVE_HWLOC 0)
message(STATUS "HWLOC is being forcibly switched off")
else()
if(GINKGO_BUILD_HWLOC)
# By default always use external HWLOC
set(GINKGO_USE_EXTERNAL_HWLOC 1)
set(GINKGO_HAVE_HWLOC 1)
else()
set(GINKGO_USE_EXTERNAL_HWLOC 0)
set(GINKGO_HAVE_HWLOC 0)
message(STATUS "HWLOC is being forcibly switched off")
endif()
# Switch off HWLOC for Windows and MacOS
if(MSVC OR WIN32 OR CYGWIN OR APPLE)
Expand Down Expand Up @@ -209,7 +209,7 @@ include(cmake/package_helpers.cmake)
ginkgo_find_package(GTest "GTest::GTest;GTest::Main" FALSE 1.8.1)
ginkgo_find_package(gflags gflags FALSE 2.2.2)
ginkgo_find_package(RapidJSON rapidjson TRUE 1.1.0)
if(NOT GINKGO_DISABLE_HWLOC AND GINKGO_HAVE_HWLOC)
if(GINKGO_HAVE_HWLOC)
ginkgo_find_package(HWLOC hwloc FALSE 2.1)
endif()
set(GKO_HWLOC_XMLFILE "$ENV{HWLOC_XMLFILE}")
Expand Down
2 changes: 1 addition & 1 deletion cmake/GinkgoConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ set(GINKGO_DPCPP_FLAGS @GINKGO_DPCPP_FLAGS@)
set(GINKGO_HAVE_PAPI_SDE @GINKGO_HAVE_PAPI_SDE@)

set(GINKGO_HAVE_HWLOC @GINKGO_HAVE_HWLOC@)
set(GINKGO_DISABLE_HWLOC @GINKGO_DISABLE_HWLOC@)
set(GINKGO_BUILD_HWLOC @GINKGO_BUILD_HWLOC@)

# Ginkgo external package variables
set(GINKGO_USE_EXTERNAL_CAS "@GINKGO_USE_EXTERNAL_CAS@")
Expand Down
4 changes: 2 additions & 2 deletions cmake/get_info.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ if(PAPI_sde_FOUND)
ginkgo_print_variable(${detailed_log} "PAPI_INCLUDE_DIR")
ginkgo_print_flags(${detailed_log} "PAPI_LIBRARY")
endif()
ginkgo_print_variable(${minimal_log} "GINKGO_DISABLE_HWLOC")
ginkgo_print_variable(${detailed_log} "GINKGO_DISABLE_HWLOC")
ginkgo_print_variable(${minimal_log} "GINKGO_BUILD_HWLOC")
ginkgo_print_variable(${detailed_log} "GINKGO_BUILD_HWLOC")
ginkgo_print_variable(${detailed_log} "HWLOC_VERSION")
ginkgo_print_variable(${detailed_log} "GKO_HWLOC_XMLFILE")
ginkgo_print_variable(${detailed_log} "HWLOC_LIBRARIES")
Expand Down
2 changes: 1 addition & 1 deletion core/device_hooks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if (NOT GINKGO_BUILD_DPCPP)
add_library(ginkgo_dpcpp
$<TARGET_OBJECTS:ginkgo_dpcpp_device>
dpcpp_hooks.cpp)
target_link_libraries(ginkgo_dpcpp PUBLIC ginkgo_core_device )
target_link_libraries(ginkgo_dpcpp PUBLIC ginkgo_core_device)
ginkgo_compile_features(ginkgo_dpcpp)
ginkgo_default_includes(ginkgo_dpcpp)
ginkgo_install_library(ginkgo_dpcpp dpcpp)
Expand Down
2 changes: 1 addition & 1 deletion third_party/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if(GINKGO_BUILD_TESTS)
ginkgo_add_subdirectory(GTest gtest)
endif()

if(NOT GINKGO_DISABLE_HWLOC AND GINKGO_HAVE_HWLOC)
if(GINKGO_HAVE_HWLOC)
ginkgo_add_subdirectory(HWLOC hwloc)
endif()

Expand Down

0 comments on commit 6d6fbd1

Please sign in to comment.