From 59e1955a2dbaff7de92224f10fac269280099157 Mon Sep 17 00:00:00 2001 From: Eduard Valeyev Date: Wed, 1 Sep 2021 14:14:50 -0400 Subject: [PATCH 1/2] unit test with >1 ranks only reports errors from ranks 1...N-1, regardless of the log level on rank 0 --- tests/ta_test.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/ta_test.cpp b/tests/ta_test.cpp index 8e2bc45705..f8ac27f1f8 100644 --- a/tests/ta_test.cpp +++ b/tests/ta_test.cpp @@ -45,6 +45,11 @@ GlobalFixture::GlobalFixture() { // to launch a debugger here or elsewhere: // Debugger::default_debugger()->debug("ready to run"); } + + if (world->rank() != 0) { + boost::unit_test::unit_test_log.set_threshold_level( + boost::unit_test::log_all_errors); + } } GlobalFixture::~GlobalFixture() { From 96f9a870e156b3ab685989f5b87842345ed98b60 Mon Sep 17 00:00:00 2001 From: Eduard Valeyev Date: Wed, 1 Sep 2021 14:16:31 -0400 Subject: [PATCH 2/2] raise unit test log level to unit_scope --- tests/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index a4b00ef92d..0fa3385f08 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -166,7 +166,7 @@ if(ENABLE_MPI) NAME tiledarray/unit/run-np-${p} COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${p} ${MPIEXEC_PREFLAGS} - $ --log_level=warning --show-progress ${${executable}_np_${p}_args} + $ --log_level=unit_scope ${${executable}_np_${p}_args} ${MPIEXEC_POSTFLAGS} ) set_tests_properties(tiledarray/unit/run-np-${p}