A. External Thirdparty Installation Instructions

PETSc Installation

Introduction

The Portable, Extensible, Toolkit for Scientific Computation (PETSc) is a library of data structures and functions for the parallel solution of partial differential equations.

When PETSc libraries are installed, and SCIRun is configured to use them, SCIRun's SolveMatrix module enables the use of PETSc solvers.

The installation of PETSc is optional. SolveMatrix provides built-in solvers if PETSc is not available.

PETSc is built and installed from its source code distribution. SCIRun supports PETSc versions 2.1.5 and 2.1.6. These are older versions of PETSc and are available via a web browser from the following site:

ftp://ftp.mcs.anl.gov/pub/petsc/software_old
      

Note

  • SCIRun supports only the uniprocessor build of PETSc. SCIRun assumes a shared memory architecture, while multi-processor PETSc assumes a distributed memory architecture.

  • PETSc must be installed before installing SCIRun. See “Build” for PETSc installation instructions.

  • SCIRun must be configured to support PETSc. See “SCIRun PETSc Configure Options” for information on configuring SCIRun to use PETSc.

Start a terminal application before proceeding. Command line tools are used to install PETSc and BLAS/LAPACK.

Download and Unpack

Download and unpack PETSc's source distribution:

  1. Browser download:

    ftp://ftp.mcs.anl.gov/pub/petsc/software_old/v2.1.6.petsc.tar.gz
    	    

  2. Unpack:

    tar -x -z -f v2.1.6.petsc.tar.gz
    	    

    creates the directory petsc-x.x.x where x.x.x is the PETSc version.

Build

Follow the steps below to build PETSc. See the PETSc installation home page for complete installation instructions.

  1. Change the working directory to the petsc directory:

    cd path_to/petsc-x.x.x
    
    	    

  2. Set PETSC_DIR environment variable. For an sh-type shell:

    PETSC_DIR=`pwd`; export PETSC_DIR      
    	    

    for a csh-type shell:

    setenv PETSC_DIR `pwd`
    	    

  3. Choose system type and optimization level:

    
    make PETSC_ARCH=macx BOPT=O_c++
    
    	    

  4. Configure PETSc:

    ./config/configure.py --with-mpi=0
    	    

  5. Build PETSc:

    make all
    make test      
    	    

SCIRun PETSc Configure Options

The configure options below add support for PETSc in SCIRun. Include these options in the SCIRun configure command (see “Building SCIRun”).

--with-unipetsc=path-to-petsc

Specifies the path to the PETSc directory.

--with-atlas=path-to-atlas-libs

Specifies the path to the ATLAS libraries. Not needed if using a vendor supplied library.

--with-lapack=path-to-lapack-libs

Specifies the path to the LAPACK libraries. Not needed if using a vendor supplied library or if the LAPACK RPM was installed.

Here is an example SCIRun configure command:

../src/configure \
--enable-package="BioPSE MatlabInterface Teem" \
--with-unipetsc=/usr/local/petsc \

--with-thirdparty=/usr/local/SCIRun/Thirdparty_osx
    

The SolveMatrix Module

When SCIRun is built with PETSc support, the SolveMatrix module allows the user choose to from one of 12 PETSc solvers.

SolveMatrix passes a copy of matrix data on its input ports to a call of PETSc's SLESSolve function. SolveMatrix charts the progress of the solution while PETSc iterates.