public:install_lofar_centos6.5

This is an old revision of the document!


Installing LOFAR Software on a CentOS 6.5 (Final) system (cluster Newton of the AIP Potsdam)

Frank Breitling 2015/06/26 18:47

I was mainly following the previous installation notes provided by others:

http://www.lofar.org/operations/doku.php?id=public:user_software:lofar
http://www.lofar.org/operations/doku.php?id=engineering:user_software:ubuntu_12_4

However a few problems occured and had to be solved as described below.
Ideas and support by Arno Schoenmakers, Ger van Diepen and Marcel Loose were very helpful and highly appreciated.
This instruction will install all packages in $HOME/local/.

The 4 Newton head nodes provide some necessary libraries via Environment Modules (see also http://modules.sourceforge.net/).
We need its HDF5 libs and its more recent CMake version 3, since the systems version 2.6 is too old.
Moreover, for the installation of Pyrap we need a Python path with write access.

So I added the following two lines to my $HOME/.bashrc:

module load cmake hdf5
export PYTHONPATH=$HOME/local/lib64/python2.6/site-packages:$PYTHONPATH
export PATH=$HOME/local:$PATH

1.1 Optional CMake installation - only necessary if using newl1

Unfortunately CMake is broken on newl1. To build the LOFAR software on this head node, we need to build our own CMake as follows:

mkdir -p $HOME/local/src
cd $HOME/local/src
wget http://www.cmake.org/files/v3.2/cmake-3.2.3.tar.gz
tar xf cmake-3.2.3.tar.gz
cd cmake-3.2.3
.bootstrap --prefix $HOME/local
make -j12
make install

If working on the other head nodes newl2 to newl4 this step is not necessary.

Next we need to build and install these other packages as follows:

cd $HOME/local/src/
wget ftp://ftp.atnf.csiro.au/pub/software/wcslib/wcslib.tar.bz2
tar xf packages/wcslib.tar.bz2
cd wcslib-5.6/
./configure --prefix=$HOME/local/
make install


cd $HOME/local/src/
wget http://www.fftw.org/fftw-3.3.4.tar.gz
cd fftw-3.3.4
configure --prefix=$HOME/local --enable-threads --enable-shared --enable-float
make -j12 install

Now we can continue building the LOFAR software.

3.1 Essential CMake switches

We will need these essential CMake switches:

 1. -DBoost_NO_BOOST_CMAKE=ON
 2. -DUSE_LOG4CPLUS=NO
 3. -DUSE_BACKTRACE=OFF 
 4. -DCMAKE_INSTALL_PREFIX:PATH=$HOME/local

1.) Is necessary when using some older versions of boost with cmake-2.8.6-rc2 or later, where the boost finding has changed.
(See https://stackoverflow.com/questions/9948375/cmake-find-package-succeeds-but-returns-wrong-path.)
Otherwise make will show this error later:

make[2]: *** No rule to make target `/usr/lib64/lib64/libboost_program_options-mt.so.5', needed by `segment'.  Stop.
make[1]: *** [CMakeFiles/segment.dir/all] Error 2
make: *** [all] Error 2

2.) Is necessary if the Log4cplus libs are not installed.

3.) Is necessary if building shared libraries (the default with LOFAR), but libiberty.so is not installed on your system, only libiberty.a.
(See https://support.astron.nl/lofar_issuetracker/issues/8046).

4.) Sets the install path to $HOME/local/.

3.2 Casacore

So we can build the rest of the packages as follows:

cd ~local/src/
git clone https://github.com/casacore/casacore
mkdir build/casacore
cd build/casacore
time cmake -DBUILD_PYTHON=yes -DCMAKE_INSTALL_PREFIX=~/local -DUSE_FFTW3=yes -DUSE_OPENMP=yes \
  -DDATA_DIR=~/local/data -DUSE_HDF5=yes -DCMAKE_PREFIX_PATH="$HOME/local;" ../../casacore
time make -j12
make install

3.3 Pyrap

pip install python-casacore --global-option=build_ext --global-option=-I/usr/include/cfitsio:$HOME/local/include \
   --global-option=-L$HOME/local/lib --install-option=--prefix=$HOME/local
3.3.1 Alternative Pyrap installation

Or alternatively if we don't want to install Pyrap with pip we can do:

cd ~/local/src/ git clone https://github.com/casacore/python-casacore.git
cd python-casacore
python setup.py build_ext -I/usr/include/cfitsio:$HOME/local/include -L$HOME/local/lib
python setup.py install --prefix=$HOME/local

3.4 Casarest

Now we continue with the rest:

cd ~local/src/
svn co https://svn.astron.nl/casarest/trunk/casarest
mkdir build/casarest
cd build/casarest
cmake -DCASACORE_ROOT_DIR=$HOME/local -DBUILD_ALL=1 -DCMAKE_INSTALL_PREFIX:PATH=$HOME/local \
  -DCMAKE_PREFIX_PATH=/usr/include/cfitsio -DUSE_OPENMP=yes -DBoost_NO_BOOST_CMAKE=ON ../../casarest
time make -j12
make install

3.4 DP3 and Calibration

cd ~local/src/
svn checkout --ignore-externals https://svn.astron.nl/LOFAR/trunk LOFAR
mkdir -p build/gnu_opt
cd build/gnu_opt
cmake -DCASACORE_ROOT_DIR=$HOME/local -DBUILD_PACKAGES="DP3 Calibration" -DCMAKE_INSTALL_PREFIX:PATH=$HOME/local \
  -DUSE_OPENMP=yes -DUSE_LOG4CPLUS=NO -DUSE_BACKTRACE=OFF -DBoost_NO_BOOST_CMAKE=ON ../../LOFAR
time make -j12
make install

Done!

Now the commands NDPPP and calibrate-stand-alone should be available on this system.

Enjoy!

  • Last modified: 2015-06-26 22:04
  • by Frank Breitling