[gmx-developers] TestReferenceChecker and floatin problem

David van der Spoel spoel at xray.bmc.uu.se
Sat Jan 7 21:54:32 CET 2017


Hi,
I'm trying to finalize some test code in my energy patch but getting 
stuck on not being able to change the tolerance. The problem is I'm 
using CommandLineTestBase as a base class, which has a function 
checkOutputFiles. The files are checked but I can not seem to modulate 
the floatingpointtolerance.

E.g. when calling
 
rootChecker().setDefaultTolerance(gmx::test::relativeToleranceAsFloatingPoint(1, 
tolerance));

a fresh rootChecker is generateed for every call since in refdata.h we have

          * Each call returns an independent instance.
          */
         TestReferenceChecker rootChecker();

That means that by the time my code calls checkOutputFiles the tolerance 
settings are reset.

Clues?

-- 
David van der Spoel, Ph.D., Professor of Biology
Dept. of Cell & Molec. Biol., Uppsala University.
Box 596, 75124 Uppsala, Sweden. Phone:	+46184714205.
spoel at xray.bmc.uu.se    http://folding.bmc.uu.se


More information about the gromacs.org_gmx-developers mailing list