Portable, Extensible Toolkit for Scientific Computation

Installation Instructions for PETSc 2.0

http://www.mcs.anl.gov/petsc/


Welcome to PETSc 2.0. Please let us know of any difficulties in installing and using the software. See the file docs/bugreporting.html   for information on reporting bugs and installation problems. Installing PETSc can be the hardest part of using the software, since each machine's configuration is slightly different. If problems crop up, first, consult

the troubleshooting.html guide and
http://www.mcs.anl.gov/petsc/petsc-patches.html

through which most users can solve their problems. We are always willing to assist with an installation if a problem remains unresolved. If installing PETSc has taken more than a few hours and you've gone through the troubleshooting.html guide, please refer to bugreporting.html. We will help everyone with installation problems on any of the machines listed below.

This release has been tested on

On variants of the OS on the above machines, a little tweaking may be necessary. This information is usually present in the files petsc/bmake/${PETSC_ARCH}/base. (changes in compiler options, libraries supplied by the OS), or in any source files that fail to compile, or in the PETSc bug fixes file, http://www.mcs.anl.gov/petsc/petsc-patches.html

Separate installation instructions are below for UNIX and Window plaftorms.


Installation under UNIX

PETSc 2.0 requires a MINIMUM of 25 megabytes of disk space to install for a single operating system. The UNIX command "df" can be used to determine the amount of available disk space. See the PETSc FAQ for tips on reducing required space.

PETSc MUST be compiled with an ANSI C compiler (or C++ compiler). Many older Sun workstations have the Sun-bundled C compiler, which is NOT ANSI C and cannot be used. The Gnu compiler gcc can often be used as a replacement for systems that do not have a native ANSI C compiler.

Required Software:

Prior to installing PETSc 2.0, the machine must have:

Optional Packages:

PETSc provides an interface to several software packages.. These packages are not developed, maintained, or supported by the PETSc team! We merely provide an interface to them. To use any of these optional packages, obtain the following prior to installing PETSc:

Installing PETSc:

Test programs:

Fortran Users:

The PETSc Fortran libraries are built automatically during the installation outlined above..

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 sun4, solaris, alpha, IRIX, IRIX64, and linux to enable faster linking and smaller executables.  These libraries are built automatically during installation.


Installation under Windows 95/NT

We currently provide instructions for installing PETSc under Windows 95/NT using Microsoft Visual C++ 5.0 compilers, for uniprocessor use. Once a more stable MPI is available we will provide instructions for parallel use. See http://www.mcs.anl.gov/petsc/petsc-patches.html and troubleshooting.html for help with problems. Currently complex version of PETSc libraries cannot be built.under Windows 95/NT.

Installing PETSc:

Running Examples from a Shell:

Running Examples from Microsoft Visual Studio: (using a Project)

Two project files, one for C libraries, and the other for the C++ libraries, are provided with the PETSc distribution.They are located in c:\petsc-2.0.22\projects\[c,c++]\sles\ex2 directory. To build and run the example file using the project provided:

To Create a project for your files

Program Arguments: can be set in Developer Studio from the Menu Project -> settings ->Debug -> program arguments.

Currently we only provide project examples using console applications; developing a windows application requires creating a new project.

Fortran Users:

If you have the Digitial Visual Fortran compiler (with the latest patches) you can compile PETSc Fortran code

Running Fortran examples from Developer Studio:

Currently this is not possible, as we need to use the build targes provided in the PETSc base files.

Rebuilding Libraries

The Windows version of PETSc comes with the C and C++ version libraries pre-built. If, for some reason you need to rebuild the libraries, you can do the following:

Using Microsoft Visual C/C++ Compiler from the Command Line:

If the commands nmake and vc do not work from the DOS command line, but you do have Microsoft Developer Studio installed, you can either

Installing PETSc Using gcc/g77:

PETSc can be installed on Windows NT/95 using gnu-win32  tools from  Cygnus Solutions, (which contains bash and make) and EGCS version of gcc, g++, g77 compilers. Currently we use gnu-win32 version beta-19 and EGCS compilers for gnu-win32 beta 19.