Skip to content
Snippets Groups Projects
Forked from SCS / docs.it4i.cz
1530 commits behind, 913 commits ahead of the upstream repository.

PETSc

PETSc is a suite of building blocks for the scalable solution of scientific and engineering applications modeled by partial differential equations. It supports MPI, shared memory, and GPU through CUDA or OpenCL, as well as hybrid MPI-shared memory or MPI-GPU parallelism.

Introduction

PETSc (Portable, Extensible Toolkit for Scientific Computation) is a suite of building blocks (data structures and routines) for the scalable solution of scientific and engineering applications modelled by partial differential equations. It allows thinking in terms of high-level objects (matrices) instead of low-level objects (raw arrays). Written in C language but can also be called from FORTRAN, C++, Python and Java codes. It supports MPI, shared memory, and GPUs through CUDA or OpenCL, as well as hybrid MPI-shared memory or MPI-GPU parallelism.

Resources

Modules

You can start using PETSc on Anselm by loading the PETSc module. Module names obey this pattern:

    # module load petsc/version-compiler-mpi-blas-variant, e.g.
      module load petsc/3.4.4-icc-impi-mkl-opt

where variant is replaced by one of {dbg, opt, threads-dbg, threads-opt}. The opt variant is compiled without debugging information (no -g option) and with aggressive compiler optimizations (-O3 -xAVX). This variant is suitable for performance measurements and production runs. In all other cases use the debug (dbg) variant, because it contains debugging information, performs validations and self-checks, and provides a clear stack trace and message in case of an error. The other two variants threads-dbg and threads-opt are dbg and opt, respectively, built with OpenMP and pthreads threading support.

External libraries

PETSc needs at least MPI, BLAS and LAPACK. These dependencies are currently satisfied with Intel MPI and Intel MKL in Anselm petsc modules.

PETSc can be linked with a plethora of external numerical libraries, extending PETSc functionality, e.g. direct linear system solvers, preconditioners or partitioners. See below a list of libraries currently included in Anselm petsc modules.

All these libraries can be used also alone, without PETSc. Their static or shared program libraries are available in $PETSC_DIR/$PETSC_ARCH/lib and header files in $PETSC_DIR/$PETSC_ARCH/include. PETSC_DIR and PETSC_ARCH are environment variables pointing to a specific PETSc instance based on the petsc module loaded.

Libraries linked to PETSc on Anselm (as of 11 April 2015)