diff --git a/resolve/hykkt/cholesky/CholeskySolverHip.cpp b/resolve/hykkt/cholesky/CholeskySolverHip.cpp index 0b7601c20..d03eaf8b0 100644 --- a/resolve/hykkt/cholesky/CholeskySolverHip.cpp +++ b/resolve/hykkt/cholesky/CholeskySolverHip.cpp @@ -109,10 +109,10 @@ namespace ReSolve mem_.allocateArrayOnDevice(&Q_, A_->getNumRows()); mem_.copyArrayHostToDevice(Q_, static_cast(factorization_->Perm), A_->getNumRows()); - //tmp rhs for analysis + // tmp rhs for analysis mem_.allocateArrayOnDevice(&rhs_tmp_, A_->getNumColumns()); mem_.setArrayToConstOnHost(rhs_tmp_, 1.0, A_->getNumColumns()); - + // Store analysis in rfinfo_ rocblas_status status = rocsolver_dcsrrf_analysis(handle_, A_->getNumRows(), @@ -130,12 +130,12 @@ namespace ReSolve rhs_tmp_, A_->getNumRows(), rfinfo_); - mem_.deleteOnDevice(rhs_tmp_); - rhs_tmp_ = nullptr; - if (status != rocblas_status_success) - { - out::error() << "Analysis step failed with status: " << status << "\n"; - } + mem_.deleteOnDevice(rhs_tmp_); + rhs_tmp_ = nullptr; + if (status != rocblas_status_success) + { + out::error() << "Analysis step failed with status: " << status << "\n"; + } } else // re-factorize { diff --git a/resolve/hykkt/cholesky/CholeskySolverHip.hpp b/resolve/hykkt/cholesky/CholeskySolverHip.hpp index 166fa3bb0..3661bcaa6 100644 --- a/resolve/hykkt/cholesky/CholeskySolverHip.hpp +++ b/resolve/hykkt/cholesky/CholeskySolverHip.hpp @@ -39,8 +39,8 @@ namespace ReSolve matrix::Csr* L_; index_type* Q_; - real_type* rhs_tmp_;// used during analysis - + real_type* rhs_tmp_; // used during analysis + cholmod_sparse* convertToCholmod(matrix::Csr* A); }; } // namespace hykkt diff --git a/tests/unit/hykkt/runHykktCholeskyTests.cpp b/tests/unit/hykkt/runHykktCholeskyTests.cpp index 5ac493f0a..f350dc738 100644 --- a/tests/unit/hykkt/runHykktCholeskyTests.cpp +++ b/tests/unit/hykkt/runHykktCholeskyTests.cpp @@ -29,6 +29,8 @@ void runTests(const std::string& backend, ReSolve::memory::MemorySpace memspace, ReSolve::tests::HykktCholeskyTests test(memspace, handler); result += test.minimalCorrectness(); + handler.setValuesChanged(true, memspace); + workspace.resetLinAlgWorkspace(); // reset is necessary due to different sparsity. for (int size : {3, 10, 100, 1000}) {