diff --git a/resolve/LinSolverDirectCuSparseILU0.cpp b/resolve/LinSolverDirectCuSparseILU0.cpp index 1a8713565..cf3ea005b 100644 --- a/resolve/LinSolverDirectCuSparseILU0.cpp +++ b/resolve/LinSolverDirectCuSparseILU0.cpp @@ -208,7 +208,6 @@ namespace ReSolve error_sum += status_cusparse_; cusparseDestroyDnVec(vec_X_); cusparseDestroyDnVec(vec_Y_); - printf("this is setup, error sum is %d \n", error_sum); return error_sum; } diff --git a/resolve/LinSolverIterativeRandFGMRES.cpp b/resolve/LinSolverIterativeRandFGMRES.cpp index 64761ceda..5c4137f3e 100644 --- a/resolve/LinSolverIterativeRandFGMRES.cpp +++ b/resolve/LinSolverIterativeRandFGMRES.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include @@ -8,7 +9,6 @@ #include #include - namespace ReSolve { using out = io::Logger; @@ -198,7 +198,9 @@ namespace ReSolve //rnorm = ||V_1|| rnorm = sqrt(rnorm); bnorm = sqrt(bnorm); - printf("it 0: norm %16.16e bnorm %16.16e \n", rnorm, bnorm); + io::Logger::misc() << "it 0: norm of residual " + << std::scientific << std::setprecision(16) + << rnorm << " Norm of rhs: " << bnorm << "\n"; initial_residual_norm_ = rnorm; while(outer_flag) { // check if maybe residual is already small enough? @@ -308,14 +310,19 @@ namespace ReSolve // residual norm estimate rnorm = fabs(h_rs_[i + 1]); - printf("it %d: norm %16.16e \n",it, rnorm); + + io::Logger::misc() << "it: "<= restart_ || rnorm <= tolrel || it >= maxit_) { notconv = 0; } } // inner while - printf("end of cycle, estimated norm %16.16e, flexible?%d \n", rnorm, flexible_); + io::Logger::misc() << "End of cycle, ESTIMATED norm of residual " + << std::scientific << std::setprecision(16) + << rnorm << "\n"; // solve tri system h_rs_[i] = h_rs_[i] / h_H_[i * (restart_ + 1) + i]; for (int ii = 2; ii <= i + 1; ii++) { @@ -379,7 +386,11 @@ namespace ReSolve rnorm = vector_handler_->dot(d_V_, d_V_, memspace_); // rnorm = ||V_0|| rnorm = sqrt(rnorm); - printf("end of cycle, true norm (after sqrt) %16.16e \n", rnorm); + + io::Logger::misc() << "End of cycle, COMPUTER norm of residual " + << std::scientific << std::setprecision(16) + << rnorm << "\n"; + final_residual_norm_ = rnorm; fgmres_iters_ = it; } diff --git a/runResolveOneMatrix b/runResolveOneMatrix deleted file mode 100755 index 68a54dce9..000000000 --- a/runResolveOneMatrix +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -# this is the folder where you keep your matrix files and rhs files -loc=/ccs/home/kswirydo/matrices - -# matrix and rhs file name, change accordingly -matfile="$loc/vas_stokes_1M.mtx" -rhsfile="$loc/vas_stokes_1M_rhs.mtx" - -echo $matfile -echo $rhsfile - -# call with ./runResolveOneMatrix -# example: ./runResolveOneMatrix ./build/examples/gmres_cusparse_rand.exe -./$1 $matfile $rhsfile - -# uncomment if debugging on OLCF systems -#rm -f core