← Back to team overview

dolfin team mailing list archive

Re: Parameters for SLEPc eigensolver

 

I made an attempt to fix this. I currently don't have SLEPc installed so
I couldn't test it. My SLEPc installation hangs on

--2009-08-02 23:00:13--  (försök: 2)
http://www.grycap.upv.es/slepc/download/distrib/slepc-3.0.0-p4.tgz
Ansluter till www.grycap.upv.es|158.42.167.189|:80... 

I'm Cc:ing this to dorsal-dev. Is the link to SLEPc current?

-- 
Anders


On Mon, Aug 03, 2009 at 04:46:37AM +0200, Marie Rognes wrote:
> 
> Hi,
> 
> It seems that the SLEPCEigenSolver does not grasp that parameters
> are being changed. The attached test_eigensolver.py
> gives
> 
> 
> [.. LARGE AMOUNT OF PETSC ERRORS ...]
> Eigenvalue solver (krylovschur) converged in 0 iterations.
> Traceback (most recent call last):
>  File "test_eigensolver.py", line 32, in <module>
>    lamda = esolver.get_eigenvalue(i)
> RuntimeError: *** Error: Requested eigenvalue has not been computed
> 
> 
> becuase 'krylovschur' is being used instead of 'lapack' as requested.
> 
> Or am I using the new parameter system wrong?
> 

> 
> from dolfin import *
> 
> n = 3
> A = Matrix(n, n)
> B = Matrix(n, n)
> for i in range(n):
>     for j in range(n):
>         A[(i, j)] = 0.0
>         B[(i, j)] = 0.0
> 
> A[(0, 0)] = 1.0
> A[(1, 1)] = 1.0
> A[(2, 2)] = 1.0
> 
> B[(1, 1)] = 1.0
> B[(2, 2)] = 1.0
> 
> A.apply()
> B.apply()
> 
> esolver = SLEPcEigenSolver()
> 
> # Set parameters for eigenslver
> esolver.parameters["solver"] = "lapack"
> esolver.parameters["spectrum"] = "smallest real"
> 
> 
> esolver.solve(down_cast(A), down_cast(B))
> 
> for i in range(1):
>     lamda = esolver.get_eigenvalue(i)
>     print "lamda_%d " % i, lamda

> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev

Attachment: signature.asc
Description: Digital signature


Follow ups

References