Skip to content

[WIP] Replacing DART locality interface by dyloc #408

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 20 commits into
base: development
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeExt/GoogleTest.cmake
Original file line number Diff line number Diff line change
@@ -52,7 +52,7 @@ else()
# Wrap download, configure and build steps in a script to log output
LOG_DOWNLOAD ON
LOG_CONFIGURE ON
LOG_BUILD ON
LOG_BUILD OFF
)
set(GTEST_LOCATION "${GTEST_PREFIX}/src/GTestExternal-build/googlemock/gtest")
set(GTEST_INCLUDES "${GTEST_PREFIX}/src/GTestExternal/googletest/include")
99 changes: 99 additions & 0 deletions CMakeExt/dyloc.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@

include(ExternalProject)

# Discussion of integration alternatives:
# https://stackoverflow.com/questions/9689183/cmake-googletest


set(DYLOC_SOURCE_PATH
"$ENV{DYLOC_SOURCE_PATH}" CACHE PATH
"Base path to the dyloc source distribution")

if(ENABLE_DYLOC)
set(DART_IMPLEMENTATIONS ${DART_IMPLEMENTATIONS} PARENT_SCOPE)
set(ENVIRONMENT_TYPE ${ENVIRONMENT_TYPE} PARENT_SCOPE)
set(ENABLE_LOGGING ${ENABLE_LOGGING} PARENT_SCOPE)

set(DYLOC_PREFIX "${CMAKE_BINARY_DIR}/dyloc")
set(DYLOC_INSTALL_PREFIX "${DYLOC_PREFIX}/install")

message(STATUS "Building dyloc in ${DYLOC_PREFIX}")

list(
APPEND DYLOC_CMAKE_ARGS
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DENVIRONMENT_TYPE=${ENVIRONMENT_TYPE}
-DCMAKE_INSTALL_PREFIX=${DYLOC_INSTALL_PREFIX}
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DBOOST_INCLUDEDIR=${BOOST_INCLUDE_DIRS}
-DBOOST_LIBRARYDIR=${BOOST_LIBRARIES}
-DBUILD_TESTS=OFF
-DENABLE_LOGGING=${ENABLE_LOGGING}
-DENABLE_PAPI=${ENABLE_PAPI}
-DENABLE_LIBNUMA=${ENABLE_LIBNUMA}
-DDART_IMPLEMENTATIONS=${DART_IMPLEMENTATIONS}
-DDART_PREFIX=${CMAKE_BINARY_DIR}
-DDART_INCLUDE_DIRS=${CMAKE_SOURCE_DIR}/dart-if/include
)
if (DYLOC_SOURCE_PATH)
ExternalProject_Add(
dylocExternal
URL ${DYLOC_SOURCE_PATH}
PREFIX "${DYLOC_PREFIX}"
CMAKE_ARGS ${DYLOC_CMAKE_ARGS}
INSTALL_DIR ${DYLOC_INSTALL_PREFIX}
LOG_INSTALL ON
)
else()
ExternalProject_Add(
dylocExternal
GIT_REPOSITORY https://github.com/dash-project/dyloc.git
GIT_TAG master
TIMEOUT 10
PREFIX "${DYLOC_PREFIX}"
CMAKE_ARGS ${DYLOC_CMAKE_ARGS}
INSTALL_DIR ${DYLOC_INSTALL_PREFIX}
LOG_INSTALL ON
)
endif()

set(DYLOC_BUILD_DIR "${DYLOC_PREFIX}/src/dylocExternal-build/dyloc")
set(DYLOC_BASE "${DYLOC_INSTALL_PREFIX}")
set(DYLOC_INCLUDES "${DYLOC_BASE}/include")
set(DYLOC_LIBRARY "${DYLOC_BASE}/lib/${LIBPREFIX}dyloc${LIBSUFFIX}")
set(DYLOC_COMMON_LIBRARY "${DYLOC_BASE}/lib/${LIBPREFIX}dyloc-common${LIBSUFFIX}")
set(DYLOCXX_LIBRARY "${DYLOC_BASE}/lib/${LIBPREFIX}dylocxx${LIBSUFFIX}")

message(STATUS "dyloc source path: " ${DYLOC_SOURCE_PATH})
message(STATUS "dyloc include path: " ${DYLOC_INCLUDES})

add_dependencies(dylocExternal dart-mpi)
add_dependencies(dylocExternal dart-base)

add_library(dyloc-common IMPORTED STATIC GLOBAL)
set_target_properties(
dyloc-common
PROPERTIES
IMPORTED_LOCATION "${DYLOC_LIBRARY}"
IMPORTED_LINK_INTERFACE_LIBRARIES "${CMAKE_THREAD_LIBS_INIT}")
add_dependencies(dyloc-common dylocExternal)

add_library(dylocxx IMPORTED STATIC GLOBAL)
set_target_properties(
dylocxx
PROPERTIES
IMPORTED_LOCATION "${DYLOC_LIBRARY}"
IMPORTED_LINK_INTERFACE_LIBRARIES "${CMAKE_THREAD_LIBS_INIT}")
add_dependencies(dylocxx dylocExternal)

add_library(dyloc IMPORTED STATIC GLOBAL)
set_target_properties(
dyloc
PROPERTIES
IMPORTED_LOCATION "${DYLOC_LIBRARY}"
IMPORTED_LINK_INTERFACE_LIBRARIES "${CMAKE_THREAD_LIBS_INIT}")
add_dependencies(dyloc dylocExternal)

endif()

File renamed without changes.
12 changes: 11 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -79,6 +79,8 @@ option(ENABLE_DEFAULT_INDEX_TYPE_LONG
"Specify whether to use int64_t as default index type" on)
option(ENABLE_LIBNUMA
"Specify whether libnuma features are enabled" on)
option(ENABLE_DYLOC
"Specify whether dyloc features are enabled" on)
option(ENABLE_HWLOC
"Specify whether hwloc features are enabled" on)
option(ENABLE_HWLOC_PCI
@@ -128,7 +130,7 @@ endif()
# has been loaded:
include(${CMAKE_SOURCE_DIR}/CMakeExt/MPI.cmake)
include(${CMAKE_SOURCE_DIR}/CMakeExt/PAPI.cmake)
include(${CMAKE_SOURCE_DIR}/CMakeExt/Hwloc.cmake)
include(${CMAKE_SOURCE_DIR}/CMakeExt/hwloc.cmake)
include(${CMAKE_SOURCE_DIR}/CMakeExt/Likwid.cmake)
include(${CMAKE_SOURCE_DIR}/CMakeExt/NUMA.cmake)
include(${CMAKE_SOURCE_DIR}/CMakeExt/IPM.cmake)
@@ -224,6 +226,7 @@ add_subdirectory(dart-if)
# DART base:
add_subdirectory(dart-impl)

# DASH:
add_subdirectory(dash)

## Documentation
@@ -274,6 +277,8 @@ message(INFO "Default index type long: (ENABLE_DEFAULT_INDEX_TYPE_LONG) "
${ENABLE_DEFAULT_INDEX_TYPE_LONG})
message(INFO "libnuma support: (ENABLE_LIBNUMA) "
${ENABLE_LIBNUMA})
message(INFO "dyloc support: (ENABLE_DYLOC) "
${ENABLE_DYLOC})
message(INFO "hwloc support: (ENABLE_HWLOC) "
${ENABLE_HWLOC})
message(INFO "hwloc PCI support: (ENABLE_HWLOC_PCI) "
@@ -327,6 +332,11 @@ if (ENABLE_BLAS)
else()
message(NOTE "BLAS disabled")
endif()
if (ENABLE_DYLOC)
message(INFO "dyloc enabled")
else()
message(NOTE "dyloc disabled")
endif()
if (ENABLE_HWLOC)
if (HWLOC_FOUND)
message(INFO "hwloc enabled")
241 changes: 0 additions & 241 deletions dart-if/include/dash/dart/if/dart_locality.h

This file was deleted.

Loading