From fd015d57951678aa34c5d02d8b01d541f21f2d72 Mon Sep 17 00:00:00 2001 From: Karl Pierce Date: Mon, 22 Jan 2024 15:43:20 -0500 Subject: [PATCH] I was testing the wrong function on accident --- unittest/ztensor_cp_test.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/unittest/ztensor_cp_test.cc b/unittest/ztensor_cp_test.cc index f5760001..d01d77a5 100644 --- a/unittest/ztensor_cp_test.cc +++ b/unittest/ztensor_cp_test.cc @@ -98,20 +98,16 @@ TEST_CASE("ZCP") { conv.verbose(false); } #endif - std::cout.precision(16); SECTION("ALS MODE = 4, Finite error") { CP_ALS A1(Z4); conv.set_norm(norm4.real()); - double diff = A1.compute_error(conv, 1e-5, 1, 100, true, 57); - std::cout << diff << std::endl; - std::cout << epsilon << std::endl; - std::cout << A1.get_factor_matrices()[1].extent(1) << std::endl; + double diff = A1.compute_error(conv, 1e-2, 1, 100, true, 57); CHECK(std::abs(diff) <= epsilon); } SECTION("ALS MODE = 4, Finite rank") { CP_ALS A1(Z4); conv.set_norm(norm4.real()); - double diff = A1.compute_rank(80, conv, 1, true, 80); + double diff = A1.compute_rank(57, conv, 1, true, 57); CHECK(std::abs(diff) <= epsilon); } #if BTAS_ENABLE_TUCKER_CP_UT @@ -156,7 +152,11 @@ TEST_CASE("ZCP") { SECTION("RALS MODE = 4, Finite error"){ CP_RALS A1(Z4); conv.set_norm(norm4.real()); - double diff = A1.compute_error(conv, 1e-2, 1, 67, true, 65); + double diff = A1.compute_error(conv, 1e-5, 1, 100, true, 65); + std::cout.precision(16); + std::cout << diff << std::endl; + std::cout << epsilon << std::endl; + std::cout << A1.get_factor_matrices()[1].extent(1) << std::endl; CHECK(std::abs(diff) <= epsilon); } #if BTAS_ENABLE_TUCKER_CP_UT