Yes.<br><br> Matt<br><br><div><span class="gmail_quote">On 10/24/06, <b class="gmail_sendername">Yixun Liu</b> <<a href="mailto:yxliu@fudan.edu.cn">yxliu@fudan.edu.cn</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>Thanks.<br><br>I need two things to be confirmed. For example, I have 4 processors and the codes are like,<br><br>PetscInitialize();<br>...<br>MatCreateSeqAIJ();<br>...<br>PetscFinalize();<br><br>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.
<br><br>Best,<br><br>Yixun<br><br><br>----- Original Message -----<br>From: "Satish Balay" <<a href="mailto:balay@mcs.anl.gov">balay@mcs.anl.gov</a>><br>To: "PETSC" <<a href="mailto:petsc-users@mcs.anl.gov">
petsc-users@mcs.anl.gov</a>><br>Sent: Tuesday, October 24, 2006 11:39 AM<br>Subject: Re: about MatCreateSeqAIJ and MatCreateMPIAIJ<br><br><br>> On Tue, 24 Oct 2006, Yixun Liu wrote:<br>><br>>> Hi,<br>>> I am confused with this two routines.
<br>>><br>>> MatCreateMPIAIJ(PETSC_COMM_WORLD,...) creates a parallel<br>>> matrix,which will be distributed on all the<br>>> processors. MatCreateSeqAIJ(PETSC_COMM_SELF, ...) creates a<br>>> sequential matrix. But because this routine will be called by each
<br>>> processor, which processor create this matrix?<br>><br>> If the routine is called on each processor - then each of them will<br>> have a sequential matrix.<br>><br>> Generally one uses SeqAIJ when running the application on only one
<br>> processor. Also one can think of a case where someone might want to<br>> store sequential matrices on each processor [the matrix sizes/values<br>> being different on each proc]<br>><br>> For eg: We internally store MPIAIJ mat as a collection of SeqAIJ
<br>> matrices on each proc. For additional info - check the 'Example usage'<br>> section at:<br>><br>> <a href="http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Mat/MatCreateMPIAIJ.html">
http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Mat/MatCreateMPIAIJ.html</a><br>><br>> Satish<br>><br><br></blockquote></div><br><br clear="all"><br>-- <br>"Failure has a thousand explanations. Success doesn't need one" -- Sir Alec Guiness