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
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 PETSc's source distribution:
Browser download:
ftp://ftp.mcs.anl.gov/pub/petsc/software_old/v2.1.6.petsc.tar.gz
Unpack:
tar -x -z -f v2.1.6.petsc.tar.gz
creates the directory
petsc- where
x.x.xx.x.x is the PETSc version.
Follow the steps below to build PETSc. See the PETSc installation home page for complete installation instructions.
Change the working directory to the petsc directory:
cdpath_to/petsc-x.x.x
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`
Choose system type and optimization level:
make PETSC_ARCH=macx BOPT=O_c++
Configure PETSc:
./config/configure.py --with-mpi=0
Build PETSc:
make all make test
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-petscSpecifies the path to the PETSc directory.
--with-atlas=path-to-atlas-libsSpecifies the path to the ATLAS libraries. Not needed if using a vendor supplied library.
--with-lapack=path-to-lapack-libsSpecifies 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
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.