Boost logo

Ublas :

Subject: Re: [ublas] axpy_prod error
From: Gunter Winkler (guwi17_at_[hidden])
Date: 2008-10-22 18:48:21


Nizar Khalifa Sallem schrieb:
> Hi,
> I have troubles with axpy_prod().
> I used tu employ the simple prod() to compute incrementally a product
> of bounded matrixes of double in a for loop with no issues:
> U_j.plus_assign(prod(trans(A_ij), A_ij));
> In order to improve performances I used axpy_prod insted:
> axpy_prod(trans(A_ij), A_ij, U_j, false);
> with U_j.clear() befor entring the loop.
> I got this error :
> --------------------------------------------------------------------------------------------------------
>
> Check failed in file /usr/include/boost/numeric/ublas/operation.hpp at
> line 575:
> norm_1 (m - cm) <= 2 * std::numeric_limits<real_type>::epsilon () *
> merrorbound
> ** std::exception: **
> internal logic
> ---------------------------------------------------------------------------------------------------------
>
> as I saw it is a type check so if I am running out of double range why
> this didn't appear in prod() else what could it be?
This might be because the order of operations differ between prod and
axpy_prod. You can disable these check:

/ #define BOOST_UBLAS_TYPE_CHECK 0

see also
http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?Effective_UBLAS

mfg
Gunter

PS: you should also consider prec_prod(...) if your matrix is too bad
for axpy_prod.

/