Skip to content

Commit

Permalink
Tests: Fix MPI MCA
Browse files Browse the repository at this point in the history
  • Loading branch information
ax3l committed Aug 29, 2024
1 parent 776cae4 commit d79d2ff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 22 deletions.
28 changes: 6 additions & 22 deletions recipes/heffte/55.patch
Original file line number Diff line number Diff line change
@@ -1,29 +1,15 @@
From 89ce120bf5ec11d31c263fa08d8a1bf05d8f6492 Mon Sep 17 00:00:00 2001
From 7a7c4531aaa03169a09d3bbd0180a5a6dc1687b2 Mon Sep 17 00:00:00 2001
From: Axel Huebl <[email protected]>
Date: Wed, 28 Aug 2024 17:41:16 -0700
Subject: [PATCH] [Draft] Fix CMake: FFTW Threads
Subject: [PATCH] Fix CMake: FFTW Threads

Trying to fix build issues on Linux in Conda-Forge in which
pthreads are over-linked and ill-resolved from FFTW.
---
CMakeLists.txt | 2 +-
cmake/FindHeffteFFTW.cmake | 19 ++++++++++++++++++-
cmake/HeffteConfig.cmake | 21 +++++++++++++++++----
3 files changed, 36 insertions(+), 6 deletions(-)
cmake/HeffteConfig.cmake | 19 +++++++++++++++----
2 files changed, 33 insertions(+), 5 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7cae61e..0ae6da9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -298,7 +298,7 @@ configure_package_config_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/HeffteConfig.cm
# EXAMPLES and TESTS #
######################
if (Heffte_ENABLE_TESTING)
- add_subdirectory(benchmarks)
+# add_subdirectory(benchmarks)
add_subdirectory(examples)
add_subdirectory(test)
endif()
diff --git a/cmake/FindHeffteFFTW.cmake b/cmake/FindHeffteFFTW.cmake
index 3e96d91..4143320 100644
--- a/cmake/FindHeffteFFTW.cmake
Expand Down Expand Up @@ -63,10 +49,10 @@ index 3e96d91..4143320 100644
list(APPEND FFTW_LIBRARIES "${Heffte_FFTW_LIBOMP}")
else()
diff --git a/cmake/HeffteConfig.cmake b/cmake/HeffteConfig.cmake
index dc7b432..11ccdfe 100644
index dc7b432..1ddf470 100644
--- a/cmake/HeffteConfig.cmake
+++ b/cmake/HeffteConfig.cmake
@@ -8,13 +8,26 @@ endif()
@@ -8,13 +8,24 @@ endif()

include("${CMAKE_CURRENT_LIST_DIR}/HeffteTargets.cmake")

Expand All @@ -80,8 +66,6 @@ index dc7b432..11ccdfe 100644
+ else()
+ find_package(Threads REQUIRED)
+ endif()
+ if(Threads_FOUND)
+ endif()
+ endif()
if ("@OpenMP_FOUND@")
find_package(OpenMP REQUIRED)
Expand Down
2 changes: 2 additions & 0 deletions recipes/heffte/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ set -eu -x -o pipefail

export OMP_NUM_THREADS=2

export OMPI_MCA_plm=^rsh

cmake \
-S ${PREFIX}/share/heffte/testing \
-B build_test \
Expand Down

0 comments on commit d79d2ff

Please sign in to comment.