failing 1 test with current cvs

Ben Abbott bpabbott at mac.com
Fri Jan 18 06:38:48 CST 2008


On Jan 18, 2008, at 2:37 AM, 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 :
> | [cohen at localhost 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
>
> ?

I tried the patch yet, and the version of sqp from 12 hrs ago (last  
time I built).

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

Doing a disp(x-x_opt)

   -2.0441e-09
    2.3670e-09
   -3.7980e-09
    1.7883e-08
   -1.7429e-08

The 4th element is larger than sqrt(eps) =1.4901e-08, the the failure  
appears to be the result of slight differences in numerical accuracy.

Johann, please try this patch.

Index: sqp.m
===================================================================
RCS file: /cvs/octave/scripts/optimization/sqp.m,v
retrieving revision 1.17
diff -u -r1.17 sqp.m
--- sqp.m	18 Jan 2008 07:37:35 -0000	1.17
+++ sqp.m	18 Jan 2008 12:37:05 -0000
@@ -734,4 +734,4 @@
  %!
  %! obj_opt = 0.0539498477702739;
  %!
-%! assert (all (abs (x-x_opt) < sqrt (eps)) && abs (obj-obj_opt) <  
sqrt (eps));
+%! assert (all (abs (x-x_opt) < 2*sqrt (eps)) && abs (obj-obj_opt) <  
sqrt (eps));

Ben



More information about the Octave-maintainers mailing list