This is an old revision of the document!
−Table of Contents
Installing LALSuite from source
If you don't want to, or can't, use the packaged versions of LALSuite, you must install the suite from the git repository source.
Clone the repo
- Choose a directory in which to clone the repo
LALSUITE_DIR=${HOME}/git # change as appropriate
- Clone the repository with your
albert.einstein
LIGO.ORG usernamegit clone albert.einstein@ligo-vcs.phys.uwm.edu:/usr/local/git/lalsuite.git
The repository can be cloned in a read-only state with no authentication via
git clone git://ligo-vcs.phys.uwm.edu/lalsuite.git
- Move into the repository
cd lalsuite
Installing with a top-level build
The following instructions describe a 'top-level' build, where all the C
-based packages of LALSuite are compiled together. This is the simplest way to build if everything works, but can get complicated if there is a problem.
Configure the build
First, run the setup script
./00boot
This will return some minimal output, but should be obviously broken when it fails.
Next, configure the build. This requires a set of keyword arguments to the ./configure
script. To see a list of all possible options, and their defaults, run
./configure --help
In short, you need to have
—-prefix /path/to/my/install
, e.g.—-prefix ${HOME}/opt/lalsuite/master
to install in your home directory for the specific 'master' branch of lalsuite. This allows you to install multiple branches in the same directory tree.
And you might want to add
—-enable-swig-python
to install the SWIG-bindings for python—-enable-swig-octave
to install the SWIG-bindings for octave—-quiet
to print less verbose output duringconfigure
Once you have chosen your arguments, run the configure script. First, set the prefix path
LALSUITE_PREFIX=${HOME}/opt/lalsuite/master # change as appropriate
then run the configure
, e.g:
./configure --prefix ${LALSUITE_PREFIX} --enable-swig-python --silent
Compile and install the code
You can then compile and install the code via
make install
Setting your environment
You will need to add a number of directory paths to a few environment variables so that you can easily find and use the codes you've just installed.
Each of the packages in LALSuite will have installed a script in the ${LALSUITE_PREFIX}/etc
directory. It's best to manually build a script to pull them all together. Set the top-level environment script in the same directory
LALSUITERC=${LALSUITE_PREFIX}/etc/lalsuiterc
and run the following code to fill it with the correct text:
echo '#!/bin/bash # define function to remove duplicates from path environment variables cleanpath() { local badpath=$(eval echo \$$1) badpath=${badpath%%:} badpath="$(echo "${badpath}" | awk -v RS=":" -v ORS=":" "!a[\$1]++")" badpath=${badpath%%:} eval $1=${badpath} eval export $1 } export LSCSOFT_LOCATION='${LALSUITE_PREFIX}' # set environment for each sub-package of LALSuite for PACKAGE in LAL LALFRAME LALMETAIO LALBURST LALINSPIRAL LALSTOCHASTIC LALPULSAR LALDETCHAR LALXML LALAPPS GLUE PYLAL; do lc_package=$(echo $PACKAGE | tr "[A-Z]" "[a-z]") PKG_ENV_SH=${LSCSOFT_LOCATION}/etc/${lc_package}-user-env.sh if [ -f "${PKG_ENV_SH}" ]; then . ${PKG_ENV_SH} fi done cleanpath PATH cleanpath PYTHONPATH cleanpath LD_LIBRARY_PATH' > ${LALSUITERC}