How to install Hedge from Git

You're looking at the generic instructions for installing hedge. You may be able to save a fair bit of work by using these distribution- or machine-specific instructions:

This tutorial will walk you through the process of building hedge. To follow, you need:

Don't forget that this is a Wiki. If something in here doesn't work for you, either say so on the discussion page linked in the header, or, even better, improve this document if you can. Thanks! (You don't even need to create an account.)

Hedge can take advantage of some extra packages:

To build, follow the instructions below: (Note that bold face indicates the directory for each command.)

  1. Install Boost C++ (version 1.35 or newer)

  2. Place this text in $HOME/.aksetup-defaults.py:

    BOOST_INC_DIR = ['${HOME}/pool/include/boost-1_38/']
    BOOST_LIB_DIR = ['${HOME}/pool/lib']
    USE_SHIPPED_BOOST = False
  3. Follow the instructions on Repo using the manifest hedge.xml.

Compiling with BLAS and LAPACK

{i} This is optional.

Make sure you have a usable installation of BLAS and LAPACK. Use of ATLAS for accelerated BLAS operation is highly recommended. Then add adaptations of the following lines to your $HOME/.aksetup-defaults.py:

HAVE_BLAS = True
HAVE_LAPACK = True
BLAS_LIBNAME = ['f77blas','atlas','gfortran']
LAPACK_LIBNAME = ['lapack']

# if necessary:
# BLAS_LIB_DIR = ['/some/where']
# LAPACK_LIB_DIR = ['/some/where']

Note that these modifications should be performed before the final install step. (Otherwise rebuild.) You are using Debian/Ubuntu? To install BLAS and LAPACK try:

sudo aptitude install libatlas-dev liblapack-dev

Compiling with libsilo

{i} This is optional.

Download and compile libsilo from here: https://wci.llnl.gov/codes/silo/downloads.html

  1. silo-4.7 ./configure --prefix=$HOME/pool --without-readline --without-python --without-hdf5 --disable-silex

    • If the final step above results in the error message 'couldn't find Silo.h' try rerunning this step as: ./configure --prefix=$HOME/pool --disable-silex
  2. silo-4.7 make install

  3. Add the following lines to $HOME/.aksetup-defaults.py:

     SILO_INC_DIR = ['${HOME}/pool/include']
     SILO_LIB_DIR = ['${HOME}/pool/lib']

Do this before the final build step.

Visualizing hedge's Results

Use one of

Problems and Solutions

Using the right Editor

As an ex-Windows user, I edited $HOME/.aksetup-defaults.py with openoffice. This can be a bad idea : http://www.python.org/dev/peps/pep-0263/

So it would be best to stick to Emacs, Vi/Vim, or IDLE.

/usr/bin/ld: cannot find -lgfortran

If you get the following error:

/usr/bin/ld: cannot find -lgfortran

You might try to remove gfortran from your BLAS LIBNAMES:

BLAS_LIBNAME = ['f77blas','atlas']

Getting help with problems

Please sign up for the Hedge/MailingList and ask there.