Docs:   Installation: UNIX

Required Software:

Prior to installing PETSc, the machine must have:

Optional Packages:

PETSc provides an interface to several software packages.. These should be installed before installing PETSc. These packages are not developed, maintained, or supported by the PETSc team; we merely provide an interface to them. 

Installing PETSc:

Test programs:

Fortran Users:

The PETSc Fortran libraries are built automatically during the installation outlined above. Before testing the fortran examples, please make sure that the c-version of the examples work correctly.

PETSc Fortran programs can use the suffix .F rather than the traditional suffix .f, so that the PETSc header files can be easily included in Fortran programs. See the Fortran chapter within the users manual for additional details regarding the Fortran interface. In order to use the suffix .f instead of .F, the user must edit the file ${PETSC_DIR}/include/foldinclude/petsc.h to hardwire the path for the local MPI include file. See the chapter 'PETSc Fortran Users' in the users manual for more information.

Multiple Installations:

When building PETSc for two or more machine types that share a common filesystem, for example sun4 and hpux, multiple PETSc directory trees are NOT needed. Only a single PETSc directory can (and should) be used; PETSc automatically places the libraries for each machine in a different location. In particular, the libraries for a given BOPT and PETSC_ARCH are installed in the directory, ${PETSC_DIR}/lib/lib${BOPT}/${PETSC_ARCH}.

Shared Libraries:

PETSc supports the use of shared libraries for the machines  solaris, alpha, IRIX, IRIX64, freebsd, and linux to enable faster linking and smaller executables.  These libraries are built automatically during installation. In addition, PETSc now defaults to using these libraries as dynamic libraries on these machines. For most users this does not matter. 

Machines without Fortran compiler:

On machines that do not have a fortran compiler, like BeOS, MacOS-X, please download and install f2c version of blas and lapack - f2cblaslapack.tar.gz.