These pages are for people interested in using the development copy of PETSc (called petsc-dev) or contributing to the PETSc libraries. This information is intended only for people who are experienced with building, using, and debugging PETSc. If you cannot use makefiles, a debugger, and EMACS etags, then please don't access these pages.
Consider joining petsc-dev mailing-list.How to:
- browse sources in the repository
- obtain petsc-dev (the development version)
- compile petsc-dev
- build documentation for petsc-dev
- contributing code to PETSc
- check nightlybuild logs
- add a new PC type
- add a new KSP type
- add a new subclass of a matrix type (implementation inheritence)
Browsing source:
One can browse the development repositories at the following locationObtaining the development version of PETSc:
You have three options:- download and install via Git (recommended)
- access tarballs directly from 'master' branch.
- access the nightly tarball snapshot at http://ftp.mcs.anl.gov/pub/petsc/petsc-dev.tar.gz
1. Using Git
Install Git if it is not already installed on your machine. Once Git is installed obtain petsc-dev with the following:git clone https://bitbucket.org/petsc/petsc
cd petsc
git pull
./$PETSC_ARCH/conf/reconfigure-$PETSC_ARCH.py
make
- git help [or]
- man git
- [developer instructions at our wiki]
- [Pro Git book]
2. Tarball of 'master'
One can obtain the current petsc-dev repositories as
tarball from the git server using the following URL:
Note 1:
This mode is useful if you are on a machine where you cannot install Git or if it has a firewall blocking http downloads.
After the tarballs is obtained - do the following:tar zxf petsc-petsc-CHANGESET.tar.gz
mv petsc-petsc-CHANGESET petsc-dev
To update this copy of petsc-dev, re-download the above tarball. The URL above gets the latest changes immediately when they are pushed to the repository.
3. Nightly tarball
The nightly tarball will be equivalent to the release
tarball - with all the doumentation built. To use the nightly tarball
snapshot, simply download
http://ftp.mcs.anl.gov/pub/petsc/petsc-dev.tar.gz
and extract it.
tar zxf petsc-dev.tar.gz
Compiling and using the development copy (petsc-dev):
Use ./configure to install PETSc. If you have problems, please use the petsc-dev mailing list).
Building documentation:
The documentation tools listed below (except for pdflatex) are automatically downloaded and installed by ./configure.
- Sowing: a text processing tool developed by Bill Gropp. This produces the PETSc manual pages see sowing documentation
- C2html: A text processing package. This generates the HTML versions of all the source code.
- A version of pdflatex (for example in TeX Live): This package might already be installed on most systems. It is required to generate the users manual (part of the PETSc documentation).
Once pdflatex (e.g., from TeX Live) is in your PATH, you can build the documentation with:
make alldoc LOC=${PETSC_DIR}
Contributing code to PETSc:
See https://bitbucket.org/petsc/petsc/wiki/Home for how to contribute code to PETSc.Developer guide:
The developer guide gives an overview of the design and detailed style specifications.Nightly builds:
The logs for the nightly builds at
PETSc developers can automatically log into any PETSc test directory with ${PETSC_DIR}/bin/maint/petscgoto arch-of-test-system
The coverage(what lines of source code are tested in the nightly builds) can be found at http:/www.mcs.anl.gov/petsc/petsc-dev/index_gcov1.html