dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #02506
Re: Memory access error in DenseMatrix::invert()
Quoting Anders Logg <logg@xxxxxxxxx>:
> When adding the option to compile without PETSc, I took the
> opportunity change the precomputation of quadrature weights for the
> ODE solvers to use DenseMatrix instead of the standard PETSc
> Matrix. (The matrices are small and dense anyway.)
>
> It seems that DenseMatrix::invert() sometimes gives unexpected results
> and the reason seems to be a memory access error somewhere in ublas. I
> don't know if this is a problem with ublas or the way we use
> it. Garth, could you look again at DenseMatrix::invert() and see if
> you can spot something obvious?
>
I'll take a look. I haven't tested invert - Kristian Oelgaard has been using it
and hasn't had any problems. Are you using the Ubuntu Boost package?
> I have attached the error log from running valgrind and here is the code
> that
> reproduces the error:
>
> DenseMatrix A(3, 3);
> A(0, 0) = A(1, 1) = A(2, 2) = 1.0;
> A.invert();
>
> How about adding solve(DenseVector& x, const DenseVector& b) to DenseMatrix?
>
Sure.
Garth
> /Anders
>
Follow ups
References