Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting the logging to debug changes fit parameters in unit tests #12948

Closed
NickDraper opened this issue Jun 26, 2015 · 0 comments
Closed

Setting the logging to debug changes fit parameters in unit tests #12948

NickDraper opened this issue Jun 26, 2015 · 0 comments
Assignees
Labels
Framework Issues and pull requests related to components in the Framework
Milestone

Comments

@NickDraper
Copy link
Contributor

Setting the root logger level to debug, leads to unit test failures that are related to a call to minimizer->costFunctionVal() in Fit.cpp.

As far as I can follow this should never happen The error show in 2 unit tests, one of which is CurveFittingTest_SeqDomainSpectrumCreatorTest. The error message is

985: In SeqDomainSpectrumCreatorTest::testFit:
985: C:/Mantid/Code/Mantid/Framework/CurveFitting/test/SeqDomainSpectrumCreatorTest.h:277: 
Error: Expected (fun->getParameter(0) == 2.0) up to 1e-6 (0.0000), found (1.9999 != 2.0000)

it can be prevented by removing the following lines in Fit (starting at line 184)

if (g_log.is(Kernel::Logger::Priority::PRIO_INFORMATION)) {
      g_log.debug() << "Iteration " << iter
                    << ", cost function = " << minimizer->costFunctionVal()
                    << "\n";
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Framework Issues and pull requests related to components in the Framework
Projects
None yet
Development

No branches or pull requests

2 participants