octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

failing 1 test with current cvs


From: John W. Eaton
Subject: failing 1 test with current cvs
Date: Fri, 18 Jan 2008 02:37:26 -0500

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

scripts/ChangeLog:

2008-01-18  John W. Eaton  <address@hidden>

        * optimization/sqp.m: End each function with endfunction.


Index: scripts/optimization/sqp.m
===================================================================
RCS file: /cvs/octave/scripts/optimization/sqp.m,v
retrieving revision 1.16
diff -u -u -r1.16 sqp.m
--- scripts/optimization/sqp.m  15 Jan 2008 19:12:14 -0000      1.16
+++ scripts/optimization/sqp.m  18 Jan 2008 07:35:36 -0000
@@ -503,7 +503,7 @@
 
   endif
 
-### endfunction
+endfunction
 
 
 function [merit, obj] = phi_L1 (obj, obj_fun, ce_fun, ci_fun, x, mu)
@@ -529,7 +529,7 @@
     merit += t;
   endif
 
-### endfunction
+endfunction
 
 
 function [x_new, alpha, obj] = linesearch_L1 (x, p, obj_fun, obj_grd,
@@ -585,7 +585,7 @@
 
   x_new = x + alpha * p;
 
-### endfunction
+endfunction
 
 
 function report (iter, qp_iter, alpha, nfun, obj)
@@ -596,7 +596,7 @@
     printf ("%5d %4d %8.1g %5d %13.6e\n", iter, qp_iter, alpha, nfun, obj);
   endif
 
-### endfunction
+endfunction
 
 
 function grd = fdgrd (f, x)
@@ -616,7 +616,7 @@
     grd = zeros (0, 1);
   endif
 
-### endfunction
+endfunction
 
 
 function jac = fdjac (f, x)
@@ -637,7 +637,7 @@
     jac = zeros  (0, nx);
   endif
 
-### endfunction
+endfunction
 
 
 function grd = fd_obj_grd (x)
@@ -646,21 +646,21 @@
 
   grd = fdgrd (__sqp_obj_fun__, x);
 
-### endfunction
+endfunction
 
 
 function res = empty_cf (x)
 
   res = zeros (0, 1);
 
-### endfunction
+endfunction
 
 
 function res = empty_jac (x)
 
   res = zeros (0, length (x));
 
-### endfunction
+endfunction
 
 
 function jac = fd_ce_jac (x)
@@ -669,7 +669,7 @@
 
   jac = fdjac (__sqp_ce_fun__, x);
 
-### endfunction
+endfunction
 
 
 function jac = fd_ci_jac (x)
@@ -678,7 +678,7 @@
   ## __sqp_cifcn__ = constraint function without gradients and lb or ub
   jac = fdjac (__sqp_cifcn__, x);
 
-### endfunction
+endfunction
 
 
 function res = cf_ub_lb (x)
@@ -692,7 +692,7 @@
     res = [feval(__sqp_cifcn__,x); x-__sqp_lb__; __sqp_ub__-x];
   endif
 
-### endfunction
+endfunction
 
 
 function res = cigrad_ub_lb (x)
@@ -711,7 +711,7 @@
     res = [feval(cigradfcn,x); eye(numel(x)); -eye(numel(x))];
   endif
 
-### endfunction
+endfunction
 
 %!function r = g (x)
 %!  r = [sumsq(x)-10;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]