Skip to content

Commit de777d0

Browse files
committed
use cmake_host_system_information instead as this actually gives the number of physical cores, which is the relevant number for MPI
1 parent 9cdbe91 commit de777d0

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

test/CMakeLists.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,13 @@ set(FANS_EXECUTABLE $<TARGET_FILE:FANS_main>)
66

77
# determine MPI process count. The discretization of the test geometry allows for max. 8 processes.
88
set(FANS_N_MPI_PROCESSES_MAX 8)
9-
ProcessorCount(FANS_CORES_AVAILABLE_1)
10-
cmake_host_system_information(RESULT FANS_CORES_AVAILABLE_2 QUERY NUMBER_OF_PHYSICAL_CORES)
11-
message(STATUS "ProcessorCount: ${FANS_CORES_AVAILABLE_1}")
12-
message(STATUS "cmake_host_system_information: ${FANS_CORES_AVAILABLE_2}")
13-
14-
set(FANS_CORES_AVAILABLE 2)
9+
cmake_host_system_information(RESULT FANS_CORES_AVAILABLE QUERY NUMBER_OF_PHYSICAL_CORES)
1510
if (FANS_N_MPI_PROCESSES_MAX LESS FANS_CORES_AVAILABLE)
1611
set(FANS_N_MPI_PROCESSES ${FANS_N_MPI_PROCESSES_MAX})
1712
else()
1813
set(FANS_N_MPI_PROCESSES ${FANS_CORES_AVAILABLE})
1914
endif()
15+
message(STATUS "Will use ${FANS_N_MPI_PROCESSES} processes for MPI test cases.")
2016

2117
set(FANS_TEST_CASES
2218
LinearThermalIsotropic

0 commit comments

Comments
 (0)