1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-13 12:47:05 +01:00

More timing info

This commit is contained in:
paboyle
2016-03-06 10:46:55 -08:00
parent e55c35734b
commit dc72293398
4 changed files with 177 additions and 257 deletions

View File

@ -68,6 +68,9 @@ namespace Grid {
Field r(src._grid);
GridStopWatch SolverTimer;
SolverTimer.Start();
steps=0;
for(int k=0;k<MaxIterations;k++){
@ -76,6 +79,9 @@ namespace Grid {
if ( verbose ) std::cout<<GridLogMessage<<"VPGCR("<<mmax<<","<<nstep<<") "<< steps <<" steps cp = "<<cp<<std::endl;
if(cp<rsq) {
SolverTimer.Stop();
Linop.HermOp(psi,r);
axpy(r,-1.0,src,r);
RealD tr = norm2(r);
@ -83,6 +89,7 @@ namespace Grid {
<< " computed residual "<<sqrt(cp/ssq)
<< " true residual " <<sqrt(tr/ssq)
<< " target " <<Tolerance <<std::endl;
std::cout<<GridLogMessage<<" Time elapsed: Total "<< SolverTimer.Elapsed() <<std::endl;
return;
}