[Pkg-octave-devel] [OctDev] Status of the Octave-Forge packages in Debian

Rafael Laboissiere rafael at laboissiere.net
Sun Mar 18 17:29:34 UTC 2012


* c. <carlo.defalco at gmail.com> [2012-03-18 15:02]:

> 
> On 18 Mar 2012, at 12:32, Rafael Laboissiere wrote:
> 
> > * Rafael Laboissiere <rafael at laboissiere.net> [2012-03-18 12:15]:
> > 
> >> [...] I tried to port the nurbs package, but the build failed (this was
> >> reported in this mailing list recently
> >> http://permalink.gmane.org/gmane.comp.gnu.octave.devel/6938).  I just
> >> saw that a new version of the package is available.  I will take a
> >> look later.
> > 
> > Version 1.3.6 also fails to build:
> > 
> > bspeval.cc: In function ‘octave_value_list Fbspeval(const octave_value_list&, int)’:
> > bspeval.cc:62:71: error: ‘u’ is predetermined ‘shared’ for ‘shared’
> > bspeval.cc:62:71: error: ‘k’ is predetermined ‘shared’ for ‘shared’
> > bspeval.cc:62:71: error: ‘c’ is predetermined ‘shared’ for ‘shared’
> > make[1]: *** [bspeval.oct] Error 1
> > 
> > Any clues?
> > 
> > Rafael
> 
> this is due to a change in the behaviour of openmp in new versions of gcc,
> you should be able to fix this by either 
> 
> 1) remove the "const" attribute from the declaration of u, k, c
> 
> Index: bspeval.cc
> ===================================================================
> --- bspeval.cc	(revision 9938)
> +++ bspeval.cc	(working copy)
> @@ -45,9 +45,9 @@
>    if (!bspeval_bad_arguments (args))
>      {      
>        int             d = args(0).int_value();
> -      const Matrix    c = args(1).matrix_value();
> -      const RowVector k = args(2).row_vector_value();
> -      const NDArray   u = args(3).array_value();
> +      Matrix    c = args(1).matrix_value();
> +      RowVector k = args(2).row_vector_value();
> +      NDArray   u = args(3).array_value();
>        
>        octave_idx_type nu = u.length();
>        octave_idx_type mc = c.rows(),
> 
> 
> 2) do not declare u, k, c as "shared" in the parallel section (this is implied)
> 
> Index: bspeval.cc
> ===================================================================
> --- bspeval.cc	(revision 9938)
> +++ bspeval.cc	(working copy)
> @@ -59,7 +59,7 @@
>          {
>            if (nc + d == k.length() - 1) 
>              {	 
> -#pragma omp parallel default (none) shared (d, c, k, u, nu, mc, nc, p)
> +#pragma omp parallel default (none) shared (d, nu, mc, nc, p)
>                {
>                  RowVector N(d+1,0.0);
>                  int s, tmp1;
> 
> 
> I'd prefer the first version as it seems more backward compatible and I am using gcc-4.2. 
> Can you please test it? If it works for you I'll update the released package.

Yes, the package builds fine and most of the tests succeed.  There are
some tests that fail, though.  You will find attached below the output of
the failing tests.  If you can find fixes for them, it would be great,
since we have a tacit rule in the DOG for not uploading packages that
have many test failures.

Rafael
-------------- next part --------------
[nrbbasisfunder]
  ***** test
 U = [0 0 0 0 1/2 1 1 1 1];
 x = [0 1/4 1/2 3/4 1] ;
 y = [0 0 0 0 0];
 w = rand(1,5);
 nrb = nrbmak ([x;y;y;w], U);
 u = linspace(0, 1, 300); 
 [Bu, id] = nrbbasisfunder (u, nrb); 
 assert (sum(Bu, 2), zeros(numel(u), 1), 1e-10)
!!!!! test failed
assert (sum (Bu, 2),zeros (numel (u), 1),1e-10) expected
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
but got
   0.00000
  -0.00000
  -0.00000
  -0.00000
  -0.00000
  -0.00000
   0.00000
  -0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
  -0.00000
   0.00000
   0.00000
   0.00000
  -0.00000
   0.00000
  -0.00000
  -0.00000
  -0.00000
   0.00000
   0.00000
  -0.00000
  -0.00000
   0.00000
   0.00000
  -0.00000
   0.00000
  -0.00000
   0.00000
  -0.00000
  -0.00000
   0.00000
  -0.00000
   0.00000
  -0.00000
  -0.00000
   0.00000
  -0.00000
  -0.00000
   0.00000
   0.00000
   0.00000
  -0.00000
   0.00000
   0.00000
   0.00000
   0.00137
  -0.00000
   0.00000
  -0.00000
   0.00000
  -0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
  -0.00000
  -0.00000
  -0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
  -0.00000
   0.00000
  -0.00000
   0.00000
   0.00000
  -0.00000
  -0.00000
  -0.00027
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
  -0.00000
   0.00000
   0.00000
  -0.00000
  -0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
  -0.00000
   0.00000
   0.00000
   0.00000
  -0.00000
   0.00000
   0.00000
  -0.00000
  -0.00000
  -0.00000
   0.00000
   0.00000
   0.04183
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
  -0.00184
   0.00000
   0.00000
   0.00000
   0.00000
  -0.00000
  -0.00000
   0.17813
   0.00000
   0.00000
   0.00000
  -0.01414
  -0.00000
  -0.00000
   0.00000
   0.00000
  -0.00000
   0.00000
  -0.00000
  -0.00000
   0.00000
  -0.00000
   0.00000
   0.00000
  -0.00000
  -0.00000
  -0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00567
   0.00000
   0.00000
  -0.00000
  -0.00048
   0.00000
  -0.00000
  -0.00000
   0.00000
  -0.00000
   0.00000
  -0.00000
   0.00000
  -0.00000
   0.00000
  -0.00000
   0.00000
   0.00000
   0.00000
   0.00000
  -0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00207
  -0.00000
   0.00000
   0.00000
   0.00000
  -0.00000
  -0.00000
   0.00000
  -0.00000
   0.00000
  -0.00000
   0.00000
   0.00000
   0.00000
  -0.00000
   0.00000
  -0.00000
   0.00000
   0.00000
   0.00000
   0.00000
  -0.00000
  -0.00000
  -0.00000
   0.00000
   0.00000
   0.00000
   0.00000
  -0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
  -0.01703
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
  -0.00000
  -0.00000
  -0.00000
   0.00000
  -0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
  -0.00000
  -0.00000
  -0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
  -0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
  -0.00000
  -0.00000
  -0.00000
  -0.00000
   0.00000
   0.00000
  -0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
  -0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
   0.00000
  -0.00000
   0.00000
   0.00000
  -0.00000
  -0.00000
   0.00000
   0.00000
   0.00000
   0.00000
maximum absolute error 0.178129 exceeds tolerance 1e-10
[nrbbasisfun]
  ***** test
 p = 2;   q = 3;   m = 4; n = 5;
 Lx  = 1; Ly  = 1; 
 nrb = nrb4surf   ([0 0], [1 0], [0 1], [1 1]);
 nrb = nrbdegelev (nrb, [p-1, q-1]);
 aux1 = linspace(0,1,m); aux2 = linspace(0,1,n);
 nrb = nrbkntins  (nrb, {aux1(2:end-1), aux2(2:end-1)});
 u = rand (1, 30); v = rand (1, 10);
 [B, N] = nrbbasisfun ({u, v}, nrb);
 assert (sum(B, 2), ones(300, 1), 1e-6)
 assert (all (all (B<=1)), true)
 assert (all (all (B>=0)), true)
 assert (all (all (N>0)), true)
 assert (all (all (N <= prod (nrb.number))), true)
 assert (max (max (N)),prod (nrb.number))
 assert (min (min (N)),1)
!!!!! test failed
assert (min (min (N)),1) expected
 1
but got
 6
values do not match
[nrbsurfderiveval]
  ***** test 
 k = [0 0 0 1 1 1];
 c = [0 1/2 1];
 [coef(1,:,:), coef(2,:,:)] = meshgrid (c, c);
 coef(3,:,:) = coef(1,:,:);
 srf = nrbmak (coef, {k, k});
 ders= nrbderiv (srf);
 [u, v] = meshgrid (linspace(0,1,11));
 uv = [u(:)';v(:)'];
 skl = nrbsurfderiveval (srf, uv, 1);
 [fun, der] = nrbdeval (srf, ders, uv);
 assert (squeeze (skl (1:2,1,1,:)), fun(1:2,:), 1e3*eps)
 assert (squeeze (skl (1:2,2,1,:)), der{1}(1:2,:), 1e3*eps)
 assert (squeeze (skl (1:2,1,2,:)), der{2}(1:2,:), 1e3*eps)

!!!!! test failed
assert (squeeze (skl (1:2, 1, 1, :)),fun (1:2, :),1e3 * eps) expected
 Columns 1 through 8:

   0.00000   0.10000   0.20000   0.30000   0.40000   0.50000   0.60000   0.70000
   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000

 Columns 9 through 16:

   0.80000   0.90000   1.00000   0.00000   0.10000   0.20000   0.30000   0.40000
   0.00000   0.00000   0.00000   0.10000   0.10000   0.10000   0.10000   0.10000

 Columns 17 through 24:

   0.50000   0.60000   0.70000   0.80000   0.90000   0.85000   0.00000   0.10000
   0.10000   0.10000   0.10000   0.10000   0.10000   0.10000   0.20000   0.20000

 Columns 25 through 32:

   0.20000   0.30000   0.40000   0.50000   0.60000   0.70000   0.80000   0.90000
   0.20000   0.20000   0.20000   0.20000   0.20000   0.20000   0.20000   0.20000

 Columns 33 through 40:

   1.00000   0.00000   0.10000   0.20000   0.30000   0.40000   0.50000   0.60000
   0.20000   0.30000   0.30000   0.30000   0.30000   0.30000   0.30000   0.30000

 Columns 41 through 48:

   0.70000   0.80000   0.90000   1.00000   0.00000   0.10000   0.20000   0.30000
   0.30000   0.30000   0.30000   0.30000   0.40000   0.40000   0.40000   0.40000

 Columns 49 through 56:

   0.40000   0.50000   0.60000   0.70000   0.80000   0.90000   1.00000   0.00000
   0.40000   0.40000   0.40000   0.40000   0.40000   0.40000   0.40000   0.50000

 Columns 57 through 64:

   0.10000   0.20000   0.30000   0.40000   0.50000   0.60000   0.70000   0.80000
   0.50000   0.50000   0.50000   0.50000   0.50000   0.50000   0.50000   0.50000

 Columns 65 through 72:

   0.90000   1.00000   0.00000   0.10000   0.20000   0.30000   0.40000   0.50000
   0.50000   0.50000   0.60000   0.60000   0.60000   0.60000   0.60000   0.60000

 Columns 73 through 80:

   0.60000   0.70000   0.80000   0.90000   1.00000   0.00000   0.10000   0.20000
   0.60000   0.60000   0.60000   0.60000   0.60000   0.70000   0.70000   0.70000

 Columns 81 through 88:

   0.30000   0.40000   0.50000   0.60000   0.70000   0.80000   0.90000   1.00000
   0.70000   0.70000   0.70000   0.70000   0.70000   0.70000   0.70000   0.70000

 Columns 89 through 96:

   0.00000   0.10000   0.20000   0.30000   0.40000   0.50000   0.60000   0.70000
   0.80000   0.80000   0.80000   0.80000   0.80000   0.80000   0.80000   0.80000

 Columns 97 through 104:

   0.80000   0.90000   1.00000   0.00000   0.10000   0.20000   0.30000   0.40000
   0.80000   0.80000   0.80000   0.90000   0.90000   0.90000   0.90000   0.90000

 Columns 105 through 112:

   0.50000   0.60000   0.70000   0.80000   0.90000   1.00000   0.00000   0.10000
   0.90000   0.90000   0.90000   0.90000   0.90000   0.90000   1.00000   1.00000

 Columns 113 through 120:

   0.20000   0.30000   0.40000   0.50000   0.60000   0.70000   0.80000   0.90000
   1.00000   1.00000   1.00000   1.00000   1.00000   1.00000   1.00000   1.00000

 Column 121:

   1.00000
   1.00000
but got
 Columns 1 through 8:

   0.00000   0.10000   0.20000   0.30000   0.40000   0.50000   0.60000   0.70000
   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000

 Columns 9 through 16:

   0.80000   0.90000   1.00000   0.00000   0.10000   0.20000   0.30000   0.40000
   0.00000   0.00000   0.00000   0.10000   0.10000   0.10000   0.10000   0.10000

 Columns 17 through 24:

   0.50000   0.60000   0.70000   0.80000   0.90000   1.00000   0.00000   0.10000
   0.10000   0.10000   0.10000   0.10000   0.10000   0.10000   0.20000   0.20000

 Columns 25 through 32:

   0.20000   0.30000   0.40000   0.50000   0.60000   0.70000   0.80000   0.90000
   0.20000   0.20000   0.20000   0.20000   0.20000   0.20000   0.20000   0.20000

 Columns 33 through 40:

   1.00000   0.00000   0.10000   0.20000   0.30000   0.40000   0.50000   0.60000
   0.20000   0.30000   0.30000   0.30000   0.30000   0.30000   0.30000   0.30000

 Columns 41 through 48:

   0.70000   0.80000   0.90000   1.00000   0.00000   0.10000   0.20000   0.30000
   0.30000   0.30000   0.30000   0.30000   0.40000   0.40000   0.40000   0.40000

 Columns 49 through 56:

   0.40000   0.50000   0.60000   0.70000   0.80000   0.90000   1.00000   0.00000
   0.40000   0.40000   0.40000   0.40000   0.40000   0.40000   0.40000   0.50000

 Columns 57 through 64:

   0.10000   0.20000   0.30000   0.40000   0.50000   0.60000   0.70000   0.80000
   0.50000   0.50000   0.50000   0.50000   0.50000   0.50000   0.50000   0.50000

 Columns 65 through 72:

   0.90000   1.00000   0.00000   0.10000   0.20000   0.30000   0.40000   0.50000
   0.50000   0.50000   0.60000   0.60000   0.60000   0.60000   0.60000   0.60000

 Columns 73 through 80:

   0.60000   0.70000   0.80000   0.90000   1.00000   0.00000   0.10000   0.20000
   0.60000   0.60000   0.60000   0.60000   0.60000   0.70000   0.70000   0.70000

 Columns 81 through 88:

   0.30000   0.40000   0.50000   0.60000   0.70000   0.80000   0.90000   1.00000
   0.70000   0.70000   0.70000   0.70000   0.70000   0.70000   0.70000   0.70000

 Columns 89 through 96:

   0.00000   0.10000   0.20000   0.30000   0.40000   0.50000   0.60000   0.70000
   0.80000   0.80000   0.80000   0.80000   0.80000   0.80000   0.80000   0.80000

 Columns 97 through 104:

   0.80000   0.90000   1.00000   0.00000   0.10000   0.20000   0.30000   0.40000
   0.80000   0.80000   0.80000   0.90000   0.90000   0.90000   0.90000   0.90000

 Columns 105 through 112:

   0.50000   0.60000   0.70000   0.80000   0.90000   1.00000   0.00000   0.10000
   0.90000   0.90000   0.90000   0.90000   0.90000   0.90000   1.00000   1.00000

 Columns 113 through 120:

   0.20000   0.30000   0.40000   0.50000   0.60000   0.70000   0.80000   0.90000
   1.00000   1.00000   1.00000   1.00000   1.00000   1.00000   1.00000   1.00000

 Column 121:

   1.00000
   1.00000
maximum absolute error 0.15 exceeds tolerance 2.22045e-13
shared variables 
  scalar structure containing the fields:

    srf = [](0x0)
    uv = [](0x0)


More information about the Pkg-octave-devel mailing list