[Trilinos-Users] [EXTERNAL] Belos::LinearProblem::setProblem() is taking too much time
John Moore
johnpmooreiv at gmail.com
Mon Feb 16 14:58:29 MST 2015
Thanks for the suggestion! It turned out to be a false alarm. I apologize.
I was measuring the time on the root process only, and it turns out I had a
function that was called before the call to Belos that is not easily
parallelizable. Therefore, some processes got to the Belos timing section
much faster than others, and I got a false reading on the root node. I
should probably use Teuchos::TimeMonitor from now on for timing things.
On Mon, Feb 16, 2015 at 2:42 PM, Thornquist, Heidi K <hkthorn at sandia.gov>
wrote:
> Hi John,
>
> The LinearProblem::setProblem method makes sure that the linear problem
> is valid, that there is an operator, right-hand side, and solution vector.
> After that, it computes the initial residual and preconditioned initial
> residual (if left preconditioning is used). So, no, the behavior that you
> are seeing is not expected.
>
> A couple questions might be helpful in understanding this better:
>
> 1) Which solver are you using?
> 2) How many iterations is this solver performing before achieving
> convergence (assuming 400 is your maximum number of iterations)?
> 3) Are you deferring your custom preconditioner or operator construction
> until it is actually applied? If you are, and you are using a left
> preconditioner, then it would show up in the setProblem timing.
>
>
> Thanks,
> Heidi
>
> --
>
> Heidi K. Thornquist
> Electrical Models & Simulation
> Sandia National Laboratories
> Albuquerque, NM 87185-1323
>
>
> From: John Moore <johnpmooreiv at gmail.com>
> Date: Monday, February 16, 2015 12:10 PM
> To: "trilinos-users at software.sandia.gov" <
> trilinos-users at software.sandia.gov>
> Subject: [EXTERNAL] [Trilinos-Users] Belos::LinearProblem::setProblem()
> is taking too much time
>
> I am interested in solving large linear systems within Newton
> iterations. My matrix structure remains constant, while only the values
> change.
>
> I find that most of the time is actually spent in the functions
> Belos::LinearProblem::setProblem. Is this to be expected? The case that I
> am currently running is detailed below:
>
> TpetraCrsMatrix
> # processors: 32 mpi processes
> Number of rows: 802225
> Number of entries: 71819925
> Preconditioner: Custom
> Number of iters: 400
> Solve time: 42 Seconds
> setProblem time: 35 seconds
>
> The performance only gets work as the problem gets larger. For a
> slightly larger (and denser) problem, the setProblem() time is about 4
> times that of the solve time. For small problems, most of the time is spent
> in the solve, as expected. Is there a way to get around calling
> setProblem() every time I need to solve the linear system, or could I be
> doing something wrong?
>
> Thank you,
> John
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://software.sandia.gov/pipermail/trilinos-users/attachments/20150216/eb18e491/attachment.html>
More information about the Trilinos-Users
mailing list