[petsc-users] petsc-users Digest, Vol 13, Issue 28

Hong Zhang hzhang at mcs.anl.gov
Thu Jan 21 17:28:29 CST 2010


Jack,
>
> > 2)
> > http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/PC/PCFactorSetMatSolverPackage.html
> Currently I am applying these steps:
> 1. set ksp context extracted from snes to pre only
> 2. set pc type to lu
> 3. set pc factor solver package to MUMPS, as you've explained above.
> However, having no examples to compare to, I'm not 100% sure if this  
> is the way it's supposed to be done.

I just wrote a Fortran example
petsc-dev/src/snes/examples/tests/ex14f.F few days ago which
uses MUMPS as a linear solver within snes non-linear loop.
The example is attached, or can be obtained through petsc-dev.

petsc-dev/src/snes/examples/tests/ex12f.F is a simpler example
which you can run it with options
./ex12f -pc_type lu -pc_factor_mat_solver_package mumps
to invoke mumps' LU. Use '-snes_view' to check which solvers are used
and '-ksp_monitor -snes_monitor' for monitoring iterations.

Hong

>
> > 3) There is a manual section on this
> if you're talking about page 83, it doesn't spell out the case which  
> I'm trying to apply to, so thought I'd better double-check.
>
> > 4) You can use command line options in Fortran
> Not in the custom fortran application we're building, which is  
> compiled as a library. We're linking in petsc to exploit its  
> fantastic solver capabilities....
>
> Cheers,
> Jack
>
>
>
> petsc-users-request at mcs.anl.gov wrote:
>> Send petsc-users mailing list submissions to
>> 	petsc-users at mcs.anl.gov
>> To subscribe or unsubscribe via the World Wide Web, visit
>> 	https://lists.mcs.anl.gov/mailman/listinfo/petsc-users
>> or, via email, send a message with subject or body 'help' to
>> 	petsc-users-request at mcs.anl.gov
>> You can reach the person managing the list at
>> 	petsc-users-owner at mcs.anl.gov
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of petsc-users digest..."
>> Today's Topics:
>>   1.  using external direct linear solvers (Jack Lee)
>>   2. Re:  using external direct linear solvers (Matthew Knepley)
>>   3.  using PETSC with visual studio 2005? (Zhifeng Sheng - EWI)
>>   4. Re:  using PETSC with visual studio 2005? (Satish Balay)
>> ----------------------------------------------------------------------
>> Message: 1
>> Date: Wed, 20 Jan 2010 22:50:47 +0000
>> From: Jack Lee <jack.lee at sjc.ox.ac.uk>
>> Subject: [petsc-users] using external direct linear solvers
>> To: petsc-users at mcs.anl.gov
>> Message-ID: <4B5788C7.20902 at sjc.ox.ac.uk>
>> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>> Hi there,
>> Apologies if this is an obvious question, but is there an example  
>> showing how to call an external solver? I am trying to get the snes  
>> solver to use MUMPS. As the calls are made from a fortran  
>> application, I cannot use the commandline options.
>> Jack
>> ------------------------------
>> Message: 2
>> Date: Wed, 20 Jan 2010 17:14:16 -0600
>> From: Matthew Knepley <knepley at gmail.com>
>> Subject: Re: [petsc-users] using external direct linear solvers
>> To: PETSc users list <petsc-users at mcs.anl.gov>
>> Message-ID:
>> 	<a9f269831001201514x473b849ci76cc9ab80d754586 at mail.gmail.com>
>> Content-Type: text/plain; charset="iso-8859-1"
>> On Wed, Jan 20, 2010 at 4:50 PM, Jack Lee <jack.lee at sjc.ox.ac.uk>  
>> wrote:
>>> Hi there,
>>>
>>> Apologies if this is an obvious question, but is there an example  
>>> showing
>>> how to call an external solver? I am trying to get the snes solver  
>>> to use
>>> MUMPS. As the calls are made from a fortran application, I cannot  
>>> use the
>>> commandline options.
>>>
>> 1) MUMPS is a linear solver
>> 2)
>> http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/PC/PCFactorSetMatSolverPackage.html
>> 3) There is a manual section on this
>> 4) You can use command line options in Fortran
>>  Matt
>> Jack

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20100121/1906c039/attachment-0002.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ex14f.F
Type: application/octet-stream
Size: 12434 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20100121/1906c039/attachment-0001.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20100121/1906c039/attachment-0003.htm>


More information about the petsc-users mailing list