wiki:InstallGuides/NonRootDeveloper

Installing Chaste without root permissions

I'm trying to install all the necessary items without having root permissions on the machine in question. It's going well so far, so I thought I'd better document what I've done before I forget it...

Note that my machine has a local build of gcc version 4.1.1, so this may introduce some differences for you.

Note also that these instructions assume you are using the bash shell. If your prompt ends in a dollar symbol, you're probably OK.

Top Tip: whenever you add anything to the .bashrc file then also type it in to the terminal (.bashrc is run on login)

Work out where to install

There probably isn't enough space on your network filestore, and that'll be a bit slow anyway, so much better if you can install everything on the local disk. I have a folder /home/scratch/jonc that I can write to, so I'm installing everything in there. Alter paths to suit your circumstances:

export base="/home/scratch/jonc"

Install Boost

Download version 1.33.1 from http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041

Unpack somewhere sensible, configure, and install:

cd boost-1.34.0
./configure --prefix=$base --with-libraries=serialization
make install

Install XSD

I cheat for this by copying XSD itself from one of the Chaste machines. Installing Xerces is rather more complicated!

scp -r chaste@userpc44.comlab.ox.ac.uk:xsd-2.3.1-i686-linux-gnu/ $base/

cd $base/src
wget http://www.apache.org/dist/xerces/c/2/sources/xerces-c-src_2_8_0.tar.gz
tar -zxf xerces-c-src_2_8_0.tar.gz
export XERCESCROOT=$base/src/xerces-c-src_2_8_0
cd $XERCESCROOT/src/xercesc/
./runConfigure -plinux -cgcc -xg++ -P$base
gmake
gmake install

Install scons

Download the latest stable tarball from http://www.scons.org

Extract and cd into the folder. Run

python setup.py install --prefix=$base

You'll need to add $base/bin to your PATH. Perhaps add the following to your ~/.bashrc

export PATH=$base/bin:$PATH

At some point you'll need to add the folder $base/lib to LD_LIBRARY_PATH, so may as well add that to your ~/.bashrc now too:

export LD_LIBRARY_PATH=$base/lib

Install Java

Install J2SE (Update 6 at time of writing) from http://java.sun.com/j2se/1.5.0/download.jsp

Make sure to choose the "Linux self-extracting file" version.

Run the downloaded executable from within $base.

Now add the following to your ~/.bashrc

export PATH=$base/jdk1.6.0_10/bin:$PATH
export JAVA_HOME=$base/jdk1.6.0_10

Install Subversion and JavaHL

JavaHL is used by subclipse, the Eclipse interface to subversion. It seems to be more reliable than the pure Java interface.

Download and unpack the latest subversion (1.3 when this was written) from http://subversion.tigris.org/

cd subversion-1.3.0
./configure --with-ssl --enable-javahl --disable-mod-activation --prefix=$base
make
make install

During this process svn might request the install of apr and apr-utils, it gives you instructions on how to get them (using svn - pretty nifty) and gives instructions on how to carry on with the install.

Install Eclipse

Download the latest stable version from http://www.eclipse.org/ and unpack it in $base. I used 3.1.2.

You may want to add $base/eclipse to your PATH as well.

To clear cached subversion credentials when starting eclipse, try the following:

cd $base
mv eclipse/eclipse eclipse/eclipse.exec

Then create a file $base/eclipse/eclipse with the contents:

#!/bin/bash

/bin/rm -f ~/.subversion/auth/svn.simple/*
/bin/rm -f $base/eclipse/configuration/org.eclipse.core.runtime/.keyring
exec $base/eclipse/eclipse.exec

And make it executable:

chmod a+x eclipse/eclipse

Run eclipse and when prompted, set your workspace to $base/eclipse/workspace

Install Eclipse Plugins

Run eclipse and go to Help -> Software Updates -> Find and Install. Select "Search for new features to install". Click on "New Remote Site" a few times to add the following:

  • CDT: http://download.eclipse.org/tools/cdt/releases/eclipse3.1
  • subclipse: http://subclipse.tigris.org/update_1.0.x
  • (optional) PyDev: http://pydev.sf.net/updates/

Then click Finish to search for updates. You probably want to install the latest versions of everything found under those sites.

Set Editor preferences

Go to Window->Preferences->C/C++->Editor and under the Appearance tab select "Insert spaces for tabs".

Set Pydev preferences

Go to Window->Preferences and expand the Pydev section. You'll want to change at least the 'Interpreter - Python' subsection to add a new interpreter /usr/bin/python.

Install Valgrind

Download the latest stable tarball (3.1.0 at time of writing) from http://valgrind.org/downloads/

Unpack and cd into the resulting directory. Then run

./configure --prefix=$base
make
make install

Install PETSc and MPI

Download MPICH from ftp://ftp.mcs.anl.gov/pub/mpi/mpich.tar.gz , unpack and do

cd mpich-1.2.7p1
./configure --prefix=$base -with-comm=shared --with-device=ch_shmem --enable-sharedlib --disable-f77
make
cd examples/test/
make testing
cd ../..
make install
# You may now remove the mpich-1.2.7p1 folder if you wish.

PETSc 2.3.1 seems to work without the workarounds needed for 2.2.1:

wget ftp://ftp.mcs.anl.gov/pub/petsc/petsc-2.3.1.tar.gz
tar xvfz petsc-2.3.1.tar.gz
rm  petsc-2.3.1.tar.gz
cd petsc-2.3.1-p19/
export PETSC_DIR=`pwd`
./config/configure.py  --download-c-blas-lapack=1 --with-mpi-dir=$base --with-x=false  -PETSC_ARCH=linux-gnu --with-clanguage=cxx
make all
./config/configure.py  --download-c-blas-lapack=1 --with-mpi-dir=$base --with-x=false   --with-debugging=0 -PETSC_ARCH=linux-gnu-opt --with-clanguage=cxx
make all

To avoid compiler warnings (which the Chaste build turns into errors) apply the patch available from InstallPetscAndMpi:

cd $base/include/mpi2c++
patch -p3 <../../mpi.patch

Actually, I think this is redundant now, as the build is configured to ignore warnings in 'system' libraries.

Install HDF5

As InstallHdf5, but use --prefix=$base

Install CVODE

As InstallCvode, but use --prefix=$base

Install parMETIS

As InstallParMetis, but do cd $base instead of cd $HOME

ChasteGuides/AccessCodeRepository

Last modified 6 years ago Last modified on May 29, 2014, 2:59:58 PM

Attachments (1)

  • mpich-1.2.7p1.tar.gz (15.5 MB) - added by chris.arthurs@… 10 years ago. Version of mpi archive with configure script altered to prevent errors when <iostream.h> isn't there