[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: failing 1 test with current cvs
From: |
Johann Cohen-Tanugi |
Subject: |
Re: failing 1 test with current cvs |
Date: |
Fri, 18 Jan 2008 00:09:00 -0800 |
User-agent: |
Thunderbird 2.0.0.9 (X11/20071115) |
octave:1> test sqp
***** test
x0 = [-1.8; 1.7; 1.9; -0.8; -0.8];
[x, obj, info, iter, nf, lambda] = sqp (x0, @phi, @g, []);
x_opt = [-1.717143501952599;
1.595709610928535;
1.827245880097156;
-0.763643103133572;
-0.763643068453300];
obj_opt = 0.0539498477702739;
assert (all (abs (x-x_opt) < sqrt (eps)) && abs (obj-obj_opt) < sqrt
(eps));
!!!!! test failed
error: assert (all (abs (x - x_opt) < sqrt (eps)) && abs (obj - obj_opt)
< sqrt (eps)) failed
I ran the test by hand in octave and got :
octave:17> x
x =
-1.717143470820995
1.595709574878395
1.827245937942006
-0.763643097696382
-0.763643080812862
obj = 0.0539498477702764
which are compared to
%! x_opt = [-1.717143501952599;
%! 1.595709610928535;
%! 1.827245880097156;
%! -0.763643103133572;
%! -0.763643068453300];
%!
%! obj_opt = 0.0539498477702739;
to better than eps=2.22044604925031e-16
Thanks for the patch, with it I now get :
address@hidden optimization]$ octave sqp.m
GNU Octave, version 3.0.0+
Copyright (C) 2007 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTIBILITY or
FITNESS FOR A PARTICULAR PURPOSE. For details, type `warranty'.
Octave was configured for "i686-pc-linux-gnu".
Additional information about Octave is available at http://www.octave.org.
Please contribute if you find this software useful.
For more information, visit http://www.octave.org/help-wanted.html
Report bugs to <address@hidden> (but first, please read
http://www.octave.org/bugs.html to learn how to write a helpful report).
For information about changes from previous versions, type `news'.
In other words, the error I was getting indeed disappeared, but running
this way does not give rise to the failure above.
Johann
John W. Eaton wrote:
On 17-Jan-2008, Johann Cohen-Tanugi wrote:
| hello,
| as far as I can tell I have the current HEAD of CVS, I distclean and
| rebuilt the package, and make check announces 1 failure at
| scripts/optimization/sqp.m, wich is currently at version1.16 :
| address@hidden octave]$ octave scripts/optimization/sqp.m
| GNU Octave, version 3.0.0+
| ...
| error: nested functions not implemented in this context
| error: near line 509 of file `scripts/optimization/sqp.m.m'
| parse error near line 509 of file scripts/optimization/sqp.m
|
| syntax error
|
| >>> function [merit, obj] = phi_L1 (obj, obj_fun, ce_fun, ci_fun, x, mu)
I don't see any make check failures. What happens if you start octave
and type
test sqp
?
In any case, I do see the error above if I try running sqp.m as a
script from the command line as you did. That's not something that
would normally be done, but I guess we can avoid the error, so I
checked in the following patch for this.
Thanks,
jwe