Differences between revisions 106 and 107
Revision 106 as of 2013-06-25 23:53:47
Size: 4431
Revision 107 as of 2015-02-10 17:11:58
Size: 4523
Deletions are marked like this. Additions are marked like this.
Line 4: Line 4:

{{{#!wiki note

This process has been mostly superseded by DevEnvironmentHowto.


How to install Hedge from Git

This process has been mostly superseded by DevEnvironmentHowto.

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:

  • A UNIX-like machine with web access.
  • A C++ compiler, a version 4.x gcc is preferred. (Debian/Ubuntu package g++. The installation has been tested with gcc 4.3 and newer.)

  • A working Python installation, Version 2.4 or newer, with development headers (Debian/Ubuntu package python-dev or newer. Python 3 is only supported by some packages for now, but definitely in the cards for the future.)

  • A version of Numpy. (Debian/Ubuntu package python-numpy)

  • The git Version control system. (Debian/Ubuntu package git)

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']
  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:

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.

Hedge/HowTo/InstallingFromGit (last edited 2015-02-10 17:11:58 by AndreasKloeckner)