Prerequisites
-
Install openmpi. See this page for more info.
- – Note: on the mac, you can’t use the prebuilt openmpi binaries because they do not include fortran support; you’ll need to install from source
Compilation
-
Download PETSc 3.0 from here
- Extract archive (tar -xzvf petsc…)
export PETSC_DIR=$PWD ./config/configure.py --with-petsc4py=1 --download-petsc4py=yes --prefix=/usr/local --with-shared --with-superul_dist=1 --download-superlu_dist=yes --with-parmetis=1 --download-parmetis=yes --with-superlu=1 --download-superlu=yes PETSC_ARCH=linux-gnu-c-debug; export PETSC_ARCH #PETSC_ARCH=darwin9.7.0-c-debug; export PETSC_ARCH #on the mac make all make test
Installation
-
sudo su export PETSC_DIR=$PWD PETSC_ARCH=linux-gnu-c-debug; export PETSC_ARCH make install
Post Install
- Add the following to ~/.bashrc
PETSC_DIR=/usr/local; export PETSC_DIR PETSC_ARCH=linux-gnu-c-debug; export PETSC_ARCH