bugGNU Octave - Bugs: bug #64947, ocl pkg build issue: error:...

 
 

bug #64947: ocl pkg build issue: error: explicit specialization of 'array_prog' after instantiation

Submitter:  Marius Schamschula <mschamschula>
Submitted:  Wed 29 Nov 2023 07:33:22 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  None Assigned to:  None
Originator Name:  Marius Schamschula Open/Closed:  * Open
Release:  * 8.4.0 Operating System:  * Mac OS
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 28 Apr 2024 10:49:08 AM UTC, comment #3: 

I just realised you have an Apple silicon, you can try two merge ocl_array from Termux and Apple silicon file on my site together. I will try to make a new release for all platforms except old Intel-based Mac.
comment #2:

> Hi, dear all
> To Marius,
> to your question: This was a problem due to the initialization position. You can give ocl-1.2.0-Termux.tar.gz a try on my project site if your system is with Octave 8.4.
> https://sourceforge.net/projects/octave-ocl-extra/files/ . I have reported the error to the original author Matt.
>
> To Dmitri, there should be no error with 9.1. Meanwhile, I also reported the " ocl_array.h:277:9: warning" to Matt at least one year ago, that this will cause a seg fault problem with AMD GPU platform. I guess Matt was busy and missed my info. I have this fixed on my project site.
>
> Best wishes,
> Jinchuan
>
>

Jinchuan Tang <jinchuantang>
Sun 28 Apr 2024 10:44:32 AM UTC, comment #2: 

Hi, dear all
To Marius,
to your question: This was a problem due to the initialization position. You can give ocl-1.2.0-Termux.tar.gz a try on my project site if your system is with Octave 8.4.
https://sourceforge.net/projects/octave-ocl-extra/files/ . I have reported the error to the original author Matt.

To Dmitri, there should be no error with 9.1. Meanwhile, I also reported the " ocl_array.h:277:9: warning" to Matt at least one year ago, that this will cause a seg fault problem with AMD GPU platform. I guess Matt was busy and missed my info. I have this fixed on my project site.

Best wishes,
Jinchuan


Jinchuan Tang <jinchuantang>
Wed 29 Nov 2023 08:27:51 PM UTC, comment #1: 

FWIW, on linux with octave 9.0.1 I see:


/usr/local/bin/mkoctfile-9.0.1 --verbose ocl_constant.o ocl_lib.o ocl_context.o ocl_context_obj.o ocl_program.o ocl_memobj.o ocl_array.o ocl_array_prog.o ocl_ov_matrix.o ocl_ov_matrix_ops.o ocl_ov_matrix_fcns.o ocl_ov_program.o ocl_ov_types.o -o ocl_bin.oct
g++ -std=gnu++17 -I/usr/local/include/octave-9.0.1/octave/.. -I/usr/local/include/octave-9.0.1/octave -I/usr/local/include  -pthread -fopenmp -ggdb3 -O2 -march=native -mtune=native -mavx -mavx2 -flto=auto  -o ocl_bin.oct  ocl_constant.o ocl_lib.o ocl_context.o ocl_context_obj.o ocl_program.o ocl_memobj.o ocl_array.o ocl_array_prog.o ocl_ov_matrix.o ocl_ov_matrix_ops.o ocl_ov_matrix_fcns.o ocl_ov_program.o ocl_ov_types.o   -shared -Wl,-Bsymbolic  -L/usr/local/lib -shared -Wl,-Bsymbolic
In member function ‘operator=’,
    inlined from ‘map_inplace’ at ocl_array.cc:1951:12:
ocl_array.h:277:9: warning: ‘operator delete’ called on unallocated object ‘nr’ [-Wfree-nonheap-object]
  277 |         delete rep;
      |         ^
ocl_array.h: In member function ‘map_inplace’:
ocl_array.h:208:46: note: declared here
  208 |     static typename OclArray<T>::OclArrayRep nr;
      |                                              ^
make: Leaving directory '/tmp/oct-SI3CTx/ocl-1.2.2/src'
copyfile /tmp/oct-SI3CTx/ocl-1.2.2/src/ocl_bin.oct /tmp/oct-SI3CTx/ocl-1.2.2/inst/x86_64-pc-linux-gnu-api-v58
error: /home/dima/.local/share/octave/api-v58/packages/ocl-1.2.2/x86_64-pc-linux-gnu-api-v58/ocl_bin.oct: failed to load
Incompatible version or missing dependency?
/home/dima/.local/share/octave/api-v58/packages/ocl-1.2.2/x86_64-pc-linux-gnu-api-v58/ocl_bin.oct: undefined symbol: _ZNK22octave_base_int_matrixI10intNDArrayI10octave_intIaEEE9as_doubleEv


Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Wed 29 Nov 2023 07:33:22 PM UTC, original submission:  

I was attempting to build the new ocl (1.2.2) release under macOS 13.6.1 (arm64) against my MacPorts octave 8.4.0 installation. I get the following build error:


/usr/bin/clang++ -c -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -fPIC -I/opt/local/include/octave-8.4.0/octave/.. -I/opt/local/include/octave-8.4.0/octave -I/opt/local/include  -pthread -pipe -Os -std=c++11 -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -arch arm64    ocl_array.cc -o ocl_array.o
ocl_array.cc:2066:1: error: explicit specialization of 'array_prog' after instantiation
SPECIALIZE_OCLARRAY (FloatComplex,   single,  float2,   false,  false,  true  );
^
ocl_array.cc:2049:39: note: expanded from macro 'SPECIALIZE_OCLARRAY'
  template <> OclProgram OclArray<T>::array_prog = OclProgram (); \
                                      ^
ocl_array.cc:263:3: note: implicit instantiation first required here
  array_prog.set_kernel_arg (kernel_index, 0, *this);
  ^
ocl_array.cc:2066:1: error: explicit specialization of 'kernel_indices' after instantiation
SPECIALIZE_OCLARRAY (FloatComplex,   single,  float2,   false,  false,  true  );
^
ocl_array.cc:2050:45: note: expanded from macro 'SPECIALIZE_OCLARRAY'
  template <> std::vector<int> OclArray<T>::kernel_indices  = std::vector<int> (); \
                                            ^
ocl_array.cc:261:22: note: implicit instantiation first required here
  int kernel_index = kernel_indices [OclArrayKernels::real2complex_r];
                     ^
ocl_array.cc:2067:1: error: explicit specialization of 'array_prog' after instantiation
SPECIALIZE_OCLARRAY (Complex,        double,  double2,  false,  false,  true  );
^
ocl_array.cc:2049:39: note: expanded from macro 'SPECIALIZE_OCLARRAY'
  template <> OclProgram OclArray<T>::array_prog = OclProgram (); \
                                      ^
ocl_array.cc:243:3: note: implicit instantiation first required here
  array_prog.set_kernel_arg (kernel_index, 0, *this);
  ^
ocl_array.cc:2067:1: error: explicit specialization of 'kernel_indices' after instantiation
SPECIALIZE_OCLARRAY (Complex,        double,  double2,  false,  false,  true  );
^
ocl_array.cc:2050:45: note: expanded from macro 'SPECIALIZE_OCLARRAY'
  template <> std::vector<int> OclArray<T>::kernel_indices  = std::vector<int> (); \
                                            ^
ocl_array.cc:241:22: note: implicit instantiation first required here
  int kernel_index = kernel_indices [OclArrayKernels::real2complex_r];
                     ^
4 errors generated.
make: *** [ocl_array.o] Error 1


Marius Schamschula <mschamschula>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jinchuantang (Posted a comment)
  • -email is unavailable- added by dasergatskov (Posted a comment)
  • -email is unavailable- added by mschamschula (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-ec04.
    Corresponding source code