KokkosCore_UnitTest_Threads_MPI_1 thread_count exceeds capacity
Created by: bavier
I get this failure during make test
with Kokkos and MPI enabled:
2/10 Testing: KokkosCore_UnitTest_Threads_MPI_1
2/10 Test: KokkosCore_UnitTest_Threads_MPI_1
Command: "mpiexec" "-np" "1" "/ptmp/Trilinos/build-openmpi/build-tests/Kokkos/packages/kokkos/core/unit_test/KokkosCore_UnitTest_Threads.exe"
Directory: /ptmp/Trilinos/build-openmpi/build-tests/Kokkos/packages/kokkos/core/unit_test
"KokkosCore_UnitTest_Threads_MPI_1" start time: Apr 28 14:42 America
Output:
-----------------------------------------------------------------
[==========] Running 40 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 40 tests from threads
[New thread 0x7ffff51c6700 (LWP 17277)]
[Thread 0x7ffff51c6700 (LWP 17277) exited]
unknown file: Failure
C++ exception with description "Kokkos::Threads::initialize HWLOC ERROR(s) : thread_count(4) exceeds capacity(2)
Traceback functionality not available
" thrown in SetUpTestCase().
For my machine numa_count == 1
, cores_per_numa == 1
, and threads_per_core == 2
.
The test obviously passes if I give -cpus-per-proc 2
to mpiexec
, or if the test is run with MPI disabled because the test then has access to the desired number of threads.
The current code in SetUpTestCase suggests that it wants at least 4 threads, and will fail otherwise. I think it would be nice to provide a failsafe for cases where the test environment has a smaller capacity.