PETSc

PETSc, the Portable Extensible Toolkit for Scientific Computation, is a suite of data structures and routines for the uni- and parallel processor solution of large-scale scientific application problems modeled by partial differential equations. PETSc employs the MPI standard for all message-passing communication. The code is written in a data-structure-neutral manner to enable easy reuse and flexibility.

PETSc integrates a hierarchy of components, enabling the user to employ the level of abstraction that is most natural for a particular problem. Some of the components are:

  • Mat - a suite of data structures and code for the manipulation of parallel sparse matrices;
  • PC - a collection of preconditioners;
  • KSP - data-structure-neutral implementations of many popular Krylov space iterative methods;
  • SLES - a higher-level interface for the solution of large-scale linear systems;
  • SNES - data-structure-neutral implementations of Newton-like methods for nonlinear systems.

Installed on bigben.

Usage instructions

  • Prepare a batch job containing commands to do the following:
    1. Load the Petsc module with
      module load petsc
      which defines the necessary environment variables. Note that you can determine the default version of PETSc by typing:
      module show petsc
    2. Compile your program. Use the appropriate version of PETSc:
        -O, Optimized for Fortran or C
        -g, Debug version for Fortran or C
        -O_c++, Optimized for C++
        -g_c++, Debug version for C++

      For example, to use the debug version, in the C shell:
      setenv BOPT g
      or, when compiling:
      make BOPT=g prog
    3. Use pbsyod to execute the program.
      pbsyod -size $PBS_O_SIZE prog
    4. Submit the batch job with the qsub command.

    Sample job

    See the sample petsc jobs.

    Other PETSc documentation

    See also