From e5063328ce30eeb465cce4c9d5a719b7528cedec Mon Sep 17 00:00:00 2001 From: Mikael Simberg Date: Tue, 5 Nov 2024 13:23:49 +0100 Subject: [PATCH] Print worker thread index --- .../multiplication/test_multiplication_hermitian.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/test/unit/multiplication/test_multiplication_hermitian.cpp b/test/unit/multiplication/test_multiplication_hermitian.cpp index 01a7a2854..73edc5cd4 100644 --- a/test/unit/multiplication/test_multiplication_hermitian.cpp +++ b/test/unit/multiplication/test_multiplication_hermitian.cpp @@ -97,10 +97,18 @@ void testHermitianMultiplication(const blas::Side side, const blas::Uplo uplo, c } // SCOPED_TRACE cannot yield. - // mat_ch.waitLocalTiles(); - // SCOPED_TRACE(::testing::Message() << "m " << m << "n " << n << ", mb " << mb << ", nb " << nb); + mat_ch.waitLocalTiles(); + SCOPED_TRACE(::testing::Message() << "m " << m << "n " << n << ", mb " << mb << ", nb " << nb); + auto t_before = pika::get_worker_thread_num(); CHECK_MATRIX_NEAR(res_c, mat_ch, 10 * (m + 1) * TypeUtilities::error, 10 * (m + 1) * TypeUtilities::error); + auto t_after = pika::get_worker_thread_num(); + if (t_before != t_after) { + std::cerr << "worker thread index changed from " << t_before << " to " << t_after << std::endl; + } + else { + std::cerr << "worker thread index is still " << t_before << std::endl; + } } template