[Trilinos-Users] Solver Managers unconverge

Baker, Christopher G. bakercg at ornl.gov
Mon May 24 09:30:55 MDT 2010


Hello,

The solvers in Anasazi can solve generalized eigenvalue problems. If you use the BlockKrylovSchur solver manager, you will need to transform the problem to a standard eigenvalue problem: set C = B^{-1/2} A B^{-1/2}, which can easily be computed because B is diagonal, then solve C x = x lambda. If you use the Block Davidson or LOBPCG solver managers, you may specify the problem in a generalized form, although you should consider transforming the problem to hermitian standard, as it is straightforward in this case and the generalized solve sees additional overhead. Just remember to transform the solution from the standard back to generalized:
let D = sqrt(B), which is diagonal. inv(D) is also diagonal.
if A x = B x lambda, then inv(D) A inv(D) * (D x) = (D x) lambda. Then (D x) is a solution to the standard eigenvalue problem for inv(D) A inv(D), where x is a solution to the generalized eigenvalue problem for (A,B).

You should consider using a preconditioner to improve the convergence of the iteration (or a spectral transformation, in the case of the BKS solver.) Fortunately, if you are using Epetra to store your matrix, there are numerous packages available to you (e.g., Amesos direct sparse solver, Ifpack algebraic preconditioner).

The default solver parameter may not be appropriate for your case. Try increasing the number of blocks in the BlockDavidson or BlockKrylovSchur solvers. Also, if your application does not require high accuracy, consider reducing the convergence tolerance. You may also consider increasing the verbosity to include IterationDetails to allow you to monitor the rate of convergence and estimate how the parameter affect the convergence.

For gathering the computed eigenvectors, Epetra allows you to do this using the import functionality on the multivector. You will need to create a new Epetra_Map, where all IDs are contained on the root node. You will create an importer using from the distributed map to this new map. You will use that object and the Epetra_MultiVector::Import() method to import (that is, gather) the remote elements onto the root node. There are examples of this in Trilinos/packages/epetra/example/ImportExport.

Please feel free to ask here if you have any other questions.

Chris




On 5/23/10 9:04 AM, "Mehmet Salih YILDIRIM" <linux at isadamlari.org> wrote:

Hello!

Recently, we'd been trying to implement an image segmentation algorithm sm-ncut <http://www.cs.berkeley.edu/~malik/papers/SM-ncut.pdf>  using trilinos. We decided to use trilinos because the implementation was supposed to be a distributed one. But we encountered some problems. They are:

We have to calculate the eigenvector corresponding to second smallest eigenvalue for a large sparse matrix, but all of the eigensolvers in Anasazi return Anasazi::Unconverged upon calling the solve() function. We are trying to solve the generalized eigenproblem A*x = lambda*B*x where A and B are hermitian and B is a diagonal matrix with all positive elements. (I think it means positive definitive maybe.)

After solving the problem, we need to collect (gather?) this eigenvector on the root node. (with pid = 0) But in the Anasazi documentation, nothing about the map of resulting eigenvectors is mentioned. How may i process this resulting eigenvector locally on the root node?

Ps: Sorry, I sent this mail as a response of a previous mail accidentally. That is why I am resending as a new topic.

Any help will be appreciated.





More information about the Trilinos-Users mailing list