← Back to team overview

dolfin team mailing list archive

Re: uBlas memory access errors

 

ok, good. And I guess we'll soon be initializing using sparsity
pattern in the assembly so we won't see this.

/Anders


On Fri, Apr 13, 2007 at 10:15:38PM +0200, Garth N. Wells wrote:
> This appears to be fixed in the development version of Boost.
> 
> Garth
> 
> Garth N. Wells wrote:
> > This is a uBlas bug with generalized_vector_of_vector. The DOLFIN uBlas 
> > wrapper class creates a generalized_vector_of_vector for intermediate 
> > assembly. I'm testing against the development version of Boost before 
> > reporting a bug.
> > 
> > If we use the sparsity pattern to initialise sparse matrices in the 
> > future, generalized_vector_of_vector won't be required.
> > 
> > Garth
> > 
> > Anders Logg wrote:
> >> We seem to be having a few problem memory access errors in the uBlas
> >> linear algebra library. Here are some of the problems that valgrind
> >> reports on the current Poisson demo:
> >>
> >> Conditional jump or move depends on uninitialised value(s)
> >> ==14185==    at 0x4022460: memmove (mc_replace_strmem.c:501)
> >> ==14185==    by 0x804FAAF:
> >> dolfin::uBlasMatrix<boost::numeric::ublas::compressed_matrix<double,
> >> boost::numeric::ublas::basic_row_major<unsigned, int>, 0,
> >> boost::numeric::ublas::unbounded_array<unsigned,
> >> std::allocator<unsigned> >,
> >> boost::numeric::ublas::unbounded_array<double, std::allocator<double> > > >::uBlasMatrix() (stl_algobase.h:300)
> >> ==14185==    by 0x804CACF: main (main.cpp:100)
> >>
> >>
> >> ==14185== Conditional jump or move depends on uninitialised value(s)
> >> ==14185==    at 0x4022460: memmove (mc_replace_strmem.c:501)
> >> ==14185==    by 0x8054E1C:
> >> boost::numeric::ublas::generalized_vector_of_vector<double,
> >> boost::numeric::ublas::basic_row_major<unsigned, int>,
> >> boost::numeric::ublas::vector<boost::numeric::ublas::compressed_vector<double,
> >> 0, boost::numeric::ublas::unbounded_array<unsigned,
> >> std::allocator<unsigned> >,
> >> boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >, boost::numeric::ublas::unbounded_array<boost::numeric::ublas::compressed_vector<double, 0, boost::numeric::ublas::unbounded_array<unsigned, std::allocator<unsigned> >, boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >, std::allocator<boost::numeric::ublas::compressed_vector<double, 0, boost::numeric::ublas::unbounded_array<unsigned, std::allocator<unsigned> >, boost::numeric::ublas::unbounded_array<double, std::allocator<double> > > > > > >::resize(unsigned, unsigned, bool) (stl_algobase.h:300)
> >> ==14185==    by 0x805548F:
> >> dolfin::uBlasMatrix<boost::numeric::ublas::compressed_matrix<double,
> >> boost::numeric::ublas::basic_row_major<unsigned, int>, 0,
> >> boost::numeric::ublas::unbounded_array<unsigned,
> >> std::allocator<unsigned> >,
> >> boost::numeric::ublas::unbounded_array<double, std::allocator<double> > > >::init(unsigned, unsigned) (uBlasMatrix.h:351)
> >> ==14185==    by 0x4069837:
> >> dolfin::Assembler::initGlobalTensor(dolfin::GenericTensor&,
> >> dolfin::UFC const&) const (Assembler.cpp:233)
> >> ==14185==    by 0x406A992:
> >> dolfin::Assembler::assemble(dolfin::GenericTensor&, ufc::form const&,
> >> dolfin::Mesh&, dolfin::Array<dolfin::Function*>) (Assembler.cpp:62)
> >> ==14185==    by 0x406AB03:
> >> dolfin::Assembler::assemble(dolfin::GenericTensor&, dolfin::Form
> >> const&, dolfin::Mesh&) (Assembler.cpp:37)
> >> ==14185==    by 0x40696D1: dolfin::assemble(dolfin::GenericTensor&,
> >> dolfin::Form const&, dolfin::Mesh&) (assemble.cpp:16)
> >> ==14185==    by 0x804CAFF: main (main.cpp:102)
> >>
> >> Any ideas what goes wrong?
> >>
> >> /Anders
> >> _______________________________________________
> >> DOLFIN-dev mailing list
> >> DOLFIN-dev@xxxxxxxxxx
> >> http://www.fenics.org/mailman/listinfo/dolfin-dev
> >>
> > 
> > 
> > _______________________________________________
> > DOLFIN-dev mailing list
> > DOLFIN-dev@xxxxxxxxxx
> > http://www.fenics.org/mailman/listinfo/dolfin-dev
> > 
> 
> 
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev


References