<div>What do you mean about 3)? I am considering to use MatSolve_MPIAIJSpooles with setting b </div>
<div>to</div>
<div>1 0 0 . . .0 </div>
<div>0 1 0 0</div>
<div>0 0 1 0</div>
<div>. . .</div>
<div>. . .</div>
<div>. . . 1</div>
<div>for solving Ax=b. After finishing all, I will rearrange X=[x1,x2,x3,x4], which is the inversion of A. whether is it similar with 1) you mentioned?</div>
<div>Practically, If I use such method, I may use some iterative methods to solve it, not direct inversion method. What is the time difference or time complexity regarding using spooles (direct inversion method) or other iterative methods?<br>
</div>
<div>thanks a lot.</div>
<div> </div>
<div>Regards,</div>
<div>Yujie<br></div>
<div class="gmail_quote">On Wed, Feb 27, 2008 at 2:33 PM, Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">This seems like it would involve significant programming time. Therefore,<br>I suggest<br><br> 1) Solving each vector in a loop<br>
<br> 2) Taking a look at MatMatSolve_SeqAIJ() and<br>MatSolve_MPIAIJSpooles() and trying to implement it yourself for<br>Spooles<br><br> 3) Reformulating your problem so as not use an inverse, but rather just solves<br><br>
Thanks,<br><br> Matt<br>
<div>
<div></div>
<div class="Wj3C7c"><br>On Wed, Feb 27, 2008 at 3:44 PM, Yujie <<a href="mailto:recrusader@gmail.com">recrusader@gmail.com</a>> wrote:<br>><br>><br>><br>> ---------- Forwarded message ----------<br>> From: Yujie <<a href="mailto:recrusader@gmail.com">recrusader@gmail.com</a>><br>
> Date: Wed, Feb 27, 2008 at 11:40 AM<br>> Subject: Re: any examples to demonstrate how to Spooles package?<br>> To: <a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a><br>><br>><br>><br>
> This is why I have recompiled PETSc with spooles. spooles can deal with<br>> AX=Y(Y is a matrix). However, PETSc only provide the following:<br>><br>> 51: PetscErrorCode MatSolve_MPISpooles(Mat A,Vec b,Vec x)<br>
> I don't set b to a matrix even if I use<br>> 178: PetscErrorCode MatFactorNumeric_MPISpooles(Mat A,MatFactorInfo<br>> *info,Mat *F) for LU factorization<br>><br>> Could you give me some advice or examples? thanks a lot.<br>
><br>> Regards,<br>> Yujie<br>><br>><br>><br>><br>><br>> On Wed, Feb 27, 2008 at 11:32 AM, Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>> wrote:<br>><br>> ><br>
> > On Wed, Feb 27, 2008 at 1:21 PM, Yujie <<a href="mailto:recrusader@gmail.com">recrusader@gmail.com</a>> wrote:<br>> > > Dear Matt:<br>> > ><br>> > > I checked the codes about MatMatSolve(). However, currently, PETSc<br>
> didn't<br>> > > realize its parallel version. Is it right? I want to inverse the matrix<br>> > > parallelly. could you give me some examples about it? thanks a lot.<br>> ><br>> > Thats right. The parallel version is not implemented. It looks like this<br>
> would<br>> > take significant work.<br>> ><br>> ><br>> ><br>> ><br>> > Matt<br>> ><br>> > > Regards,<br>> > > Yujie<br>> > ><br>> > ><br>
> > ><br>> > > On 2/27/08, Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>> wrote:<br>> > > > On Wed, Feb 27, 2008 at 11:05 AM, Yujie <<a href="mailto:recrusader@gmail.com">recrusader@gmail.com</a>> wrote:<br>
> > > > > Dear Sanjay:<br>> > > > ><br>> > > > > Thank you for your reply. I don't understand what you said. Now, I<br>> want<br>> > > to<br>> > > > > use spooles package to inverse a sparse SPD matrix. I have further<br>
> > > checked<br>> > > > > the inferface about spooles in PETSc. I find although spooles can<br>> deal<br>> > > with<br>> > > > > AX=B (B may be a dense matrix) with parallel LU factorization.<br>
> > > > > However, PETSc only provide the following:<br>> > > > > 51: PetscErrorCode MatSolve_MPISpooles(Mat A,Vec b,Vec x)<br>> > > > > I don't set b to a matrix even if I use<br>
> > > > > 178: PetscErrorCode MatFactorNumeric_MPISpooles(Mat A,MatFactorInfo<br>> > > > > *info,Mat *F) for LU factorization.<br>> > > > ><br>> > > > > Could you have any suggestions about this? thanks a lot.<br>
> > > ><br>> > > ><br>> > > > MatMatSolve()<br>> > > ><br>> > > ><br>> > ><br>> <a href="http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Mat/MatMatSolve.html" target="_blank">http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Mat/MatMatSolve.html</a><br>
> > > ><br>> > > > Matt<br>> > > ><br>> > > ><br>> > > > > Regards,<br>> > > > > Yujie<br>> > > > ><br>> > > > > On 2/26/08, Sanjay Govindjee <<a href="mailto:sanjay@ce.berkeley.edu">sanjay@ce.berkeley.edu</a>> wrote:<br>
> > > > > > from my make file<br>> > > > > ><br>> > > > > > -@${MPIRUN} -s all -np $(NPROC) $(PROGNAME) -ksp_type preonly<br>> > > > > > -ksp_monitor -pc_type cholesky -mat_type mpisbaijspooles<br>
> -log_summary<br>> > > > > > -on_error_attach_debugger -mat_spooles_symmetryflag 0<br>> -options_left<br>> > > > > ><br>> > > > > ><br>> > > > > > -sg<br>
> > > > > ><br>> > > > > ><br>> > > > > > Yujie wrote:<br>> > > > > > > Hi, everyone<br>> > > > > > ><br>> > > > > > > I have compiled PETSc with spooles. However, I try to find how<br>
> to<br>> > > use<br>> > > > > > > this package in PETSc directory. I can't find any examples for<br>> it.<br>> > > > > > > Could you give me some advice? I want to use spooles to inverse<br>
> a<br>> > > > > > > sparse matrix. thanks a lot.<br>> > > > > > ><br>> > > > > > > Regards,<br>> > > > > > > Yujie<br>> > > > > ><br>
> > > > > ><br>> > > > ><br>> > > > ><br>> > > ><br>> > > ><br>> > > ><br>> > > ><br>> > > > --<br>> > > > What most experimenters take for granted before they begin their<br>
> > > > experiments is infinitely more interesting than any results to which<br>> > > > their experiments lead.<br>> > > > -- Norbert Wiener<br>> > > ><br>> > > ><br>
> > ><br>> > ><br>> ><br>> ><br>> ><br>> > --<br>> ><br>> ><br>> ><br>> > What most experimenters take for granted before they begin their<br>> > experiments is infinitely more interesting than any results to which<br>
> > their experiments lead.<br>> > -- Norbert Wiener<br>> ><br>> ><br>><br>><br>><br><br><br><br></div></div>--<br>
<div>
<div></div>
<div class="Wj3C7c">What most experimenters take for granted before they begin their<br>experiments is infinitely more interesting than any results to which<br>their experiments lead.<br>-- Norbert Wiener<br></div></div>
</blockquote></div><br>