any good ideas for me from you? thanks a lot.Fwd: any examples to demonstrate how to Spooles package?
Yujie
recrusader at gmail.com
Wed Feb 27 16:47:46 CST 2008
What do you mean about 3)? I am considering to use MatSolve_MPIAIJSpooles
with setting b
to
1 0 0 . . .0
0 1 0 0
0 0 1 0
. . .
. . .
. . . 1
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?
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?
thanks a lot.
Regards,
Yujie
On Wed, Feb 27, 2008 at 2:33 PM, Matthew Knepley <knepley at gmail.com> wrote:
> This seems like it would involve significant programming time. Therefore,
> I suggest
>
> 1) Solving each vector in a loop
>
> 2) Taking a look at MatMatSolve_SeqAIJ() and
> MatSolve_MPIAIJSpooles() and trying to implement it yourself for
> Spooles
>
> 3) Reformulating your problem so as not use an inverse, but rather just
> solves
>
> Thanks,
>
> Matt
>
> On Wed, Feb 27, 2008 at 3:44 PM, Yujie <recrusader at gmail.com> wrote:
> >
> >
> >
> > ---------- Forwarded message ----------
> > From: Yujie <recrusader at gmail.com>
> > Date: Wed, Feb 27, 2008 at 11:40 AM
> > Subject: Re: any examples to demonstrate how to Spooles package?
> > To: petsc-users at mcs.anl.gov
> >
> >
> >
> > This is why I have recompiled PETSc with spooles. spooles can deal with
> > AX=Y(Y is a matrix). However, PETSc only provide the following:
> >
> > 51: PetscErrorCode MatSolve_MPISpooles(Mat A,Vec b,Vec x)
> > I don't set b to a matrix even if I use
> > 178: PetscErrorCode MatFactorNumeric_MPISpooles(Mat A,MatFactorInfo
> > *info,Mat *F) for LU factorization
> >
> > Could you give me some advice or examples? thanks a lot.
> >
> > Regards,
> > Yujie
> >
> >
> >
> >
> >
> > On Wed, Feb 27, 2008 at 11:32 AM, Matthew Knepley <knepley at gmail.com>
> wrote:
> >
> > >
> > > On Wed, Feb 27, 2008 at 1:21 PM, Yujie <recrusader at gmail.com> wrote:
> > > > Dear Matt:
> > > >
> > > > I checked the codes about MatMatSolve(). However, currently, PETSc
> > didn't
> > > > realize its parallel version. Is it right? I want to inverse the
> matrix
> > > > parallelly. could you give me some examples about it? thanks a lot.
> > >
> > > Thats right. The parallel version is not implemented. It looks like
> this
> > would
> > > take significant work.
> > >
> > >
> > >
> > >
> > > Matt
> > >
> > > > Regards,
> > > > Yujie
> > > >
> > > >
> > > >
> > > > On 2/27/08, Matthew Knepley <knepley at gmail.com> wrote:
> > > > > On Wed, Feb 27, 2008 at 11:05 AM, Yujie <recrusader at gmail.com>
> wrote:
> > > > > > Dear Sanjay:
> > > > > >
> > > > > > Thank you for your reply. I don't understand what you said. Now,
> I
> > want
> > > > to
> > > > > > use spooles package to inverse a sparse SPD matrix. I have
> further
> > > > checked
> > > > > > the inferface about spooles in PETSc. I find although spooles
> can
> > deal
> > > > with
> > > > > > AX=B (B may be a dense matrix) with parallel LU factorization.
> > > > > > However, PETSc only provide the following:
> > > > > > 51: PetscErrorCode MatSolve_MPISpooles(Mat A,Vec b,Vec x)
> > > > > > I don't set b to a matrix even if I use
> > > > > > 178: PetscErrorCode MatFactorNumeric_MPISpooles(Mat
> A,MatFactorInfo
> > > > > > *info,Mat *F) for LU factorization.
> > > > > >
> > > > > > Could you have any suggestions about this? thanks a lot.
> > > > >
> > > > >
> > > > > MatMatSolve()
> > > > >
> > > > >
> > > >
> >
> http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Mat/MatMatSolve.html
> > > > >
> > > > > Matt
> > > > >
> > > > >
> > > > > > Regards,
> > > > > > Yujie
> > > > > >
> > > > > > On 2/26/08, Sanjay Govindjee <sanjay at ce.berkeley.edu> wrote:
> > > > > > > from my make file
> > > > > > >
> > > > > > > -@${MPIRUN} -s all -np $(NPROC) $(PROGNAME) -ksp_type preonly
> > > > > > > -ksp_monitor -pc_type cholesky -mat_type mpisbaijspooles
> > -log_summary
> > > > > > > -on_error_attach_debugger -mat_spooles_symmetryflag 0
> > -options_left
> > > > > > >
> > > > > > >
> > > > > > > -sg
> > > > > > >
> > > > > > >
> > > > > > > Yujie wrote:
> > > > > > > > Hi, everyone
> > > > > > > >
> > > > > > > > I have compiled PETSc with spooles. However, I try to find
> how
> > to
> > > > use
> > > > > > > > this package in PETSc directory. I can't find any examples
> for
> > it.
> > > > > > > > Could you give me some advice? I want to use spooles to
> inverse
> > a
> > > > > > > > sparse matrix. thanks a lot.
> > > > > > > >
> > > > > > > > Regards,
> > > > > > > > Yujie
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > What most experimenters take for granted before they begin their
> > > > > experiments is infinitely more interesting than any results to
> which
> > > > > their experiments lead.
> > > > > -- Norbert Wiener
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > >
> > >
> > >
> > > What most experimenters take for granted before they begin their
> > > experiments is infinitely more interesting than any results to which
> > > their experiments lead.
> > > -- Norbert Wiener
> > >
> > >
> >
> >
> >
>
>
>
> --
> What most experimenters take for granted before they begin their
> experiments is infinitely more interesting than any results to which
> their experiments lead.
> -- Norbert Wiener
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20080227/6090d56d/attachment.htm>
More information about the petsc-users
mailing list