Skip to content

Commit

Permalink
Update and clarify dependencies (#737)
Browse files Browse the repository at this point in the history
* Update and clarify dependencies

* Apply suggestions from yasahi-hpc review

Co-authored-by: yasahi-hpc <[email protected]>

---------

Co-authored-by: yasahi-hpc <[email protected]>
  • Loading branch information
tpadioleau and yasahi-hpc authored Jan 4, 2025
1 parent 9e1bb14 commit 5c6fd2d
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 9 deletions.
18 changes: 12 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ endif()

if("${DDC_BUILD_PDI_WRAPPER}")
if(NOT TARGET PDI::PDI_C)
find_package(PDI REQUIRED COMPONENTS C)
find_package(PDI 1.6...<2 REQUIRED COMPONENTS C)
endif()
endif()

Expand All @@ -82,15 +82,17 @@ if("${BUILD_TESTING}" AND "${DDC_BUILD_TESTS}")

if("${DDC_GTest_DEPENDENCY_POLICY}" STREQUAL "AUTO")
if(NOT TARGET GTest::GTest AND NOT TARGET GTest::gtest)
find_package(GTest QUIET)
# 1.14...<2 but GTest module does not support range version
find_package(GTest 1.14 QUIET)
if(NOT GTest_FOUND)
ddc_configure_googletest()
endif()
endif()
elseif("${DDC_GTest_DEPENDENCY_POLICY}" STREQUAL "EMBEDDED")
ddc_configure_googletest()
elseif("${DDC_GTest_DEPENDENCY_POLICY}" STREQUAL "INSTALLED")
find_package(GTest REQUIRED)
# 1.14...<2 but GTest module does not support range version
find_package(GTest 1.14 REQUIRED)
endif()
endif()

Expand All @@ -106,22 +108,22 @@ if("${DDC_BUILD_BENCHMARKS}")

if("${DDC_benchmark_DEPENDENCY_POLICY}" STREQUAL "AUTO")
if(NOT TARGET benchmark::benchmark)
find_package(benchmark QUIET)
find_package(benchmark 1.8...<2 QUIET)
if(NOT benchmark_FOUND)
ddc_configure_benchmark()
endif()
endif()
elseif("${DDC_benchmark_DEPENDENCY_POLICY}" STREQUAL "EMBEDDED")
ddc_configure_benchmark()
elseif("${DDC_benchmark_DEPENDENCY_POLICY}" STREQUAL "INSTALLED")
find_package(benchmark REQUIRED)
find_package(benchmark 1.8...<2 REQUIRED)
endif()
endif()

## Doxygen

if("${DDC_BUILD_DOCUMENTATION}")
find_package(Doxygen 1.8.13 REQUIRED OPTIONAL_COMPONENTS dot)
find_package(Doxygen 1.8.13...<2 REQUIRED OPTIONAL_COMPONENTS dot)
endif()

# Our project
Expand Down Expand Up @@ -206,6 +208,8 @@ if("${DDC_BUILD_KERNELS_SPLINES}")
)
if("${DDC_KokkosKernels_DEPENDENCY_POLICY}" STREQUAL "AUTO")
if(NOT TARGET Kokkos::kokkoskernels)
# fork https://github.com/yasahi-hpc/kokkos-kernels
# on branch develop-spline-kernels-v2
find_package(KokkosKernels QUIET)
if(NOT KokkosKernels_FOUND)
ddc_configure_kokkos_kernels()
Expand All @@ -214,6 +218,8 @@ if("${DDC_BUILD_KERNELS_SPLINES}")
elseif("${DDC_KokkosKernels_DEPENDENCY_POLICY}" STREQUAL "EMBEDDED")
ddc_configure_kokkos_kernels()
elseif("${DDC_KokkosKernels_DEPENDENCY_POLICY}" STREQUAL "INSTALLED")
# fork https://github.com/yasahi-hpc/kokkos-kernels
# on branch develop-spline-kernels-v2
find_package(KokkosKernels REQUIRED)
endif()

Expand Down
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,28 @@ If you like the project, please leave us a github star.

If you want to know more, join un on [Slack](https://join.slack.com/t/ddc-lib/shared_invite/zt-14b6rjcrn-AwSfM6_arEamAKk_VgQPhg)

## Prerequisites

To use DDC core, one needs the following dependencies:

* a C++17-compliant compiler
* CMake 3.22...<4
* Kokkos 4.4...4.5
* (optional, micro benchmarking) Benchmark 1.8...<2
* (optional, documentation) Doxygen 1.8.13...<2
* (optional, unit-testing) GoogleTest 1.14...<2

To use DDC components, one needs the following dependencies:

* (optional, fft interface) DDC::fft
* Kokkos-fft 0.2.1...<1
* (optional, IO interface) DDC::pdi
* PDI 1.6...<2
* (optional, spline interpolation) DDC::splines
* Ginkgo 1.8.0
* Kokkos Kernels fork <https://github.com/yasahi-hpc/kokkos-kernels> on branch develop-spline-kernels-v2


## Getting the code and basic configuration

```bash
Expand Down
4 changes: 3 additions & 1 deletion cmake/DDCConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@ if(@DDC_BUILD_KERNELS_SPLINES@)
list(PREPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
ddc_find_dependency(LAPACKE)
list(POP_FRONT CMAKE_MODULE_PATH)
# fork https://github.com/yasahi-hpc/kokkos-kernels
# on branch develop-spline-kernels-v2
ddc_find_dependency(KokkosKernels)
endif()

if(@DDC_BUILD_PDI_WRAPPER@)
ddc_find_dependency(PDI COMPONENTS C)
ddc_find_dependency(PDI 1.6...<2 COMPONENTS C)
endif()

include(${CMAKE_CURRENT_LIST_DIR}/DDCTargets.cmake)
Expand Down
2 changes: 1 addition & 1 deletion vendor/benchmark
Submodule benchmark updated 157 files
2 changes: 1 addition & 1 deletion vendor/googletest
Submodule googletest updated 170 files

0 comments on commit 5c6fd2d

Please sign in to comment.