viennacl / pyviennacl-dev

Developer repository for PyViennaCL. Visit http://viennacl.sourceforge.net/ for latest releases.
MIT License
32 stars 6 forks source link

UBlas required? #5

Closed inducer closed 10 years ago

inducer commented 10 years ago

Quick question: Is ViennaCL supposed to work without UBlas? (and without -DVIENNACL_WITH_UBLAS?)

Here's what I get:

x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -fwrapv -Wall -O3 -DNDEBUG -fPIC -Iexternal/boost_numpy/ -Iexternal/viennacl-dev/ -I/usr/lib/pymodules/python2.7/numpy/core/include -I/usr/include/python2.7 -c src/_viennacl/core.cpp -o build/temp.linux-x86_64-2.7/src/_viennacl/core.o
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -fwrapv -Wall -O3 -DNDEBUG -fPIC -Iexternal/boost_numpy/ -Iexternal/viennacl-dev/ -I/usr/lib/pymodules/python2.7/numpy/core/include -I/usr/include/python2.7 -c src/_viennacl/vector_float.cpp -o build/temp.linux-x86_64-2.7/src/_viennacl/vector_float.o
In file included from src/_viennacl/vector_float.cpp:1:0:
src/_viennacl/vector.h: In instantiation of ‘viennacl::tools::shared_ptr<viennacl::vector<T> > vcl_vector_init_scalar(uint32_t, SCALARTYPE) [with SCALARTYPE = float; uint32_t = unsigned int]’:
src/_viennacl/vector_float.cpp:5:3:   required from here
src/_viennacl/vector.h:121:53: error: ‘boost::numeric::ublas::scalar_vector<float, std::allocator<float> > s_v’ has incomplete type
   ublas::scalar_vector<SCALARTYPE> s_v(length, value);

(Of course I'd like the answer to this to be a resounding 'yes'. :) )

karlrupp commented 10 years ago

Most parts of ViennaCL can also be used without uBLAS. From the error message it seems like this is not true for PyViennaCL. Maybe because Boost.Python is used anyway?

tsmithe commented 10 years ago

Hmm. It's fairly easy to remove this usage of ublas (and the parallel usage for matrix construction), but I also use the ublas sparse matrices as a host cache for constructing sparse matrix objects, and that's quite crucial. I really don't want to maintain my own sparse matrix implementation, just to avoid using ublas.

I'm not sure I understand the trepidation about ublas; as far as I can tell, you're trying to avoid boost altogether?

I'm also not so sure about using bpl-subset, but I'll discuss that in the other context.

Andreas Klöckner notifications@github.com writes:

Quick question: Is ViennaCL supposed to work without UBlas? (and without -DVIENNACL_WITH_UBLAS?)

Here's what I get:

x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -fwrapv -Wall -O3
-DNDEBUG -fPIC -Iexternal/boost_numpy/ -Iexternal/viennacl-dev/
-I/usr/lib/pymodules/python2.7/numpy/core/include
-I/usr/include/python2.7 -c src/_viennacl/core.cpp -o
build/temp.linux-x86_64-2.7/src/_viennacl/core.o
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -fwrapv -Wall -O3
-DNDEBUG -fPIC -Iexternal/boost_numpy/ -Iexternal/viennacl-dev/
-I/usr/lib/pymodules/python2.7/numpy/core/include
-I/usr/include/python2.7 -c src/_viennacl/vector_float.cpp -o
build/temp.linux-x86_64-2.7/src/_viennacl/vector_float.o
In file included from src/_viennacl/vector_float.cpp:1:0:
src/_viennacl/vector.h: In instantiation of
‘viennacl::tools::shared_ptr<viennacl::vector<T> >
vcl_vector_init_scalar(uint32_t, SCALARTYPE) [with SCALARTYPE = float;
uint32_t = unsigned int]’:
src/_viennacl/vector_float.cpp:5:3:   required from here
src/_viennacl/vector.h:121:53: error: ‘boost::numeric::ublas::scalar_vector<float, std::allocator<float> > s_v’ has incomplete type
   ublas::scalar_vector<SCALARTYPE> s_v(length, value);

(Of course I'd like the answer to this to be a resounding 'yes'. :) )


Reply to this email directly or view it on GitHub: https://github.com/viennacl/pyviennacl-dev/issues/5