Skip to content

Using the new repos

Randall J. LeVeque edited this page Jul 1, 2013 · 17 revisions

This is out of date.

Instead see http://clawpack.github.io/doc/installing.html#temporary-installation-instructions-for-developers

Preliminaries

Here are some brief instructions for getting started with the new repos. For now this just refers to PyClaw and PetClaw, as well as the 'riemann' repo. Others will be added as they appear.

You will need to set several environment variables to use the code. Unfortunately, there are two ways to do this, based on whether you are using a Bourne-compatible shell such as sh, bash, or zsh; or a C-shell derivative such as csh or tcsh. If you do not know which shell you are using, you can determine this with:

echo $SHELL

Create a new directory to contain your Clawpack build

You will probably want to organize all the packages under one directory:

mkdir clawpack
cd clawpack

sh/bash/zsh:

export CLAW=`pwd`

csh/tcsh:

setenv CLAW `pwd`

Clone repositories

git clone git@github.com:clawpack/pyclaw.git
git clone git@github.com:clawpack/riemann.git
git clone git@github.com:clawpack/visclaw.git

Set repository variables


sh/bash/zsh:

export RIEMANN=$CLAW/riemann
export PYCLAW=$CLAW/pyclaw
export VISCLAW=$CLAW/visclaw

csh/tcsh:

setenv RIEMANN $CLAW/riemann
setenv PYCLAW $CLAW/pyclaw
setenv VISCLAW $CLAW/visclaw

Prepend directories containing pyclaw and riemann packages to your PYTHONPATH


sh/bash/zsh:

export PYTHONPATH=$PYCLAW/src/:$RIEMANN/src/python/:$VISCLAW/src/python/:$PYTHONPATH

csh/tcsh:

setenv PYTHONPATH "$PYCLAW/src/:$RIEMANN/src/python/:$VISCLAW/src/python/:$PYTHONPATH"

Install PETSc/petsc4py (optional)

For PetClaw, you must also have PETSc and petsc4py installed. See their websites for more information.

Verification

$ cd $PYCLAW
$ nosetests

If any tests fail please report them to the developers immediately!