> On Oct 21, 2017, at 5:18 AM, Jaganathan, Srikrishna > <[email protected]> wrote: > > On 2017-10-21 00:42, Barry Smith wrote: >>> On Oct 18, 2017, at 4:14 AM, Jaganathan, Srikrishna >>> <[email protected]> wrote: >>> Hello, >>> I have been trying to distribute a already existing stiffness matrix in my >>> FEM code to petsc parallel matrix object , but I am unable to find any >>> documentation regarding it. >> I really really don't recommend doing this. If you code is >> sequential and you want to speed up the linear solves then use some >> linear solver library that uses OpenMP for parallelism and be done >> with it. Mix sequential finite element assembly with MPI parallel >> solvers is just not worth going within 100 meters of. >> Barry > Yeah, it makes sense to not mix both. We are trying to have an MPI parallel > Finite element assembly, but it is a quite big overhaul of the existing code > so as a first step we are trying to incorporate the solver and then proceed > from that.
I don't recommend that route, other routes are better. >>> It was quite straightforward to create a sequential petsc matrix object and >>> everything was working as intended.I have read some of the user comments in >>> the mailing lists regarding similar situation and most of the times the >>> solution suggested is to create stiffness matrix from the the mesh in >>> distributed format. Since its a little difficult in my case to pass the >>> mesh data in the code , is there anyway to distribute already existing >>> stiffness matrix ? >>> Thanks and Regards >>> Srikrishna Jaganathan
