PETSc - Portable, Extensible Toolkit for Scientific Computation

Introduction

PETSc is a toolkit to facilitate the development of parallel scientific applications involving the solution of partial differential equations. It provides such things as parallel solvers for linear and nonlinear problems, preconditioners and data strutures for the representation of sparse parallel matrices.

There are many optional add-ons to PETSc which makes it difficult to maintain in a public directory.

If you plan to use PETSc on WestGrid, please write to support@westgrid.ca to discuss whether you should maintain PETSc in your own directory or whether your requirements are sufficiently generic to use a version installed by WestGrid staff.

PETSc on Bugaboo

Type

module avail

to see a list of modules that are used to set up the environment for certain software on Bugaboo, including PETSc. To use the default version, type:

module load petsc

This defines a directory PETSC_DIR and other environment variables, but, is really only needed if you have loaded the module for another version of PETSc and want to switch back to the default.

In the past, several libraries were typically needed when building a PETSc application.  In more recent versions (such as 3.1) it appears the the process has been simplified so that only a single include file, petsc.h need be specified in the source code and you only need to link to a single library, with -lpetsc.  For example, one of the example codes can be compiled with

mpif90 -O3 -o ex2f ex2f.F -lpetsc

 PETSc examples are in /usr/local/petsc/examples, with some older tutorial files in /usr/local/petsc-3.0.0-p7/examples.

PETSc on Grex

Type

module avail

to see a list of modules that are used to set up the environment for certain software on Grex, including PETSc.

To use the default version (PETSc 3.2p5, at the time of this writing), type:

module load petsc

or you can set up the equivalent environment with:

module load petsc/3.2-p5-int32

The int32 in the module name is there to emphasize that this version was built with the 32-bit integer interface to the Intel MKL (Math Kernel Library).

Loading the petsc module defines a directory PETSC_DIR and other environment variables.  You can see the full set of environment changes with the command:

module show petsc

The installed version of PETSc 3.2-p5, was built with a number of the optional external packages including:

  • Hypre - Library of preconditioners from Lawrence Livermore National Laboratory, for help in solving large sparse linear systems.
  • MUMPS - MUltifrontal Massively Parallel sparse direct Solver.
  • ParMETIS - Parallel graph partitioning library.
  • SPOOLES - SParse Object Oriented Linear Equations Solver (sparse and complex systems).
  • SuperLU_Dist - Distributed memory version of the SuperLU library for direction solution of large, sparse, nonsymmetric systems.

 


 Updated 2012-01-16.