PETSc

 

Developers Site


 

 These pages are for people interested in using the development copy of PETSc (called petsc-dev) or contributing to the PETSc libraries. It 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:


Browsing Source:

One can browse the development repositories at the following location

Obtaining the development version of PETSc:

You have two options
  1.  download and install mercurial
  2.  access the nightly tarball snapshot at ftp://info.mcs.anl.gov/pub/petsc/petsc-dev.tar.gz
  Both methods above create a local directory with the name petsc-dev.

1) To use mercurial - first install the software
  • Linux 
    • Debian and Ubuntu
        apt-get install mercurial
    • Fedora
        yum install mercurial
    • Gentoo
        emerge mercurial
    • SuSE
      <unknown>
  • MacOS: Prebuilt binaries are available. For eg: Mercurial 0.9.5 for OS X 10.5
  • Windows: Prebuilt binaries are available. For ex: mercurial-0.9.5.exe
  • From source - on Linux this requires that python be built with zlib and include the python C include files. You may need to ask your sysadmin to install python-devel, zlib-devel [or equivalnet] packages before building Mercurial.
  Once Mercurial is installed obtain petsc-dev with the following:
  • hg clone http://petsc.cs.iit.edu/petsc/petsc-dev
  • cd petsc-dev/config
  • hg clone http://petsc.cs.iit.edu/petsc/BuildSystem BuildSystem
To update your copy of petsc-dev
  • cd petsc-dev
  • hg pull -u
  • cd config/BuildSystem
  • hg pull -u
The Mercurial download always has the latest version of petsc-dev.

For additional help use
  • hg help  [or]
  • man hg
2) The nightly tarball will be equivalent to the release tarball - with all the doumentation built. To use the tarball snapshot, simply download ftp://info.mcs.anl.gov/pub/petsc/petsc-dev.tar.gz and extract it.
  • gunzip -c petsc-dev.tar.gz | tar xf  -
To update your copy of petsc-dev simply get a new copy of the tar file. The tar file at the ftp site is updated once each night with the latest changes to petsc-dev

Compiling and using the development copy (petsc-dev):

Use config/configure.py to install PETSc, (trouble, please contact us petsc-maint@mcs.anl.gov). And subscribe to petsc mailing lists.


Building documentation:

The documentation tools (except for pdflatex) are automatically downloaded and installed by config/configure.py. However, as a failsafe, we provide them here as well.

The following additional tools are required to build the PETSc documentation:

  • Sowing:  A text processing tools developed by Bill Gropp

  • C2html: A text processing package required to generate the PETSc documentation.

  • A version of pdflatex (for example in teTeX):This package might already be installed on most systems. It is required to generate the users manual (part of the PETSc documentation)

   Once pdflatex (from teTeX) is in your PATH you can build the documentation with:

  • make alldoc LOC=${PETSC_DIR}

Sending patches to update the master copy of petsc-dev:

One can send us changes to PETSc [perhaps bug fixes or new feature additions] via e-mail. One easy way to do this [if no new files get created] is:

  • [get the latest version of petsc-dev using mercurial as descrbed above]
  • [make edits]
  • hg diff > patchfile
  • [email patchfile to petsc-maint@mcs.anl.gov]
To undo the changes, one can do 'hg revert' so that subsequent 'hg pull' or 'make pull' will continue to work.

Alternatively - one can send us patches using 'hg bundle' as described at http://www.selenic.com/mercurial/wiki/index.cgi/CommunicatingChanges

Once you have developed experience with developing PETSc source code you can become an active member of our development and push changes directly to the petsc-dev repository. Send mail to petsc-maint@mcs.anl.gov to arrange it.