Required Software:
Prior to installing PETSc, the machine must have:
For users who are interested ONLY in running PETSc sequentially, we have included a stripped-down version of MPI that allows PETSc to be compiled without installing an external version of MPI. This setup allows the user to run ONLY uniprocessor PETSc programs, not parallel ones.
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:
Note: If installing ONLY a
uniprocessor version of PETSc, then installation of an MPI implementation is not required.
Instead, the following MPI locations can be used in the ${PETSC_DIR}/bmake/${PETSC_ARCH}/packages file:
MPI_LIB =
${PETSC_DIR}/lib/lib${BOPT}/${PETSC_ARCH}/libmpiuni.a
MPI_INCLUDE = -I${PETSC_DIR}/src/sys/src/mpiuni
MPIRUN = ${PETSC_DIR}/src/sys/src/mpiuni/mpirun
- Solaris using the GNU compilers: use PETSC_ARCH=solaris_gnu
- IBM rs6000 using the GNU compilers: use PETSC_ARCH=rs6000_gnu
- CRAY t3d: make sure the enviornmental variable TARGET is set to cray-t3d
On HP-UX machines we highly recommend using Gnu make (which can be installed if not already available) rather than the native make. To switch to using gnumake in the PETSc makefiles, define OMAKE to be the path of gnumake in the file ${PETSC_DIR}/bmake/hpux/base.
Installing PETSc using configure:
Please check our updated instructions on using confiugre with PETSc.
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