> The failure of the BFGS and Newton tests is likely to be because of > the high level functions (Numeric/LAPACK matrix operations in this > case) mentioned by Gary in his post at > https://mail.gna.org/public/relax-devel/2006-10/msg00117.html > (Message-id: <4538955F.3090300@xxxxxxxxxxxxxxx>).
After looking more closely at the tests and their output, I realise that the BFGS and Newton optimisation tests are the only ones failing with this chi2 problem because they are the only ones setup to produce very small chi2. The grid search gives finite chi2 for obvious reasons, and in all of the other tests, optimisation is failing (because max_iter is set too low, or with OverflowError). This is apparently the intended behaviour in these tests because the tests pass even though the optimisation failed. As chi2 never gets small in these tests, rounding errors etc never become significant and all of these tests pass.
That would make sense. The function tolerance is not reached in the steepest descent (SD) and coordinate descent (CD) tests. I had to cut these off early because they take forever to minimise this test data. The tests still tell you if these methods are working, even if the minimum is never reached.
I note also that the BFGS and Newton tests are set up to test that the number of iterations, function calls, etc, are 'correct'. In fact these also depend on architecture/implimentation issues. These tests are not evaluated because the chi2 test fails first.
I should probably change the test to print out the expected model-free parameter values and the minimisation stats (the chi-squared value, iteration count, function count, gradient count, and Hessian count) as well as the values and stats returned in the test. After all this is printed, then the test can be made to fail if necessary. This additional output should be useful.
Edward