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. More details on installing for optional packages.

Installing PETSc:

Installing PETSc using configure:

Please check our updated instructions on using confiugre with 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 should use the suffix .F rather than the traditional suffix .f, so that the PETSc header files can be easily included in Fortran programs, and processed by a c-preprocessor. See the Fortran chapter within the users manual for additional details regarding the Fortran interface.

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.

Special Blas and Lapack.

Some machines have special blas and lapack.  These have some missing symbols missing or define prototypes for certain functions differently.

When using ESSL on AIX machines, you might want to use the following additional flag in 'packages file'

BLASLAPACK_LIB = -lessl
PETSC_BLASLAPACK_FLAGS = -DPETSC_BLASLAPACK_ESSL_ONLY
PETSC_HAVE_ESSL = -DPETSC_HAVE_ESSL
 

When using cray T3E use:

BLASLAPACK_LIB =
PETSC_BLASLAPACK_FLAGS = -DPETSC_BLASLAPACK_CRAY_ONLY