
Ublas : 
Subject: Re: [ublas] profiling shows most time is consumed by indexing_matrix_assign
From: Nasos Iliopoulos (nasos_i_at_[hidden])
Date: 20100411 11:47:40
Heikko,
Also consider that you may need to define NDEBUG in your compilation options (i.e. DNDEBUG), rather than defining it in your code, as if some ublas headers precedes it, it will have no effect (unless of course you make sure that it is indeed defined before any ublas header is included).
Best
Nasos
From: nasos_i_at_[hidden]
To: ublas_at_[hidden]
Date: Sat, 10 Apr 2010 20:31:49 0400
Subject: Re: [ublas] profiling shows most time is consumed by indexing_matrix_assign
Hi Heikko,
did you check if you have nested products? (those may be hidden sometimes if you pass expressions around) Take a look at the very last item in http://www.boost.org/doc/libs/1_42_0/libs/numeric/ublas/doc/index.htm.
The indexing_matrix_assign is the main function that is called when you assign an expression to a matrix in ublas, so everything passes through that. And remember in ublas A+B (with A and B matrices) is an expression in ublas, not a matrix, it becomes a matrix when you assign it to something.
Also try to play with DBOOST_UBLAS_MOVE_SEMANTICS (http://www.boost.org/doc/libs/1_42_0/libs/numeric/ublas/doc/options.htm) and noalias() (http://www.boost.org/doc/libs/1_41_0/libs/numeric/ublas/doc/operations_overview.htm) , to see if those help.
Best regards
Nasos
> From: heiko_at_[hidden]
> To: ublas_at_[hidden]
> Date: Fri, 9 Apr 2010 18:20:41 +0200
> Subject: [ublas] profiling shows most time is consumed by indexing_matrix_assign
>
> Dear all,
>
> I have just recently begun to use uBLAS to do some numerics, solving a
> system of ordinary linear differential equations. The ODE solver
> repeatedly invokes a function that computes the right hand side of the
> ODE, and that contains almost the whole computational effort. In this
> function, I have about 8 matrixmatrix multiplications (with prod()) and
> about the same number of additions/subtractions of matrices or
> multiplications with a scalar. The involved matrices are dense with
> std::complex<double> entries and are of dimension 800x800.
>
> The program, especially the evaluation of the rhs function, seems to be
> running fairly slow and profiling with gprof shows that the rhs
> evaluation takes 95%
> of the computation time. Deeper inspection shows that two
> versions of indexing_matrix_assign() account for almost all
> of the time needed. Now comes my question: Is this the expected
> behaviour for the described situation?
>
> Some additional information: I am using uBLAS 1.41.0 with NDEBUG set to
> 1.
>
> Any help is appreciated.
>
> Best regards,
>
> Heiko Schröder
>
>
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
> Sent to: nasos_i_at_[hidden]
The New Busy is not the too busy. Combine all your email accounts with Hotmail. Get busy.
_________________________________________________________________
The New Busy is not the old busy. Search, chat and email from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:enUS:WM_HMP:042010_3