[Trilinos-Users] [EXTERNAL] slow anasazi in NOX::Epetra
Thornquist, Heidi K
hkthorn at sandia.gov
Wed Nov 27 11:17:58 MST 2013
Hi Romain,
In addition to David's comments, I would add that checking convergence each time a new vector is added to the Krylov subspace can be very expensive. This is controlled by the option:
aList.set("Step Size", 1); // How often to check convergence
By comparison, eigs only checks convergence when it reaches the end of the subspace expansion (20 vectors in your case) before performing the restart. Checking convergence more often with the
"Step Size" option is a convenience, but there is a performance penalty for it. As David has mentioned, I would check the linear solver performance, for multiplicities in the eigenvalues
(for which the block size should be increased), and maybe increase the "Num Blocks" if you find the solver has to perform many restarts.
Hope this helps.
Thanks,
Heidi
--
Heidi K. Thornquist
Electrical Models & Simulation
Sandia National Laboratories
Albuquerque, NM 87185-1323
From: <Day>, David <dmday at sandia.gov<mailto:dmday at sandia.gov>>
Date: Wednesday, November 27, 2013 9:27 AM
To: Veltz Romain <romain.veltz at inria.fr<mailto:romain.veltz at inria.fr>>
Cc: "trilinos-users at software.sandia.gov<mailto:trilinos-users at software.sandia.gov>" <trilinos-users at software.sandia.gov<mailto:trilinos-users at software.sandia.gov>>
Subject: Re: [Trilinos-Users] [EXTERNAL] slow anasazi in NOX::Epetra
Romain,
There is no simple answer. One issue that is mostly independent is simply the efficiency of the linear solve. Here look for the number of times that GMRES must restart. The other issues relate more directly to Anasazi. There is a natural conflict between continuation methods and iterative linear solvers. The continuation method drives the Jacobian matrix to be singular, in many cases. Loca is carefully designed to mitigate this issue, but I guess that this is why you are solving an eigenvalue problem.
You might send this to the Anasazi mailing list for more discussion. Block Size one is a good guess, unless for some reason your problem has multiple eigenvalues. You might try a much larger value of Num Blocks. You might also try to experiment with the Convergence Tolerance. There is also a trade off between the linear solver and Anasazi; a more accurate linear solves (smaller "Tolerance") increases the cost per linear solve and can decrease the number of Anasazi iterations.
-David Day
From: Veltz Romain <romain.veltz at inria.fr<mailto:romain.veltz at inria.fr>>
Date: Wednesday, November 27, 2013 9:02 AM
To: "trilinos-users at software.sandia.gov<mailto:trilinos-users at software.sandia.gov>" <trilinos-users at software.sandia.gov<mailto:trilinos-users at software.sandia.gov>>
Subject: [EXTERNAL] [Trilinos-Users] slow anasazi in NOX::Epetra
Hello All,
I am doing a continuation in the NOX:Epetra interface with a Epetra_OPerator for the Jacobian. As a bi-product, I am computing the eigenvalues of the Jacobian at each step using the following piece of code.
Teuchos::ParameterList& aList = locaStepperList.sublist("Eigensolver");
aList.set("Method", "Anasazi");
aList.set("Sorting Order", "LM"); //
aList.set("Block Size", 1);//1 // Size of blocks, ie Krylov subspace
aList.set("Num Blocks", 20);//15 // Size of Arnoldi factorization: = 3 nev
aList.set("Num Eigenvalues", 5); // Number of eigenvalues
aList.set("Convergence Tolerance", 1.0e-7); // Tolerance
aList.set("Step Size", 1); // How often to check convergence
aList.set("Maximum Restarts",20); // Maximum number of restarts
Fore the linear solver, the options are here:
Teuchos::ParameterList& lsParams = newParams.sublist("Linear Solver");
lsParams.set("Aztec Solver", "GMRES");
lsParams.set("Size of Krylov Subspace",100);//default = 300
lsParams.set("Max Iterations", 100);// etait 200
lsParams.set("Tolerance", 1e-8);
lsParams.set("Output Frequency", 1);//etait 1
lsParams.set("Scaling", "None");
lsParams.set("Preconditioner Operator", "Use Jacobian");// default
I would like to point that the problem I am trying to solve is
F(V,lambda) = -V + convolution2d(J, N(lambda*V))
where N is a nonlinearity.
I have two questions:
- how do the parameters Block size and Num blocks affect the computation of the eigenvalues?
I have done the same computation in matlab with the function eigs and it is at least twice as fast.
- how can I improve the speed of the computation of my eigenvalues in Anasazi. I think this is linked to the first question.
Thank you for your help,
Best,
Romain
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://software.sandia.gov/pipermail/trilinos-users/attachments/20131127/60b58768/attachment.html
More information about the Trilinos-Users
mailing list