Introduction to PETSc

4/30/99


Click here to start


Table of Contents

Introduction to PETSc

Philosophy

PETSc Concepts As illustrated via a complete nonlinear PDE example: flow in a driven cavity

Tutorial Approach

Incremental Application Improvement

Component Interactions for Numerical PDEs

CFD on an Unstructured Grid

Scalability for Fixed-Size Problem

Scalability Study

Multiphase Flow

PC and SP Comparison

Speedup Comparison

The PETSc Programming Model

PDE Application Codes

PETSc Numerical Components

Mesh Definitions: For Our Purposes

A Freely Available and Supported Research Code

True Portability

PETSc History

A Complete Example: Driven Cavity Model

Driven Cavity Solution Approach

Driven Cavity Program

Collectivity

Vectors

Sparse Matrices

Parallel Matrix and Vector Assembly

Matrix Assembly

Blocked Sparse Matrices

Solvers: Usage Concepts

Nonlinear Solvers (SNES)

Context Variables

Creating the SNES Context

Basic Nonlinear Solver Code (C/C++)

Basic Nonlinear Solver Code (Fortran)

Solvers Based on Callbacks

Sample Application Context: Driven Cavity Problem

Sample Function Evaluation Code: Driven Cavity Problem

Sample Local Computational Loops: Driven Cavity Problem

Customization Options

Setting Solver Options within Code

Uniform access to all linear and nonlinear solvers

Runtime Script Example

Customization via Callbacks: Setting a user-defined line search routine

SNES: Review of Basic Usage

SNES: Review of Selected Options

SNES: Example Programs

Data Layout and Ghost Values : Usage Concepts

Ghost Values

Communication and Physical Discretization

Global and Local Representations

Distributed Arrays

Logically Regular Meshes

Vectors and DAs

Updating the Local Representation

Profiling

Driven Cavity: Running the program (1)

Driven Cavity: Running the program (2)

Sample Error Traceback

Sample Memory Corruption Error

Sample Out-of-Memory Error

Sample Floating Point Error

Summary

Extensibility Issues

Caveats Revisited

Where is PETSc headed next?

References

PETSc at NERSC

Author: Thomas M. DeBoni

Email: TMDeBoni@LBL.GOV

Download presentation source