1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-13 01:05:36 +00:00

introduced assertions in Benchmark_wilson, removed data output from Benchmark_dwf

This commit is contained in:
nmeyer-ur 2020-05-15 09:15:50 +02:00
parent 10a34312dc
commit 015d8bb38a
2 changed files with 38 additions and 25 deletions

View File

@ -220,9 +220,12 @@ int main (int argc, char ** argv)
//exit(0);
if(( norm2(err)>1.0e-4) ) {
/*
std::cout << "RESULT\n " << result<<std::endl;
std::cout << "REF \n " << ref <<std::endl;
std::cout << "ERR \n " << err <<std::endl;
*/
std::cout<<GridLogMessage << "WRONG RESULT" << std::endl;
FGrid->Barrier();
exit(-1);
}
@ -294,9 +297,11 @@ int main (int argc, char ** argv)
err = ref-result;
std::cout<<GridLogMessage << "norm dag diff "<< norm2(err)<<std::endl;
if((norm2(err)>1.0e-4)){
/*
std::cout<< "DAG RESULT\n " <<ref << std::endl;
std::cout<< "DAG sRESULT\n " <<result << std::endl;
std::cout<< "DAG ERR \n " << err <<std::endl;
*/
}
LatticeFermion src_e (FrbGrid);
LatticeFermion src_o (FrbGrid);
@ -366,9 +371,11 @@ int main (int argc, char ** argv)
err = r_eo-result;
std::cout<<GridLogMessage << "norm diff "<< norm2(err)<<std::endl;
if((norm2(err)>1.0e-4)){
/*
std::cout<< "Deo RESULT\n " <<r_eo << std::endl;
std::cout<< "Deo REF\n " <<result << std::endl;
std::cout<< "Deo ERR \n " << err <<std::endl;
*/
}
pickCheckerboard(Even,src_e,err);
@ -381,4 +388,3 @@ int main (int argc, char ** argv)
Grid_finalize();
exit(0);
}

View File

@ -185,6 +185,8 @@ int main (int argc, char ** argv)
err = ref-result;
std::cout<<GridLogMessage << "norm diff "<< norm2(err)<<std::endl;
// guard
double err0 = norm2(err);
// for(int ss=0;ss<10;ss++ ){
for(int ss=0;ss<0;ss++ ){
@ -233,5 +235,10 @@ int main (int argc, char ** argv)
err = ref-result;
std::cout<<GridLogMessage << "norm diff "<< norm2(err)<<std::endl;
// guard
double err1 = norm2(err);
assert(fabs(err0) < 1.0e-3);
assert(fabs(err1) < 1.0e-3);
Grid_finalize();
}