[petsc-users] about ksp

Satish Balay balay at mcs.anl.gov
Tue Aug 30 12:11:13 CDT 2011


what communicator did you use with MatCreateSeqDense()?

Try PETSC_COMM_SELF or MPI_COMM_SELF [and not PETSC_COMM_WORLD]

Satish

On Tue, 30 Aug 2011, Likun Tan wrote:

> Dear all,
> 
> I am using MatCreateSeqDense() to create the matrix A, if i set np=2, i
> got the error 'Comm must be of size 1'. As you suggested, i should put the
> same dense matrix on every process, but how should i do it?
> 
> And also, should the right hand side matrix B be partitioned by column?
> 
> Thanks,
> Likun
> 
> 
> On Mon, August 29, 2011 6:01 pm, Jed Brown wrote:
> > On Mon, Aug 29, 2011 at 16:49, Likun Tan <likunt at andrew.cmu.edu> wrote:
> >
> >
> >> It is 27*27 with 343 non-zeros, i use LU for all the linear equations.
> >>
> >
> >
> > This is just too small and not sparse enough for sparse linear algebra to
> >  pay off. Create the same serial dense matrix redundantly on every
> > process, factor it, put all your right hand sides for that process in a
> > matrix B, and call MatMatSolve().
> >
> 
> 
> 
> 
> 



More information about the petsc-users mailing list