Skip to content

Commit

Permalink
Small changes in tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
pghysels committed Jul 13, 2023
1 parent 2c0b804 commit bc9bd20
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ add_test(${test_name} ${CMAKE_CURRENT_BINARY_DIR}/test_sparse_seq rdb968/rdb968.
set_property(TEST ${test_name} PROPERTY ENVIRONMENT "OMP_NUM_THREADS=8")

set(test_name "SPARSE_seq_50")
add_test(${test_name} ${CMAKE_CURRENT_BINARY_DIR}/test_sparse_seq utm300/utm300.mtx --sp_compression BLR --blr_leaf_size 4 --blr_rel_tol 1e-3 --blr_abs_tol 1e-10 --sp_reordering_method metis --sp_enable_METIS_NodeND --sp_compression_min_sep_size 25)
add_test(${test_name} ${CMAKE_CURRENT_BINARY_DIR}/test_sparse_seq utm300/utm300.mtx --sp_compression BLR --blr_leaf_size 4 --blr_rel_tol 1e-3 --blr_abs_tol 1e-10 --sp_reordering_method metis --sp_enable_METIS_NodeND --sp_compression_min_sep_size 25 --sp_rel_tol 1e-12)
set_property(TEST ${test_name} PROPERTY ENVIRONMENT "OMP_NUM_THREADS=8")

set(test_name "SPARSE_seq_56")
Expand Down
6 changes: 4 additions & 2 deletions test/test_sparse_seq.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,11 @@ test_sparse_solver(int argc, const char* const argv[],
auto nrm_x_exact = blas::nrm2(N, x_exact.data(), 1);
cout << "# RELATIVE ERROR = " << (nrm_error/nrm_x_exact) << endl;

if (comp_scal_res > ERROR_TOLERANCE*spss.options().rel_tol())
if (comp_scal_res > ERROR_TOLERANCE*spss.options().rel_tol()) {
cout << "RESIDUAL TOO LARGE!" << endl;
return 1;
else return 0;
}
return 0;
}


Expand Down

0 comments on commit bc9bd20

Please sign in to comment.