<p dir="ltr">Hi,</p>
<p dir="ltr">You&#39;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.</p>
<p dir="ltr">Would naming it makeRootChecker have helped you understand that you don&#39;t want to call it more often than you intend to make a new checker? </p>
<p dir="ltr">Mark</p>
<br><div class="gmail_quote"><div dir="ltr">On Sat, 7 Jan 2017 21:54 David van der Spoel &lt;<a href="mailto:spoel@xray.bmc.uu.se">spoel@xray.bmc.uu.se</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br class="gmail_msg">
I&#39;m trying to finalize some test code in my energy patch but getting<br class="gmail_msg">
stuck on not being able to change the tolerance. The problem is I&#39;m<br class="gmail_msg">
using CommandLineTestBase as a base class, which has a function<br class="gmail_msg">
checkOutputFiles. The files are checked but I can not seem to modulate<br class="gmail_msg">
the floatingpointtolerance.<br class="gmail_msg">
<br class="gmail_msg">
E.g. when calling<br class="gmail_msg">
<br class="gmail_msg">
rootChecker().setDefaultTolerance(gmx::test::relativeToleranceAsFloatingPoint(1,<br class="gmail_msg">
tolerance));<br class="gmail_msg">
<br class="gmail_msg">
a fresh rootChecker is generateed for every call since in refdata.h we have<br class="gmail_msg">
<br class="gmail_msg">
          * Each call returns an independent instance.<br class="gmail_msg">
          */<br class="gmail_msg">
         TestReferenceChecker rootChecker();<br class="gmail_msg">
<br class="gmail_msg">
That means that by the time my code calls checkOutputFiles the tolerance<br class="gmail_msg">
settings are reset.<br class="gmail_msg">
<br class="gmail_msg">
Clues?<br class="gmail_msg">
<br class="gmail_msg">
--<br class="gmail_msg">
David van der Spoel, Ph.D., Professor of Biology<br class="gmail_msg">
Dept. of Cell &amp; Molec. Biol., Uppsala University.<br class="gmail_msg">
Box 596, 75124 Uppsala, Sweden. Phone:  +46184714205.<br class="gmail_msg">
<a href="mailto:spoel@xray.bmc.uu.se" class="gmail_msg" target="_blank">spoel@xray.bmc.uu.se</a>    <a href="http://folding.bmc.uu.se" rel="noreferrer" class="gmail_msg" target="_blank">http://folding.bmc.uu.se</a><br class="gmail_msg">
--<br class="gmail_msg">
Gromacs Developers mailing list<br class="gmail_msg">
<br class="gmail_msg">
* Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List" rel="noreferrer" class="gmail_msg" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a> before posting!<br class="gmail_msg">
<br class="gmail_msg">
* Can&#39;t post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" rel="noreferrer" class="gmail_msg" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br class="gmail_msg">
<br class="gmail_msg">
* For (un)subscribe requests visit<br class="gmail_msg">
<a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers" rel="noreferrer" class="gmail_msg" target="_blank">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a> or send a mail to <a href="mailto:gmx-developers-request@gromacs.org" class="gmail_msg" target="_blank">gmx-developers-request@gromacs.org</a>.<br class="gmail_msg">
</blockquote></div>