Skip to content

Commit

Permalink
Shell of support for DAOS
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Eisenhauer committed Apr 2, 2021
1 parent 7fc326d commit d8ee0aa
Show file tree
Hide file tree
Showing 10 changed files with 1,368 additions and 236 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 Daosn" 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 d8ee0aa

Please sign in to comment.