Search


DASWG LAL Doxygen

Docs

How-To's
Technical
Software Docs
Minutes

Download

Browse CVS, Git, or SVN
Software Repositories
OS Security Updates
LIGO software virtual machine
VMware SL6 Install

Participate

SCCB - Software Change Control Board
Edit these pages
Sub-committees
Mailing List
Telecon

Projects

DMT
DQSEGDB
Glue
GraceDB
gstlal
LALSuite
LDAS Tools
LDG Client/Server
LDR
ligoDV
LIGOtools
LVAlert Administration
LVAlert
MatApps
Metaio
NDS Client
PyLAL
LSCSOFT VM

Legacy Projects

geopp
LDAS
LDM
LIGOtools
LSCGIS
Onasys
OSG-LIGO

How to install LALSuite software

Note: This documentation is deprecated, please consult the documention here for more up to date and current documentation.

Introduction

This document provides step-by-step instructions for installing LALSuite from the current Git repository.

Before using these instructions, be sure that all of the required LSC software is installed. If you are using SL6, Debian Wheezy, or Mac OS X, and have root access (or access to a sysadmin), it is recommended that you follow the instructions at Download > Repositories [ HTML ] to install the software on the system. It is also possible to build the software from source. Instructions for this can be found in the LSC Software Installation HOWTO [ HTML ] or in other formats from the DASWG howto section.

Before you start

Basic Tools

In order to have all the tools needed to build a package from the source tarballs (*.tar.gz) you must have installed in your working machine the basic set of packages that contain the compilers and libraries for your tasks.

Scientific Linux 6.1

Assuming that your working machine is SL6, these packages are defined by the YUM groups ">Development Tools" (Description: These tools include core development tools such as automake, gcc, perl, python, and debuggers) and "Development Libraries" (Description: The packages in this group are core libraries needed to develop applications). You, or the SysAdmins of your cluster, must install those packages in your working machine before anything else, by running

yum groupinstall "Development Tools" "Development Libraries"

Note: the quotes are needed, since the names contain blank spaces.

If you need to know more about the content of these YUM group packages, you can

yum groupinfo "Development Tools"
yum groupinfo "Development Libraries"
Debian

These packages are defined by the apt or aptitude meta-package "build-essential" and the packages "automake, autoconf, libtool" not included in the former group. Other package that is very useful for developers is "devscripts". These could be the minimum required for a developer, however, since Debian is a the largest Linux community, there are other useful tools that can be considered as important, as stated at Debian Developer's Reference.

These packages can be installed by using aptitude (or the older apt-get command)

aptitude install build-essential automake autoconf libtool devscripts
Mac OS X

All the required development tools are provided by Xcode, which was supplied on the original installation media that came with the Mac. This version, however, may not be the latest available version and it is recommended to use the latest version of Xcode when developing on the Mac. The latest version of Xcode can be downloaded from the Mac App Store.

Setting up your environment

Make sure that your environment variables are set appropriately. If you are building LALSuite on one of the LIGO Data Grid clusters, this should be true by default.

These instructions require a few more variables to be set to specify where you want to install LALSuite, where you want to build LALSuite, and your LIGO.ORG Kerberos principle.

If you are using a Bourne shell [bash] rather than a C-shell [tcsh], do the following:

LALSUITE_SRCDIR=${HOME}/src            # source directory: change as appropriate
LALSUITE_PREFIX=${HOME}/opt/lalsuite   # install directory: change as appropriate

But if you are using a C-shell [tcsh], do this instead:

set LALSUITE_SRCDIR=${HOME}/src            # source directory: change as appropriate
set LALSUITE_PREFIX=${HOME}/opt/lalsuite   # install directory: change as appropriate

If you are working on one of the LDG clusters, it is recommended that you put the source code into a local directory instead. For the LDAS clusters at CIT, LLO, and LHO, this requires setting

LALSUITE_SRCDIR=/usr1/${USER}/src

For Nemo at UWM,

LALSUITE_SRCDIR=/people/${USER}/src

If you are in the LIGO roster then you have an account for the LALSuite Git repository. More information about accessing, and interacting with, the LALSuite Git repository can be found in the Advanced LALSuite Git HOWTO.

Clone LALSuite Git Repository

Note: make sure that you have set the LALSUITE_SRCDIR variable as described above.

First you will need to create the directory for LALSuite Git repository

mkdir -p ${LALSUITE_SRCDIR}

Now you will need to tell Git who you are, see the Advanced LALSuite Git HOWTO for more information. You only need to do this once, from each system you access the repository from:

git config --global user.name "Albert Einstein"         # replace as appropriate
git config --global user.email albert.einstein@ligo.org # replace as appropriate

Generate a cookie:

ecp-cookie-init LIGO.ORG https://versions.ligo.org/git albert.einstein

replacing albert.einstein with your LIGO.ORG Kerberos principle. You need to tell git the location of this cookie using:

$ git config --global http.cookiefile /tmp/ecpcookie.u`id -u`

this needs to be done on each machine that you wish to access the repository from.

Now clone the LALSuite git repository with

cd ${LALSUITE_SRCDIR}
git clone https://versions.ligo.org/git/lalsuite.git

Build and install LALSuite

Note: make sure that you have set the LALSUITE_SRCDIR and LALSUITE_PREFIX variables as described above.

Now enter into the lalsuite directory and boot, configure, build, and install the LALSuite packages.

cd ${LALSUITE_SRCDIR}/lalsuite
./00boot
./configure --prefix=${LALSUITE_PREFIX}
make -j
make install

(Optionally, if you encounter unusual problems with (re)building LALSuite, you may want to try cleaning the git repository first. NOTE: this command removes all files that are not committed, so please take case in using this - if in doubt, don't use it! The command is git clean -dxfq.)

To setup your environment to use the newly-built LALSuite, you do

source ${LALSUITE_PREFIX}/etc/lalsuiterc

You can also test that it worked by doing

which lalapps_version
which should be the program installed in ${LALSUITE_PREFIX}. Also check to make sure the versions are correct by doing
lalapps_version

which should give output something like

$ lalapps_version
LAL: 6.4.1.1 (CLEAN b269002a5b6b33b31dc5b415385cc49d9f12dbf0)
LALFrame: 1.0.0.1 (CLEAN b269002a5b6b33b31dc5b415385cc49d9f12dbf0)
LALMetaIO: 1.0.0.1 (CLEAN b269002a5b6b33b31dc5b415385cc49d9f12dbf0)
LALBurst: 1.0.0.1 (CLEAN b269002a5b6b33b31dc5b415385cc49d9f12dbf0)
LALInspiral: 1.0.0.1 (CLEAN b269002a5b6b33b31dc5b415385cc49d9f12dbf0)
LALPulsar: 1.0.0.1 (CLEAN b269002a5b6b33b31dc5b415385cc49d9f12dbf0)
LALStochastic: 1.1.0.1 (CLEAN b269002a5b6b33b31dc5b415385cc49d9f12dbf0)
LALApps: 6.4.0.1 (CLEAN b269002a5b6b33b31dc5b415385cc49d9f12dbf0)

Install PyLAL

You must ensure that your environment is setup to find the LAL that you have just installed, for details see the Install LALSuite section.

Before installing PyLAL, you must determine which version of python you have installed. Type:

python -V

If you do not have version 2.4 or greater installed, contact your system administrator for help installing Python.

Enter into the pylal directory and install PyLAL.

cd ${LALSUITE_SRCDIR}/lalsuite/pylal
rm -rf build
python setup.py install --prefix=${LALSUITE_PREFIX}

Install GLUE

You must ensure that your environment is setup to find the LAL that you have just installed, for details see the Install LALSuite section.

Enter into the glue directory and install GLUE.

cd ${LALSUITE_SRCDIR}/lalsuite/glue
rm -rf build
python setup.py install --prefix=${LALSUITE_PREFIX}

Important pet tricks

The advanced user may wish to configure and compile LALSuite in a custom manner. Here are some common things you may wish to do.

Configure LALSuite with Python SWIG bindings

Usually users will want to build LALSuite with the optional SWIG Python bindings. This can be done by configuring LALSuite with the additional configure flag --enable-swig-python as follows:

./configure --prefix=${LALSUITE_PREFIX} --enable-swig-python

Configure LALSuite for debugging

When using gcc or clang, LALSuite is built by default using optimizations that interfere with debugging the programs with debuggers (e.g., by optimizing-out variables). If you plan to be running programs within a debugger, it is helpful to turn off the optimization. This can be achieved by configuring LALSuite as follows:

./configure --prefix=${LALSUITE_PREFIX} CFLAGS="-g -O0"

Configure LALSuite for production

When using gcc or clang, LALSuite can be built with yet more optimization than is enabled by default. This can be achieved by configuring LALSuite as follows:

./configure --prefix=${LALSUITE_PREFIX} CFLAGS=-O3

Configure multiple LALSuite installs from one source directory

For testing or development you may wish to install a production version of LALSuite well as a development version. The safest way to do this is to create separate directories in which to configure each version.

First it is important to clean up any previous configuration of LAL by running make distclean in the source directory:

cd ${LALSUITE_SRCDIR}/lalsuite
make distclean

Then create a directory to configure your production version of LAL:

mkdir -p build_production
cd build_production

Within that directory run configure with the desired arguments, for example:

../configure --prefix=${LALSUITE_PREFIX}_production CFLAGS=-O3

Create another directory, in the LALSuite source directory, for the development version and configure in the same way:

cd ${LALSUITE_SRCDIR}/lalsuite
mkdir -p build_development
cd build_development
../configure --prefix=${LALSUITE_PREFIX}_development CFLAGS="-g -O0"

You can then install each version of LAL separately by running make and make install in the directories ${LALSUITE_SRCDIR}/lalsuite/build_production and ${LALSUITE_SRCDIR}/lalsuite/build_development respectively.

To setup your environment to use either the production or development versions, source either the file ${LALSUITE_PREFIX}_production/etc/lalsuiterc or ${LALSUITE_PREFIX}_development/etc/lalsuiterc respectively.

Notes:

  1. The commands make and make install should be run from within the directory in which you configured LALSuite.

Configure LALSuite/LALApps programs to run under Condor

If you are running a LALApps program under condor, it should be compiled with condor_compile. LALApps has a configure flag to accomplish this. First make sure that condor_compile is in your path. To do this type

which condor_compile

and this should indicate the program that is first in your path. If you get a message indicating that condor_compile is not in your path, you will need to install Condor on your system (or locate it on your system and setup your environment appropriately). This can be done by installing the LSC DataGrid Client.

Once you have condor_compile on your system, simply configure LALSuite with the command

./configure --prefix=${LALSUITE_PREFIX} --enable-condor --disable-pthread-lock --disable-framec --disable-lalxml

(and do a make -j and make install as before).

Configure LALSuite to build static programs

If you add the option

--enable-static-binaries

to the configure for LALSuite, it will build completely static executables in LALApps. This will work for gcc, it has not been tested with other compilers.

This passes the -static and -all-static options to the linker. The -all-static option tells gcc to really make the exectuables If you only specify -static then it will link everything other than glibc statically, which it links dynamically. This means that the executables aren't portable between distributions, since glibc will change.

If you are condor compiling your code (i.e., adding --enable-condor to the LALSuite configure), then the executables in LALApps will be static without adding the extra ldflags.

Building test programs

LALSuite contains several test programs that can be used to test various functionality provided by the libraries. These can be build and run by running:

cd ${LALSUITE_SRCDIR}/lalsuite
make check

after building the library in question.

Building Doxygen documentation

The LALSuite documentation is generated from the source code using Doxygen. To build the documentation, first configure LALSuite with --enable-doxygen, for example:

./configure --prefix=${LALSUITE_PREFIX} --enable-doxygen

Then run the following from the top-level:

cd ${LALSUITE_SRCDIR}/lalsuite
make html

The Doxygen manual can be found here. In particular, tips on documenting code using Doxygen syntax can be found here.

$Id$