From: James Sutherland (James.Sutherland_at_[hidden])
Date: 2008-01-22 16:58:47
I have run this using compressed_matrix and find that the application is
still 5x slower than my current implementation, which is not hand-tuned.
I am using the following flags with g++ 3.4.6
-04 -fexpensive-optimizations -funroll-loops -DNDEBUG
Running gprof shows that
consumes 40% of the execution time, while
consumes 35% of the total time.
My application performs many matvec operations, which is presumably
reflected in the vector_assign timing. Even at that, it is more than 3x
slower than the matvec kernel of the current sparse matrix package I am
Is there any suggestion for performance increases? A factor of 5x slower is
not an option for my application, although I quite like the ublas package
On 1/19/08 1:48 AM, "Karl Meerbergen" <karl.meerbergen_at_[hidden]>
> This is a known problem. Use compressed_matrix instead.
> James Sutherland wrote:
>> I compiled an application using ublas with mapped_matrix<double>. I am
>> running an optimized build (with DNDEBUG), and I am finding very poor
>> performance on mapped_matrix.
>> Running gprof shows that more than 50% of the execution time is spent in
>> std::_Rb_tree<unsigned long, std::pair<unsigned long const, double>,
>> std::_Select1st<std::pair<unsigned long const, double> >,
>> std::less<unsigned long>, std::allocator<std::pair<unsigned long
>> const, double> > >::lower_bound(unsigned long const&) const
>> More than 30% of the execution time is spent in:
>> And 6% of the execution time is spent in mapped_matrix::find2
>> This application runs a lot of matvec operations, so that should be
>> the bottleneck. I have just migrated from another linear algebra
>> package that runs the same problem orders of magnitude faster.
>> I suppose that the obvious question is if there is a more efficient
>> way to do sparse matrix operations?
>> Thanks for any advice,
>> ublas mailing list
> ublas mailing list
-- James C. Sutherland, Asst. Professor, Dept. of Chemical Engineering The University of Utah 50 S. Central Campus Dr, 3290 MEB Salt Lake City, UT 84112-9203 Tel: (801) 585-1246 http://www.che.utah.edu/~sutherland