PETSc 2.0 Users Manual
Satish Balay, William Gropp, Lois Curfman McInnes, and Barry Smith
Mathematics and Computer Science Division
Argonne National Laboratory
http://www.mcs.anl.gov/petsc
ANL-95/11 - Revision 2.0.24, April 6, 1999
(This manual is intended for use with PETSc 2.0.24.)
Abstract:
This manual describes the use of PETSc 2.0 for the numerical solution
of partial differential equations and related problems
on high-performance computers. The
Portable, Extensible Toolkit for Scientific Computation (PETSc) is a
suite of data structures and routines that provide the building
blocks for the implementation of large-scale application codes on parallel
(and serial) computers. PETSc 2.0 uses the MPI standard for all
message-passing communication.
PETSc includes an expanding suite of parallel linear and nonlinear
equation solvers and unconstrained minimization modules that may be
used in application codes written in Fortran, C, and C++. PETSc
provides many of the mechanisms needed within parallel application
codes, such as parallel matrix and vector assembly routines. The library is
organized hierarchically, enabling users to employ the level of
abstraction that is most appropriate for a particular problem. By
using techniques of object-oriented programming, PETSc provides
enormous flexibility for users.
PETSc is a sophisticated set of software tools; as such, for some
users it initially has a much steeper learning curve than a
simple subroutine library. In particular, for individuals without some
computer science background or experience programming in C,
Pascal, or C++, it may require a significant amount of time to take full
advantage of the features that enable efficient software use.
However, the power of the PETSc design and
the algorithms it incorporates make the efficient implementation of
many application codes much simpler than ``rolling them'' yourself.
For many simple (or even relatively complicated) tasks a package such as
Matlab is often the best tool; PETSc is not intended for the classes
of problems for which effective Matlab code can be written.
Since PETSc is still under development, small changes in usage and
calling sequences of routines may occur. PETSc is supported; see the
readme.html in the PETSc distribution directory or the web site
http://www.mcs.anl.gov/petsc for information on contacting support.
Getting Information on PETSc:
On-line:
Manual pages on all routines including example usage
docs/manualpages/index.html in the distribution or
http://www.mcs.anl.gov/petsc/docs/manualpages/index.html
Troubleshooting
docs/troubleshooting.html in the distribution or
http://www.mcs.anl.gov/petsc/docs/troubleshooting.html
In this manual:
Basic introduction: Getting Started
Assembling vectors and matrices: Vectors
and Matrices
Linear solvers: SLES: Linear Equations Solvers
Nonlinear solvers: SNES: Nonlinear Solvers and Unconstrained Minimization
Timestepping (ODE) solvers: TS: Scalable ODE Solvers
Index: Index
.
Acknowledgments:
We especially thank Victor Eijkhout, David Keyes, and Matthew Knepley for their valuable
comments on the
source code, functionality, and documentation for PETSc 2.0.
In addition, we thank all PETSc users for
their many suggestions, bug reports, and encouragement.
Some of the source code and utilities in PETSc (or software used by PETSc)
have been written by
- Mark Adams, 1996-98 (scalability features of MPIBAIJ matrices),
- Cameron Cooper, Fall 1995 (portions of the VecScatter routines),
- Victor Eijkhout, Summer 1998 (KSP type BICG and the VecPipeline() routines),
- Matt Hille, Summer 1995 (PetscView and PetscOpts),
- Matthew Knepley, Summer 1997 (too much to mention),
- Peter Mell, Summer 1995 (portions of the DA routines),
- Wing-Lok Wan, Summer 1995 (the ILU portion of BlockSolve95), and
- Liyang Xu, Summer 1997 (the interface to PVODE)
while visiting Argonne National Laboratory or working with us.
PETSc uses routines from
- BLAS
- LAPACK
- LINPACK (matrix factorization and solve; converted to C using f2c and then
hand-optimized for small matrix sizes, for block matrix data structures),
- MINPACK (sequential matrix coloring routines for finite difference Jacobian
evaluations; converted to C using f2c),
- SPARSPAK (matrix reordering routines, converted to C using f2c),
to provide a small subset of its low-level functionality.
PETSc interfaces to the following external software:
- BlockSolve95 (for parallel ICC(0) and ILU(0) preconditioning)
- ESSL (IBM's math library for fast sparse direct LU factorization)
- Matlab (through a socket interface for graphics and numerical post processing
of data)
- ParMeTiS (parallel graph partitioner)
- PVODE (parallel ODE integrator)
- SPAI (for parallel sparse approximate inverse preconditiong)
These are all optional packages and do not need to be installed to use PETSc.
Contents