about MatCreateSeqAIJ and MatCreateMPIAIJ

Matthew Knepley knepley at gmail.com
Tue Oct 24 08:29:44 CDT 2006


Yes.

   Matt

On 10/24/06, Yixun Liu <yxliu at fudan.edu.cn> wrote:
>
> Hi,
> Thanks.
>
> I need two things to be confirmed. For example, I have 4 processors and
> the codes are like,
>
> PetscInitialize();
> ...
> MatCreateSeqAIJ();
> ...
> PetscFinalize();
>
> Can I draw the conclusion that each code between PetscInitialize()
> and  PetscFinalize() will be called by each processor? So, each processor
> will have a sequential matrix.
>
> Best,
>
> Yixun
>
>
> ----- Original Message -----
> From: "Satish Balay" <balay at mcs.anl.gov>
> To: "PETSC" <petsc-users at mcs.anl.gov>
> Sent: Tuesday, October 24, 2006 11:39 AM
> Subject: Re: about MatCreateSeqAIJ and MatCreateMPIAIJ
>
>
> > On Tue, 24 Oct 2006, Yixun Liu wrote:
> >
> >> Hi,
> >> I am confused with this two routines.
> >>
> >> MatCreateMPIAIJ(PETSC_COMM_WORLD,...) creates a parallel
> >> matrix,which will be distributed on all the
> >> processors. MatCreateSeqAIJ(PETSC_COMM_SELF, ...) creates a
> >> sequential matrix. But because this routine will be called by each
> >> processor, which processor create this matrix?
> >
> > If the routine is called on each processor - then each of them will
> > have a sequential matrix.
> >
> > Generally one uses SeqAIJ when running the application on only one
> > processor. Also one can think of a case where someone might want to
> > store sequential matrices on each processor [the matrix sizes/values
> > being different on each proc]
> >
> > For eg: We internally store MPIAIJ mat as a collection of SeqAIJ
> > matrices on each proc. For additional info - check the 'Example usage'
> > section at:
> >
> >
> http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Mat/MatCreateMPIAIJ.html
> >
> > Satish
> >
>
>


-- 
"Failure has a thousand explanations. Success doesn't need one" -- Sir Alec
Guiness
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20061024/f9525310/attachment.htm>


More information about the petsc-users mailing list