Installation on Redhat

This page describes installing AOFlagger 2.14 on RHEL 7.6 (Thanks to Leonardo Saavedra from NRAO)

aoflagger depends on many packages, most of then are provided by RHEL 7.6, but you will need to install the modern version of them. In particular: fftw and boost

Install RPMs

You need install hdf from epel (or install from the sources as detailed below), so you need to set EPEL repo.

yum install hdf hdf-devel
yum install gtkmm30 gtkmm30-devel

Set environment

mkdir ~/Downloads2/aoflagger
cd ~/Downloads2/aoflagger
wget -c
wget -c
wget -c
wget -c

Install FFTW 3.3.8

tar xzvf fftw-3.3.8.tar.gz
cd fftw-3.3.8/
./configure --prefix=${LOCAL5} --enable-threads --enable-openmp  --enable-shared
make -j `nproc`
make install
cd ..

Install Casacore 3.3.1

Set new environment

export PATH=$PATH:${LOCAL5}/bin
tar xzvf v3.1.1.tar.gz
cd casacore-3.1.1/
mkdir build
cd build
make -j `nproc`
make install
vim cmake_install.cmake <-- modified CMAKE_INSTALL_PREFIX to point to ${LOCAL5}
make install

Install boost 1.68

Previous to compile boost, you have to make sure that your python installation uses a 4-byte representation for Unicode characters. To check that, you can run the following script, if it reports ‘UCS2 Build’, you have to either install a new python or use other python version.

import sys

if sys.maxunicode > 65535:
    print ('UCS4 Build')
    print ('UCS2 Build')
UCS4 Build
tar xzvf boost_1_68_0.tar.gz
cd boost_1_68_0
./ --with-python=python --prefix=${LOCAL5} --with-icu
./b2 link=shared install --prefix=${LOCAL5}
(cd ${LOCAL5}/lib ; ln -s
cd ..

Install HDF5

This is optional, you can skip if you have hdf5 from Epel. Download hdf-1.10.5.tar from

./configure --enable-cxx --with-szlib --enable-shared --enable-hl --disable-silent-rules --enable-fortran --enable-fortran2003 --prefix=${LOCAL5}
make -j `nproc`
make check
make install
make installcheck

Install AOFlagger 2.14

tar xjvf aoflagger-2.14.0.tar.bz2
cd aoflagger-2.14.0
mkdir build
cd build
make -j `nproc`
vim cmake_install.cmake  <-- modified (or make sure) CMAKE_INSTALL_PREFIX  point to ${LOCAL5}
make install

Check aoflagger version

which python
aoflagger --version
AOFlagger 2.14.0 (2019-02-14)