Skip to content

Commit 4ba4418

Browse files
committed
Adding the following flags in the Cmake file under the enable_coverage section:
* --ignore-errors mismatch --rc geninfo_unexecuted_blocks=1 * --ignore-errors unused These flags allowed to save a coverage file even in presence of errors of mismatch type. Fix some parametres setting in the Trilinos GMRES solver: krylov space, max iteration and max restarts.
1 parent 364f8da commit 4ba4418

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Code/Source/solver/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,9 @@ if(ENABLE_COVERAGE)
287287
# add coverage target
288288
add_custom_target(coverage
289289
# gather data
290-
COMMAND ${LCOV} --directory . --capture --output-file coverage.info
290+
COMMAND ${LCOV} --directory . --capture --output-file coverage.info --ignore-errors mismatch --rc geninfo_unexecuted_blocks=1
291291
# exclude externals
292-
COMMAND ${LCOV} --remove coverage.info -o coverage.info '/usr/*' '/opt/*' "${PROJECT_SOURCE_DIR}/ThirdParty/*" '*/CMakeFiles/run_all_unit_tests.dir/*' '/Library/*' 'v1/*'
292+
COMMAND ${LCOV} --remove coverage.info -o coverage.info '/usr/*' '/opt/*' "${PROJECT_SOURCE_DIR}/ThirdParty/*" '/Library/*' 'v1/*' --ignore-errors unused
293293
# generate report
294294
COMMAND ${GENHTML} --demangle-cpp -o coverage coverage.info
295295
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})

Code/Source/solver/trilinos_impl.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,11 +581,14 @@ void trilinos_solve_(const Teuchos::RCP<Trilinos> &trilinos_, double *x, const d
581581
+ Belos::StatusTestDetails
582582
+ Belos::IterationDetails;
583583

584+
int maxRestarts = int(maxIters / kspace)+1;
585+
584586
belosParams.set("Verbosity", verbosity);
585587
belosParams.set("Output Frequency", 1);
586588
belosParams.set("Output Style", 1);
587589
belosParams.set("Convergence Tolerance", relTol);
588590
belosParams.set("Maximum Iterations", maxIters);
591+
belosParams.set("Maximum Restarts", maxRestarts);
589592

590593
std::string solverType;
591594

0 commit comments

Comments
 (0)