[gmx-developers] TestReferenceChecker and floatin problem

David van der Spoel spoel at xray.bmc.uu.se
Sun Jan 8 00:07:22 CET 2017


On 07/01/17 23:52, Mark Abraham wrote:
> Hi,
>
> You're using rootChecker like it was a getter method for an already
> allocated object, but it is a factory for objects. Call it once and keep
> the return value in a variable for use each time.
>
> Would naming it makeRootChecker have helped you understand that you
> don't want to call it more often than you intend to make a new checker?
>

Not sure. Teemu put me on the right track in gerrit, so it is under 
control (and much simpler without rootChecker). Just ironing out the 
last bits.


> Mark
>
>
> On Sat, 7 Jan 2017 21:54 David van der Spoel <spoel at xray.bmc.uu.se
> <mailto:spoel at xray.bmc.uu.se>> wrote:
>
>     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 <mailto:spoel at xray.bmc.uu.se>
>     http://folding.bmc.uu.se
>     --
>     Gromacs Developers mailing list
>
>     * Please search the archive at
>     http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List
>     before posting!
>
>     * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>
>     * For (un)subscribe requests visit
>     https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers
>     or send a mail to gmx-developers-request at gromacs.org
>     <mailto:gmx-developers-request at gromacs.org>.
>
>
>


-- 
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