Skip to content

Commit

Permalink
Merge pull request #2669 from eisenhauer/DAOS
Browse files Browse the repository at this point in the history
Skeletal Daos support
  • Loading branch information
eisenhauer authored Apr 8, 2021
2 parents 74894ff + e02a5c1 commit 8cf043e
Show file tree
Hide file tree
Showing 10 changed files with 1,359 additions and 7 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ adios_option(SZ "Enable support for SZ transforms" AUTO)
adios_option(MGARD "Enable support for MGARD transforms" AUTO)
adios_option(PNG "Enable support for PNG transforms" AUTO)
adios_option(MPI "Enable support for MPI" AUTO)
adios_option(DAOS "Enable support for DAOS" AUTO)
adios_option(DataMan "Enable support for DataMan" AUTO)
adios_option(DataSpaces "Enable support for DATASPACES" AUTO)
adios_option(SSC "Enable support for SSC" AUTO)
Expand All @@ -149,7 +150,7 @@ if(ADIOS2_HAVE_MPI)
endif()

set(ADIOS2_CONFIG_OPTS
Blosc BZip2 ZFP SZ MGARD PNG MPI DataMan Table SSC SST DataSpaces ZeroMQ HDF5 HDF5_VOL IME Python Fortran SysVShMem Profiling Endian_Reverse
Blosc BZip2 ZFP SZ MGARD PNG MPI DataMan DAOS Table SSC SST DataSpaces ZeroMQ HDF5 HDF5_VOL IME Python Fortran SysVShMem Profiling Endian_Reverse
)
GenerateADIOSHeaderConfig(${ADIOS2_CONFIG_OPTS})
configure_file(
Expand Down
5 changes: 5 additions & 0 deletions cmake/DetectOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,11 @@ if(ADIOS2_USE_SST AND NOT MSVC)
endif()
endif()

find_package(DAOS)
if(DAOS_FOUND)
set(ADIOS2_HAVE_DAOS TRUE)
endif()

#SysV IPC
if(UNIX)
include(CheckSymbolExists)
Expand Down
65 changes: 65 additions & 0 deletions cmake/FindDAOS.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#------------------------------------------------------------------------------#
# Distributed under the OSI-approved Apache License, Version 2.0. See
# accompanying file Copyright.txt for details.
#------------------------------------------------------------------------------#
#
# FindDAOS
# -----------
#
# Try to find the DAOS library
#
# This module defines the following variables:
#
# DAOS_FOUND - System has DAOS
# DAOS_INCLUDE_DIRS - The DAOS include directory
# DAOS_LIBRARIES - Link these to use DAOS
#
# and the following imported targets:
# DAOS::DAOS - The core DAOS library
#
# You can also set the following variable to help guide the search:
# DAOS_ROOT - The install prefix for DAOS containing the
# include and lib folders
# Note: this can be set as a CMake variable or an
# environment variable. If specified as a CMake
# variable, it will override any setting specified
# as an environment variable.

if(CMAKE_VERSION VERSION_LESS 3.12)
if((NOT DAOS_ROOT) AND (NOT (ENV{DAOS_ROOT} STREQUAL "")))
set(DAOS_ROOT "$ENV{DAOS_ROOT}")
endif()
if(DAOS_ROOT)
set(DAOS_INCLUDE_OPTS HINTS ${DAOS_ROOT}/include NO_DEFAULT_PATHS)
set(DAOS_LIBRARY_OPTS
HINTS ${DAOS_ROOT}/lib ${DAOS_ROOT}/lib64
NO_DEFAULT_PATHS
)
endif()
endif()


message(STATUS "DAOS_ROOT is is \"$ENV{DAOS_ROOT}\"")
find_path(DAOS_INCLUDE_DIR daos_api.h ${DAOS_INCLUDE_OPTS})
find_library(DAOS_LIBRARY libdaos.so ${DAOS_LIBRARY_OPTS})
find_library(DFS_LIBRARY libdfs.so ${DAOS_LIBRARY_OPTS})

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(DAOS
FOUND_VAR DAOS_FOUND
REQUIRED_VARS DAOS_LIBRARY DAOS_INCLUDE_DIR
)

if(DAOS_FOUND)
set(DAOS_INCLUDE_DIRS ${DAOS_INCLUDE_DIR})
set(DAOS_LIBRARIES ${DAOS_LIBRARY} ${DFS_LIBRARY})
message(STATUS "DAOS Libraries \"${DAOS_LIBRARIES}\"")
if(NOT TARGET DAOS::DAOS)
add_library(DAOS::DAOS UNKNOWN IMPORTED)
set_target_properties(DAOS::DAOS PROPERTIES
IMPORTED_LOCATION "${DAOS_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${DAOS_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "${DAOS_LIBRARIES}"
)
endif()
endif()
5 changes: 5 additions & 0 deletions source/adios2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ if(UNIX)
target_sources(adios2_core PRIVATE toolkit/transport/file/FilePOSIX.cpp)
endif()

if(ADIOS2_HAVE_DAOS)
target_sources(adios2_core PRIVATE toolkit/transport/file/FileDaos.cpp)
target_link_libraries(adios2_core PRIVATE DAOS::DAOS)
endif()

if(ADIOS2_HAVE_MPI)
add_library(adios2_core_mpi
core/IOMPI.cpp
Expand Down
6 changes: 6 additions & 0 deletions source/adios2/toolkit/sst/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ if(ADIOS2_SST_HAVE_LIBFABRIC)
endif()
endif()

if(ADIOS2_HAVE_DAOS)
target_sources(sst PRIVATE dp/daos_dp.c)
target_link_libraries(sst PRIVATE DAOS::DAOS)
set(CMAKE_REQUIRED_INCLUDES ${DAOS_INCLUDE_DIRS})
endif()

if(ADIOS2_HAVE_ZFP)
target_sources(sst PRIVATE cp/ffs_zfp.c)
target_link_libraries(sst PRIVATE zfp::zfp)
Expand Down
Loading

0 comments on commit 8cf043e

Please sign in to comment.