Boost logo

Boost Users :

Subject: [Boost-users] [uBLAS] Strange bug with nvcc
From: Chris Jewell (chris.jewell_at_[hidden])
Date: 2012-02-10 09:57:54


Hi all,

I have a weird bug with the CUDA compiler nvcc (v. 4.1, Linux) and Boost::uBLAS (1.48.0). I need to copy data out of uBLAS vectors/matrices into GPU space, hence I need to compile a file containing Boost::ublas structures as well as CUDA code -- hence compiling Boost::uBLAS with nvcc.

I am including ublas/operation.hpp, ublas/matrix.hpp, ublas/matrix_sparse.hpp, ublas/matrix_proxy.hpp, ublas/vector.hpp, and ublas/io.hpp.

The underlying version of GCC is 4.3.2 on a Suse Linux platform. If I comment out all the CUDA code and compile with raw g++, then everything is fine. However, if I compile with nvcc, then I get many errors like the following:

/home/stats/stsiab/include/boost/numeric/ublas/vector_sparse.hpp: In member function ‘const T* boost::numeric::ublas::mapped_vector<T, A>::find_element(typename A::size_type) const’:
/home/stats/stsiab/include/boost/numeric/ublas/vector_sparse.hpp:390: error: ‘__T13’ has not been declared

What is "__T13"? grep on the Boost source doesn't find it, so I assume that I'm missing a header from somewhere else? The other odd thing is that there is no reference to my CUDA file. Furthermore, everything works well on my MacBook Pro with GCC 4.2.1 and nvcc 4.1.

Any ideas?

Thanks,

Chris

--
Dr Chris Jewell
Department of Statistics
University of Warwick
Coventry
CV4 7AL
UK
Tel: +44 (0)24 7615 0778

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net