Skip to content

Commit

Permalink
Address PR 120 comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
pelesh committed Dec 20, 2023
1 parent a003d82 commit fbeae5e
Show file tree
Hide file tree
Showing 15 changed files with 27 additions and 26 deletions.
2 changes: 1 addition & 1 deletion resolve/LinSolverDirectRocSolverRf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace ReSolve

int refactorize();
int solve(vector_type* rhs, vector_type* x);
int solve(vector_type* rhs);// the solutuon is returned IN RHS (rhs is overwritten)
int solve(vector_type* rhs);// the solution is returned IN RHS (rhs is overwritten)

int setSolveMode(int mode); // should probably be enum
int getSolveMode(); //should be enum too
Expand Down
2 changes: 1 addition & 1 deletion resolve/LinSolverDirectRocSparseILU0.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ namespace ReSolve
int reset(matrix::Sparse* A);

int solve(vector_type* rhs, vector_type* x) override;
int solve(vector_type* rhs) override; // the solutuon is returned IN RHS (rhs is overwritten)
int solve(vector_type* rhs) override; // the solution is returned IN RHS (rhs is overwritten)


private:
Expand Down
2 changes: 1 addition & 1 deletion resolve/SystemSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ namespace ReSolve
Q_ = factorizationSolver_->getQOrdering();

if (L_ == nullptr) {
out::warning() << "Factorization failed, cannot extract factors ...\n";
out::error() << "Factorization failed, cannot extract factors ...\n";
status += 1;
}

Expand Down
4 changes: 2 additions & 2 deletions tests/functionality/testKLU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,9 @@ int main(int argc, char *argv[])
error_sum++;
}
if (error_sum == 0) {
std::cout<<"Test 1 (KLU with KLU refactorization) PASSED"<<std::endl;
std::cout<<"Test KLU with KLU refactorization PASSED"<<std::endl;
} else {
std::cout<<"Test 1 (KLU with KLU refactorization) FAILED, error sum: "<<error_sum<<std::endl;
std::cout<<"Test KLU with KLU refactorization FAILED, error sum: "<<error_sum<<std::endl;
}

//now DELETE
Expand Down
4 changes: 2 additions & 2 deletions tests/functionality/testKLU_GLU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,9 @@ int main(int argc, char *argv[])
error_sum++;
}
if (error_sum == 0) {
std::cout<<"Test 3 (KLU with cuSolverGLU refactorization) PASSED"<<std::endl;
std::cout<<"Test KLU with cuSolverGLU refactorization PASSED"<<std::endl;
} else {
std::cout<<"Test 3 (KLU with cuSolverGLU refactorization) FAILED, error sum: "<<error_sum<<std::endl;
std::cout<<"Test KLU with cuSolverGLU refactorization FAILED, error sum: "<<error_sum<<std::endl;
}

//now DELETE
Expand Down
4 changes: 2 additions & 2 deletions tests/functionality/testKLU_Rf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,9 @@ int main(int argc, char *argv[])
error_sum++;
}
if (error_sum == 0) {
std::cout<<"Test 2 (KLU with cuSolverRf refactorization) PASSED"<<std::endl;
std::cout<<"Test KLU with cuSolverRf refactorization PASSED"<<std::endl;
} else {
std::cout<<"Test 2 (KLU with cuSolverRf refactorization) FAILED, error sum: "<<error_sum<<std::endl;
std::cout<<"Test KLU with cuSolverRf refactorization FAILED, error sum: "<<error_sum<<std::endl;
}

//now DELETE
Expand Down
4 changes: 2 additions & 2 deletions tests/functionality/testKLU_Rf_FGMRES.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,9 @@ int main(int argc, char *argv[])
error_sum++;
}
if (error_sum == 0) {
std::cout<<"Test 4 (KLU with cuSolverRf refactorization + IR) PASSED"<<std::endl;
std::cout<<"Test KLU with cuSolverRf refactorization + IR PASSED"<<std::endl;
} else {
std::cout<<"Test 4 (KLU with cuSolverRf refactorization + IR) FAILED, error sum: "<<error_sum<<std::endl;
std::cout<<"Test KLU with cuSolverRf refactorization + IR FAILED, error sum: "<<error_sum<<std::endl;
}

delete A;
Expand Down
4 changes: 2 additions & 2 deletions tests/functionality/testKLU_RocSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,10 @@ int main(int argc, char *argv[])
error_sum++;
}
if (error_sum == 0) {
std::cout<<"Test 3 (KLU with rocSolverRf refactorization) PASSED"<<std::endl;
std::cout<<"Test KLU with rocSolverRf refactorization PASSED"<<std::endl;
} else {

std::cout<<"Test 3 (KLU with rocSolverRF refactorization) FAILED, error sum: "<<error_sum<<std::endl;
std::cout<<"Test KLU with rocSolverRF refactorization FAILED, error sum: "<<error_sum<<std::endl;
}

//now DELETE
Expand Down
4 changes: 2 additions & 2 deletions tests/functionality/testKLU_RocSolver_FGMRES.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,9 @@ int main(int argc, char *argv[])
error_sum++;
}
if (error_sum == 0) {
std::cout<<"Test 4 (KLU with rocsolverrf refactorization + IR) PASSED"<<std::endl<<std::endl;;
std::cout<<"Test KLU with rocsolverrf refactorization + IR PASSED"<<std::endl<<std::endl;;
} else {
std::cout<<"Test 4 (KLU with rocsolverrf refactorization + IR) FAILED, error sum: "<<error_sum<<std::endl<<std::endl;;
std::cout<<"Test KLU with rocsolverrf refactorization + IR FAILED, error sum: "<<error_sum<<std::endl<<std::endl;;
}

delete A;
Expand Down
4 changes: 2 additions & 2 deletions tests/functionality/testRandGMRES_Cuda.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ int main(int argc, char *argv[])
error_sum++;
}
if (error_sum == 0) {
std::cout<<"Test 5 (randomized GMRES) PASSED"<<std::endl<<std::endl;;
std::cout<<"Test randomized GMRES PASSED"<<std::endl<<std::endl;;
} else {
std::cout<<"Test 5 (randomized GMRES) FAILED, error sum: "<<error_sum<<std::endl<<std::endl;;
std::cout<<"Test randomized GMRES FAILED, error sum: "<<error_sum<<std::endl<<std::endl;;
}
delete A;
delete Rf;
Expand Down
4 changes: 2 additions & 2 deletions tests/functionality/testRandGMRES_Rocm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ int main(int argc, char *argv[])
error_sum++;
}
if (error_sum == 0) {
std::cout<<"Test 5 (randomized GMRES) PASSED"<<std::endl<<std::endl;;
std::cout<<"Test randomized GMRES PASSED"<<std::endl<<std::endl;;
} else {
std::cout<<"Test 5 (randomized GMRES) FAILED, error sum: "<<error_sum<<std::endl<<std::endl;;
std::cout<<"Test randomized GMRES FAILED, error sum: "<<error_sum<<std::endl<<std::endl;;
}
delete A;
delete Rf;
Expand Down
4 changes: 2 additions & 2 deletions tests/functionality/testSysGLU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,9 @@ int main(int argc, char *argv[])
error_sum++;
}
if (error_sum == 0) {
std::cout<<"Test 3 (KLU with cuSolverGLU refactorization) PASSED"<<std::endl;
std::cout<<"Test KLU with cuSolverGLU refactorization PASSED"<<std::endl;
} else {
std::cout<<"Test 3 (KLU with cuSolverGLU refactorization) FAILED, error sum: "<<error_sum<<std::endl;
std::cout<<"Test KLU with cuSolverGLU refactorization FAILED, error sum: "<<error_sum<<std::endl;
}

//now DELETE
Expand Down
4 changes: 2 additions & 2 deletions tests/functionality/testSysRandGMRES.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ int main(int argc, char *argv[])
error_sum++;
}
if (error_sum == 0) {
std::cout<<"Test 5 (randomized GMRES) PASSED"<<std::endl<<std::endl;;
std::cout<<"Test randomized GMRES PASSED"<<std::endl<<std::endl;;
} else {
std::cout<<"Test 5 (randomized GMRES) FAILED, error sum: "<<error_sum<<std::endl<<std::endl;;
std::cout<<"Test randomized GMRES FAILED, error sum: "<<error_sum<<std::endl<<std::endl;;
}

delete A;
Expand Down
4 changes: 2 additions & 2 deletions tests/functionality/testSysRefactor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,9 @@ int main(int argc, char *argv[])
error_sum++;
}
if (error_sum == 0) {
std::cout<<"Test 4 (KLU with rocsolverrf refactorization + IR) PASSED"<<std::endl<<std::endl;;
std::cout<<"Test KLU with rocsolverrf refactorization + IR PASSED"<<std::endl<<std::endl;;
} else {
std::cout<<"Test 4 (KLU with rocsolverrf refactorization + IR) FAILED, error sum: "<<error_sum<<std::endl<<std::endl;;
std::cout<<"Test KLU with rocsolverrf refactorization + IR FAILED, error sum: "<<error_sum<<std::endl<<std::endl;;
}

delete A;
Expand Down
3 changes: 2 additions & 1 deletion tests/functionality/testVersion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ int main()
std::cout << "ReSolveVersionGetVersionStr Test: " << versionstr << std::endl << std::endl;

if (versionstr != answer) {
std::cout << "ReSolve version set incorrectly!\n";
std::cout << "ReSolve version set incorrectly. Test FAILED\n";
return 1;
}
std::cout << "ReSolve version test PASSED\n";

return 0;
}

0 comments on commit fbeae5e

Please sign in to comment.