[petsc-users] How to use PETSc4py/SLEPc4py to solve an eigenvalue problem in parallel

Mengqi Zhang jollage at gmail.com
Sun Oct 26 11:10:07 CDT 2014


Dear all PETSc users,

I'm new to PETSc/SLEPc. And I'm currently trying to use
Python/PETSc4py/SLEPc4py to solve a big generalized eigenvalue problem, A x
= B lambda x.

After several days' digging and trying, I can write a script for solving a
smaller eigenvalue problem locally, but when the problem size increases, I
realize I should go parallel. My question is how to do it in parallel? How
could I preallocate the matrices among the processors? I presume there
should be a way to do that, but I couldn't find a clear guide on the
Internet.

Currently, the matrices are implemented locally, and then I use

E = SLEPc.EPS(); E.create()

E.setOperators(A,B)

E.setProblemType(SLEPc.EPS.ProblemType.GNHEP)

E.setFromOptions()

to locally solve the eigenvalue problem.


Could you help me and guide me to set the code up?  Any suggestion is
welcomed and appreciated. Thank you very much.


Best regards,

Mengqi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20141026/86b2eee2/attachment.html>


More information about the petsc-users mailing list