Skip to content

Commit 3cc3ae0

Browse files
committed
tests that are supposed to pass are passing
1 parent 4e529f2 commit 3cc3ae0

10 files changed

+125
-183396
lines changed

tests/functionality/CMakeLists.txt

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ if(RESOLVE_USE_KLU)
3636
add_executable(sys_glu_test.exe testSysGLU.cpp)
3737
target_link_libraries(sys_glu_test.exe PRIVATE ReSolve)
3838

39-
add_executable(sys_glu_asym_test.exe testSysGLUAsym.cpp)
40-
target_link_libraries(sys_glu_asym_test.exe PRIVATE ReSolve)
39+
# add_executable(sys_glu_asym_test.exe testSysGLUAsym.cpp)
40+
# target_link_libraries(sys_glu_asym_test.exe PRIVATE ReSolve)
4141

4242
endif(RESOLVE_USE_CUDA)
4343
endif(RESOLVE_USE_KLU)
@@ -62,7 +62,7 @@ if(RESOLVE_USE_KLU)
6262

6363
if(RESOLVE_USE_CUDA)
6464
list(APPEND installable_tests sys_glu_test.exe)
65-
list(APPEND installable_tests sys_glu_asym_test.exe)
65+
# list(APPEND installable_tests sys_glu_asym_test.exe)
6666
endif(RESOLVE_USE_CUDA)
6767
endif()
6868

@@ -76,7 +76,12 @@ install(TARGETS ${installable_tests}
7676
# Install directory with data files
7777
install(DIRECTORY data DESTINATION bin/resolve/tests/functionality)
7878

79-
set(test_data_dir ${CMAKE_SOURCE_DIR}/tests/functionality/)
79+
set(test_data_dir ${CMAKE_SOURCE_DIR}/tests/functionality)
80+
set(sym_matrix_path /data/matrix_ACTIVSg2000_AC_)
81+
set(sym_rhs_path /data/rhs_ACTIVSg2000_AC_ones)
82+
set(asym_matrix_path /data/ScaleMicrogrid_Jacobian_N1000_)
83+
set(asym_rhs_path /data/ScaleMicrogrid_Reisudal_N1000_ones_number)
84+
8085

8186
add_test(NAME version COMMAND $<TARGET_FILE:version.exe>)
8287

@@ -117,17 +122,20 @@ add_test(NAME rand_gmres_test COMMAND $<TARGET_FILE:rand_gmres_test.exe>)
117122

118123
if(RESOLVE_USE_KLU)
119124
# Using KLU as refactorization solver
120-
add_test(NAME klu_klu_test COMMAND $<TARGET_FILE:klu_klu_test.exe> "-d" "${test_data_dir}")
121-
add_test(NAME klu_klu_ir_test COMMAND $<TARGET_FILE:klu_klu_test.exe> "-d" "${test_data_dir}" "-i")
125+
add_test(NAME klu_klu_test COMMAND $<TARGET_FILE:klu_klu_test.exe> "-d" "${test_data_dir}" "-m" "${sym_matrix_path}" "-r" "${sym_rhs_path}") # expected fail, tolerance too strict
126+
add_test(NAME klu_klu_ir_test COMMAND $<TARGET_FILE:klu_klu_test.exe> "-d" "${test_data_dir}" "-m" "${sym_matrix_path}" "-r" "${sym_rhs_path}" "-i")
127+
add_test(NAME klu_klu_asym_test COMMAND $<TARGET_FILE:klu_klu_test.exe> "-d" "${test_data_dir}" "-m" "${asym_matrix_path}" "-r" "${asym_rhs_path}")
128+
add_test(NAME klu_klu_asym_ir_test COMMAND $<TARGET_FILE:klu_klu_test.exe> "-d" "${test_data_dir}" "-m" "${asym_matrix_path}" "-r" "${asym_rhs_path}" "-i") # expected fail, IR should not be used when tolerance is reached
122129

123130
# CUDA-SDK specific tests
124131
if(RESOLVE_USE_CUDA)
125132
add_test(NAME klu_rf_cuda_test COMMAND $<TARGET_FILE:klu_rf_test.exe> "-d" "${test_data_dir}")
126133
add_test(NAME klu_rf_ir_cuda_test COMMAND $<TARGET_FILE:klu_rf_test.exe> "-d" "${test_data_dir}" "-i")
127134
add_test(NAME klu_glu_cuda_test COMMAND $<TARGET_FILE:klu_rf_test.exe> "-d" "${test_data_dir}" "-s" "glu")
128-
add_test(NAME sys_refactor_cuda_test COMMAND $<TARGET_FILE:sys_refactor_test.exe> "${test_data_dir}")
129-
add_test(NAME sys_glu_test COMMAND $<TARGET_FILE:sys_glu_test.exe> "${test_data_dir}")
130-
add_test(NAME sys_glu_asym_test COMMAND $<TARGET_FILE:sys_glu_asym_test.exe> "${test_data_dir}")
135+
add_test(NAME sys_refactor_cuda_test COMMAND $<TARGET_FILE:sys_refactor_test.exe> "${test_data_dir}" "-d" "${test_data_dir}" "-m" "${sym_matrix_path}" "-r" "${sym_rhs_path}")
136+
add_test(NAME sys_refactor_cuda_asym_test COMMAND $<TARGET_FILE:sys_refactor_test.exe> "${test_data_dir}" "-d" "${test_data_dir}" "-m" "${asym_matrix_path}" "-r" "${asym_rhs_path}") # expected fail, IR should not be used when tolerance is reached
137+
add_test(NAME sys_glu_test COMMAND $<TARGET_FILE:sys_glu_test.exe> "${test_data_dir}" "-d" "${test_data_dir}" "-m" "${sym_matrix_path}" "-r" "${sym_rhs_path}")
138+
add_test(NAME sys_glu_asym_test COMMAND $<TARGET_FILE:sys_glu_test.exe> "${test_data_dir}" "-d" "${test_data_dir}" "-m" "${asym_matrix_path}" "-r" "${asym_rhs_path}")
131139
endif(RESOLVE_USE_CUDA)
132140

133141
# ROCm specific tests
@@ -136,6 +144,7 @@ if(RESOLVE_USE_KLU)
136144
add_test(NAME rocsolver_rf_m1_test COMMAND $<TARGET_FILE:klu_rf_test.exe> "-d" "${test_data_dir}" "-m" "rocsparse_trisolve")
137145
add_test(NAME rocsolver_rf_ir_test COMMAND $<TARGET_FILE:klu_rf_test.exe> "-d" "${test_data_dir}" "-i")
138146
add_test(NAME rocsolver_rf_ir_m1_test COMMAND $<TARGET_FILE:klu_rf_test.exe> "-d" "${test_data_dir}" "-i" "-m" "rocsparse_trisolve")
139-
add_test(NAME sys_refactor_hip_test COMMAND $<TARGET_FILE:sys_refactor_test.exe> "${test_data_dir}")
147+
add_test(NAME sys_refactor_cuda_test COMMAND $<TARGET_FILE:sys_refactor_test.exe> "${test_data_dir}" "-d" "${test_data_dir}" "-m" "${sym_matrix_path}" "-r" "${sym_rhs_path}")
148+
add_test(NAME sys_refactor_cuda_asym_test COMMAND $<TARGET_FILE:sys_refactor_test.exe> "${test_data_dir}" "-d" "${test_data_dir}" "-m" "${asym_matrix_path}" "-r" "${asym_rhs_path}") # expected fail, IR should not be used when tolerance is reached
140149
endif(RESOLVE_USE_HIP)
141150
endif(RESOLVE_USE_KLU)

tests/functionality/TestHelper.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,6 @@ class TestHelper
232232
std::cout << "\t Residual norm on CPU ||b-A*x|| (CPU) : " << getNormResidualCpu() << "\n";
233233
}
234234
std::cout << "\t Relative residual norm ||b-A*x||/||b|| : " << getNormResidualScaled() << "\n";
235-
std::cout << "\t Error norm ||x-x_true|| : " << getNormDiff() << "\n";
236-
std::cout << "\t Relative error norm ||x-x_true||/||x_true|| : " << getNormDiffScaled() << "\n";
237-
std::cout << "\t Exact solution residual ||b-A*x_true|| : " << getNormResidualTrue() << "\n";
238235
}
239236

240237
/// Summary of error norms for an iterative refinement test.

0 commit comments

Comments
 (0)