This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

How to combine Epetra matrices back to global matrix

+1 vote

Dear All

I realized last week, that the assemble or assemble_system functions in FEniCS
automatically work in parallel if the python script is started via mpirun.
If I use the Epetra Matrix Class the parallel code provides a nice speedup for the
assembly of my finite element matrices. However, the matrices then are obtained as
submatrices or partial matrices of the global matrix that I require for my eigen value solver
I have searched for any info on how to combine these , I.e. "sum" these matrices
and then to user a normal serial eigen value solver.

Any help will be much appreciated.

regard

Moritz

asked Feb 4, 2014 by moritzbraun FEniCS User (1,390 points)

Use parallel eigen solver PETSc + SLEPc.

Dear Jan

Thanks a lot for your comment!

As it happens I did not manage to compile PETsc and SLEPc on the machine
where I was doing the calculations.
Is there no equivalent way for Epetra?

regards

Moritz

1 Answer

+1 vote
 
Best answer

Use PyTrilinos (http://trilinos.sandia.gov/packages/pytrilinos) to access Anasazi, the Trilinos eigensolver.

answered Feb 5, 2014 by Garth N. Wells FEniCS Expert (35,930 points)
selected Feb 5, 2014 by Jan Blechta

Dear All

I have found a solution for the problem!
I simply combine FEniCS with mpi4py

convert the epetra local matrices to CSR matrices
gather them in process U
add them up
and then do what ever want to do with the whole thing
this is really neat!
My example code is a bit to long to put there.
Now I can take this code an can run it with 400 processors on our big iron

regards

Moritz

...