From 5c6fd2d475a942ec63e1a987ae4ee02ad03be5ec Mon Sep 17 00:00:00 2001 From: Thomas Padioleau Date: Sat, 4 Jan 2025 11:11:11 +0100 Subject: [PATCH] Update and clarify dependencies (#737) * Update and clarify dependencies * Apply suggestions from yasahi-hpc review Co-authored-by: yasahi-hpc <57478230+yasahi-hpc@users.noreply.github.com> --------- Co-authored-by: yasahi-hpc <57478230+yasahi-hpc@users.noreply.github.com> --- CMakeLists.txt | 18 ++++++++++++------ README.md | 22 ++++++++++++++++++++++ cmake/DDCConfig.cmake.in | 4 +++- vendor/benchmark | 2 +- vendor/googletest | 2 +- 5 files changed, 39 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 48f903b3f..b2eee1f87 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() @@ -82,7 +82,8 @@ 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() @@ -90,7 +91,8 @@ if("${BUILD_TESTING}" AND "${DDC_BUILD_TESTS}") 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() @@ -106,7 +108,7 @@ 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() @@ -114,14 +116,14 @@ if("${DDC_BUILD_BENCHMARKS}") 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 @@ -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() @@ -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() diff --git a/README.md b/README.md index cd4ee170e..1f6b7ce22 100644 --- a/README.md +++ b/README.md @@ -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 on branch develop-spline-kernels-v2 + + ## Getting the code and basic configuration ```bash diff --git a/cmake/DDCConfig.cmake.in b/cmake/DDCConfig.cmake.in index d09ad8481..53bed5c4e 100644 --- a/cmake/DDCConfig.cmake.in +++ b/cmake/DDCConfig.cmake.in @@ -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) diff --git a/vendor/benchmark b/vendor/benchmark index 60b16f11a..c58e6d071 160000 --- a/vendor/benchmark +++ b/vendor/benchmark @@ -1 +1 @@ -Subproject commit 60b16f11a30146ac825b7d99be0b9887c24b254a +Subproject commit c58e6d0710581e3a08d65c349664128a8d9a2461 diff --git a/vendor/googletest b/vendor/googletest index b007c54f2..b514bdc89 160000 --- a/vendor/googletest +++ b/vendor/googletest @@ -1 +1 @@ -Subproject commit b007c54f2944e193ac44fba1bc997cb65826a0b9 +Subproject commit b514bdc898e2951020cbdca1304b75f5950d1f59