[Trilinos-Users] time cost by AztecOO::Iterate(int MaxIters, double Tolerance)

Heroux, Mike MHeroux at csbsju.edu
Fri Apr 1 10:36:33 MDT 2011


You need to give us more information about your preconditioner settings: How big is your problem?  Are you doing weak or strong scaling?


On 4/1/11 11:27 AM, "Siva Rajamanickam" <srajama at sandia.gov> wrote:

  The preconditioner setup cost is expected to be amortized for multiple solves. I am not sure how Aztec's native preconditioner's setup scales. Someone else who knows that code well might be able to help you. The other option for you is to try Ifpack's preconditioner.


Henian Xia wrote:
Hi Siva,
Thank you for your reply. Yes, I did use a preconditioner by calling "(*solver).SetAztecOption(AZ_precond, AZ_Jacobi);" and I didn't call the ConstructPreconditioner() before calling Iterate.

Can the time to compute the preconditioner be scaled? In my simulation, it seems that typically it will take 7 seconds to calculate the preconditioner no matter how many CPUs are used. More often, even more than 10 seconds are used to compute the preconditioner when using 960 cpus, while the iteration takes only about 10s too using 960 cpus. Is this result reasonable to you please?



On Thu, Mar 31, 2011 at 2:51 PM, Siva Rajamanickam <srajama at sandia.gov> wrote:

Are you using Aztec's native preconditioners ? If yes, then do you call ConstructPreconditioner() before calling Iterate. If you don't do that then Aztec computes the preconditioner in the first iteration and your timeUsedByCallingIterate might include that cost as well.


Henian Xia wrote:

 Hello everyone,
In my application, I have to call AztecOO::Iterate(int MaxIters,double Tolerance) to solve the equation Ax=b. There is output like below when calling this function:

        ***** Problem: Epetra::CrsMatrix
        ***** Preconditioned GMRES solution
        ***** 1 step block Jacobi
        ***** No scaling
                iter:    0           residual = 1.000000e+00
                iter:   41           residual = 3.345028e-08
                iter:   42           residual = 2.219359e-08
                iter:   43           residual = 1.459019e-08
                iter:   44           residual = 9.729064e-09
        Solution time: 0.051379 (sec.)
        total iterations: 44

But I found that the displayed "Solution time" was sometimes much smaller than the real time. For example, I used the following simple code to time the calling to that method.

 double ttemp3 = MPI_Wtime();
(*solver).Iterate(2000, 1.0E-8);
double ttemp4 = MPI_Wtime();
double timeUsedByCallingIterate = ttemp4 - ttemp3;

Especially when I use multiple CPUs, such as 960 cores, the difference between the calculated "timeUsedByCallingIterate" and the output "Solution time" can be huge. Why is this happening please?

Thank you,

More information about the Trilinos-Users mailing list