On Thu, May 13, 2010 at 7:06 PM, Rui Maciel <rui.maciel@gmail.com> wrote:
First of all, do you really believe that throwing insults around, making
Vardan Akopian wrote:
> Hi Rui,
>
> How about posting the code that was taking 6 minutes with uBlas and now
> takes 5 seconds with eigen.
> Without an example of code where library X significantly outperforms uBlas,
> this thread has no value and is borderline trolling.
> Otherwise, if you are actually asking for help in optimizing your uBlas
> based code, you should choose a more appropriate subject line.
baseless allegations and complaining about subject lines will solve any
problem? I don't believe it will.
And the subject line is more than
appropriate for the subject at hand.
If you don't agree then please explain
how a >6min run time to build and solve a small system of linear equations
problem is a perfectly acceptable result when you just find out that some other
alternative achieves the same thing with incomparably less effort invested in
it in around 5 seconds.
Having said that, I can do better than posting "an example of code". I'll
provide you, Vardan, with a trimmed down, benchmark version of my FEM code
which compares the library which I'm currently using (Eigen2) with uBlas. You
can test it for yourself and tweak the uBlas version with every single trick
you can get out uBlas' manual and you may use whatever component is
distributed with Boost's official package. Once you are happy with it you are
more than welcomed to share both the running times and your tweaks so that
others can not only learn from it but also be able to objectively compare the
results.
As a starting point, as uBlas doesn't offer basic operations such as
determinants, matrix inversions and sparse matrix solvers, I've took the
liberty of pasting custom routines which were either posted in this very same
mailing list as acceptable implementations (determinant and matrix inversion)
or I've developed myself (conjugate gradient solver).
And as a side note, the 6 minutes were taken from Cholesky and Gauss with
partial pivoting directly applied on a compressed_matrix<>. As it was
recently explained, that isn't a smart combo due to compressed_matrix<>'s
limitations derived from the time it takes to directly access it's coefficients.
Yet, the only reason that led me (and quite possibly a considerable number of
others like me) to use it any way is that this small but extremely important
fact is no where to be seen in the documentation.
See, this is exactly one of the major problems affecting uBlas. If you happen
> As to examples for using uBlas to solve sparse systems, you can do a search
> on umfpack bindings for uBlas. Documentation for v1 bindings:
> http://boost-sandbox.cvs.sourceforge.net/*checkout*/boost-sandbox/boost-san
> dbox/libs/numeric/bindings/umfpack/doc/index.html
to search for umfpack on uBlas' docs[1], you get zero results. This isn't
mentioned anywhere in the documentation. Furthermore, your proposed solution
comes in the form of an obscure extra component which not only isn't included
in uBlas' official package but also resides in an even more obscure CVS
repository.
This cannot possibly be seen as a reasonable solution, specially
if other alternatives are already complete, don't force the users to rely on
obscure, practically inaccessible add-ons and, as if this wasn't enough, their
default offering already runs things at a fraction of both time and effort when
compared to uBlas' offer.
So feel free to show how it is done and please do try to improve on the
results, not through insults and absurd accusations.