Installing LOFAR Software on a fresh Ubuntu 12.04

This are my private, unedited notes on installing the LOFAR Software on a fresh Ubuntu 12.04.
So they don't contain step by step instructions that will work for you, but they still may contain useful information for you.
(9.10.2013 Andreas Horneffer)

(NB you can also get casacore/pyrap packages from https://launchpad.net/~gijzelaar/+archive/aartfaac to save building them yourself – JDS 2013-10-10.)

########## Pakete:
libgtkmm-2.4-dev python-matplotlib python-pyfits libatlas-base-dev 
mpi-default-bin mpi-default-dev libfreetype6-dev python-setuptools
libxml2-dev libpng12-dev libcfitsio3 libcfitsio3-dev libboost-all-dev
autoconf autoconf-archive autogen automake binutils-dev cmake cmake-curses-gui
cvs doxygen flex gfortran git guile-1.8-dev ipython libblas-dev libblitz0-dev
libboost-all-dev libboost-dev libfftw3-dev libfftw3-doc libgfortran3
libglib2.0-dev libgsl0-dev liblapack-dev liblog4cxx10 liblog4cxx10-dev 
libopenmpi-dev libpqxx3-dev libx11-dev mgdiff mpi-default-dev patch pgplot5 
python-dev python-numeric python-numpy python-scipy scons subversion-tools 
swig bison libbison-dev
tcl tcl-dev tk tk-dev tk8.5-dev tcl8.5-dev
libhdf5-dev (oder: libhdf5-serial-1.8.4 libhdf5-serial-dev)
### "libhdf5-serial" is needed for DAL, it doesn't work with "libhdf5-openmpi"
wcslib-dev liblog4cplus-dev liblog4cplus-1.0-4 cython
###for parmdbplot:
python-sip python-qt4




########## LOFAR software:

Download packages:
##################
  mkdir Downloads
  cd Downloads
  wget ftp://ftp.atnf.csiro.au/pub/software/asap/data/asap_data.tar.bz2

Download and Build Casacore:
############################
  tar -xjvf ../Downloads/asap_data.tar.bz2
(This creates the "data" subdirectory)
  mkdir BuildDir/casacore
  cd BuildDir/casacore
  svn co http://casacore.googlecode.com/svn/trunk source
  mkdir -p build/opt
  cd build/opt
  cmake -DBUILD_TESTING=NO -DCMAKE_INSTALL_PREFIX=/opt/lofar-stuff -DUSE_FFTW3=Yes -DUSE_THREADS=YES  -DUSE_HDF5=YES -DUSE_OPENMP=YES -DDATA_DIR=/opt/lofar-stuff/data  ../../source
make -j12
make install

Install Casacore data:
############################
  cd BuildDir/..
  tar -xjvf Download/asap_data.tar.bz2

Download and Build pyrap
############################
  mkdir /cluster/lofar/BuildDir/pyrap
  cd /cluster/lofar/BuildDir/pyrap
  svn co http://pyrap.googlecode.com/svn/trunk dev-source
  export LOFAR_STUFF_ROOT="/opt/lofar-stuff/"
  export PATH="${PATH}:${LOFAR_STUFF_ROOT}/bin/"
  export LD_LIBRARY_PATH="${LOFAR_STUFF_ROOT}/lib/"
  export PYTHONPATH="${LOFAR_STUFF_ROOT}/lib/python/"
  ln -s /opt/soft/lofar-stuff/lib/ /opt/soft/lofar-stuff/lib64
  cd dev-source/
  ./batchbuild-trunk.py --casacore-root=/opt/lofar-stuff --prefix=/opt/lofar-stuff --python-prefix=/opt/lofar-stuff/lib/python

Download and Build casarest
###########################
  mkdir /cluster/lofar/BuildDir/casarest
  cd /cluster/lofar/BuildDir/casarest
  svn co https://svn.astron.nl/casarest/trunk/casarest source
  mkdir build
  cd build
  cmake -DCASACORE_ROOT_DIR=/opt/lofar-stuff -DBUILD_ALL=1 -DCMAKE_INSTALL_PREFIX:PATH=/opt/lofar-stuff ../source
  make -j12
  make install


Download and Build the LOFAR Software
#####################################
  mkdir /cluster/lofar/BuildDir/lofarsoft
  cd /cluster/lofar/BuildDir/lofarsoft
  svn checkout --ignore-externals https://svn.astron.nl/LOFAR/trunk LOFAR
username: lofar-guest
password: lofar-guest
  mkdir -p build/gnu_opt
  cd build/gnu_opt
  cmake -DCASACORE_ROOT_DIR=/opt/lofar-stuff/ -DBUILD_SHARED_LIBS=ON -DUSE_OPENMP=ON -DBUILD_PACKAGES="ParmDB Calibration DP3 Pipeline MSLofar LofarFT" -DCMAKE_INSTALL_PREFIX:PATH=/opt/lofar-stuff ../../LOFAR/
  make -j12
  make install

When this all worked you can set up your environmen with the following lines:

For bash/zsh:

if test -n "$PYTHONPATH" ; then
  export PYTHONPATH=${PYTHONPATH}:/opt/lofar-stuff/lib/python:/opt/lofar-stuff//lib/python2.7/site-packages/
else
  export PYTHONPATH=/opt/lofar-stuff/lib/python:/opt/lofar-stuff//lib/python2.7/site-packages/
fi

source /opt/lofar-stuff/lofarinit.sh

For (t)csh:

if ($?PYTHONPATH) then
  setenv PYTHONPATH ${PYTHONPATH}:/opt/lofar-stuff/lib/python:/opt/lofar-stuff/lib/python2.7/site-packages/
else
  setenv PYTHONPATH /opt/lofar-stuff/lib/python:/opt/lofar-stuff/lib/python2.7/site-packages/
endif

source /opt/lofar-stuff/lofarinit.csh
  • Last modified: 2017-03-08 15:27
  • (external edit)