Logo: lash (lambda hash)
 
  Main  
 

Building a GHC with Eden support

Prerequisites

To build GHC with Eden support, you need:
  • a working GCC
  • the archive of the download page (gzipped, extract with tar xzf or download source via darcs)
  • a working GHC, preferably versions 6.8, 6.10 or 6.12. If not yet available, install GHC via your standard package manager or use a binary package (GHC is needed to build GHC).
  • other tools you need to build GHC 6.12.3 (autoconf, libtool, happy, alex, libncurses5-dev, patch, ...)
  • To compile and run Eden programs in parallel, you need MPI and/or PVM
    • MPI: Eden should work with any MPI distribution. We tested it with Open MPI
    • PVM: If you want to use PVM, you need to set the environment variable PVM_ROOT (in the file ~/.bashrc if you use the bash, or a similar file if you use another shell) BEFORE you build the Eden compiler and to run Eden programs:
      export PVM_ROOT=<PATH> #(<PATH> being the location of the pvm binaries (bin) and libraries (lib) -- this is e.g. "/usr/lib/pvm3" for an ubuntu system)
      export PVM_RSH=`which ssh`
      export PVM_ARCH=`$PVM_ROOT/lib/pvmgetarch`
    MPI and/or PVM must be installed and correctly configured prior to building Eden. Otherwise it will only be possible to use an sequential simulation of the Eden features.

Quick way for ubuntu 10.04 or ubuntu 10.10:

You can use the following command to install all dependencies and set PVM_ROOT:
#> sudo apt-get install libopenmpi-dev openmpi-bin pvm-dev ghc darcs autoconf libtool happy alex libncurses5-dev patch xutils-dev && echo >> ~/.bashrc && echo 'export PVM_ROOT=/usr/lib/pvm3' >> ~/.bashrc && echo 'export PVM_RSH=`which ssh`' >> ~/.bashrc && echo 'export PVM_ARCH=pvmgetarch' >> ~/.bashrc && source ~/.bashrc

Building instructions

(Note that building Eden is almost the same as building GHC without it. Please have a look at the GHC documentation on building GHC first!)
  • You can create another directory for the build (opposed to your source trees up to now) and link it to the sources.
    #>mkdir mybuild
    #>cd mybuild
    #>lndir <path_to_ghc> .
    #>
  • Suppose you have created this build tree "mybuild", navigate to"mybuild", else navigate to the folder you've downloaded Eden.
  • You can change build settings in the file 'mk/build.mk' (optional).
    • Open 'mk/build.mk.sample' with your preferred text editor. The first lines will hold build profiles, each consisting of a descriptive line and a line holding the corresponding command (the lines beginning with "#BuildFlavour").
    • Uncomment (i.e. remove the leading "#") the line holding the command for your profile of choice.
    • Save as 'mk/build.mk'.
  • Now execute:
    • #>chmod u+x boot
    • #>./boot
    • #>./configure
      • with typical options:
        • --prefix==<installation_path>
        • --with-gcc=<path_to_custom_gcc>
      • the configure script will show you in the summary if it detected support for MPI or PVM, check that you have installed the header and binary files if MPI/PVM was not detected.
    • #>make
      • with typical option -j<i> to build with i parallel threads
    • #>make install
      • you can use the inplace compiler also without installation. It is available in the path inplace/bin/ghc-stage2.
  • Use 'make maintainer-clean' if you want to make a new build with different settings.
 
 
Philipps-Universität Marburg

Eden - Parallel Functional Programming. E-Mail
Fb. 12 - Mathematik und Informatik, Hans-Meerwein-Straße, D-35032 Marburg

This page: http://www.mathematik.uni-marburg.de/~eden

Last change: 14/06/12