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

c. carlo.defalco at gmail.com
Sun Mar 18 14:02:03 UTC 2012


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.

Thanks!
c.


More information about the Pkg-octave-devel mailing list