Skip to content

Rework to allow MPI-level parallelisation of AOFlagger

Notifications You must be signed in to change notification settings

nick-dumas/cotter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

755 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cotter

André Offringa's cotter pre-processing pipeline

Usage

Once installed, simply run cotter to see the list of available options.

Requirements

This is simple to compile from source, but Debian-based distros provide this library in the liberfa-dev package.

An open-source replacement for LIBSLA. This depends only on ERFA and is also simple to compile from source, but because it is a little different, instructions are listed below.

Installation instructions

  • Ensure ERFA is installed.
  • Navigate to the LIBPAL releases page and download the latest version of the software in a tarball. It seems that trying to install from git requires a "Starlink-patched version of automake", which is best avoided.
  • Run the usual configure-make-make install commands:
# PREFIX is where you want to install LIBPAL; a sensible choice is /usr/local
# ERFA_ROOT is where ERFA is installed; this is probably /usr
./configure --prefix="$PREFIX" --without-starlink --with-erfa="$ERFA_ROOT"
make
make install
  • Note that header files are installed into an unusual place; the following command might be helpful: ln -s "$PREFIX"/include/star/* "$PREFIX"/include

As with ERFA, this can be installed in Debian-based distros with the package aoflagger-dev. Otherwise, installation instructions can be found here.

Installation

Once you've cloned cotter and installed the dependencies, the rest is easy:

cd cotter
mkdir build
cd build
# Specifying LIBPAL_INCLUDE_DIR is necessary if LIBPAL header files are in a non-standard place.
cmake ../ -DLIBPAL_INCLUDE_DIR=/usr/local/include
make -j8
make install

If you have many libraries in non-standard places, then the following example of a cmake command might be helpful:

cmake ../ \
      -DCMAKE_INSTALL_PREFIX="$PREFIX" \
      -DAOFLAGGER_INCLUDE_DIR="$AOFLAGGER_INCLUDE_DIR" \
      -DAOFLAGGER_LIB="$AOFLAGGER_LIB"/libaoflagger.so \
      -DCASA_CASA_LIB="$CASACORE_ROOT"/lib/libcasa_casa.so \
      -DCASA_INCLUDE_DIR:STRING="$CASACORE_ROOT/include/;$CASACORE_ROOT/include/casacore" \
      -DCASA_MEASURES_LIB="$CASACORE_ROOT"/lib/libcasa_measures.so \
      -DCASA_MS_LIB="$CASACORE_ROOT"/lib/libcasa_ms.so \
      -DCASA_TABLES_LIB="$CASACORE_ROOT"/lib/libcasa_tables.so \
      -DCFITSIO_LIB="$CFITSIO_ROOT"/lib/libcfitsio.so \
      -DFITSIO_INCLUDE_DIR="$CFITSIO_ROOT"/include \
      -DFFTW3_LIB="$FFTW_DIR"/libfftw3.so \
      -DLIBPAL_INCLUDE_DIR="$LIBPAL_ROOT"/include \
      -DLIBPAL_LIB="$LIBPAL_LIB"/libpal.so \
      -DBLAS_LIBRARIES="$MAALI_LAPACK_HOME"/lib64/libblas.so \
      -DLAPACK_LIBRARIES="$MAALI_LAPACK_HOME"/lib64/liblapack.so

Docker

An appropriate Dockerfile for creating a cotter container is provided in Dockerfile in the repo. To build the image, run the following, it will create an image called cotter:latest.

docker build -t cotter:latest .

One way to launch the container is to use docker run, for example:

docker run --name my_cotter --volume=/data:/data --entrypoint="" --rm=true cotter:latest cotter -allowmissing -initflag 4 -m /data/OBSID_metafits.fits -o /data/OBSID_%%.mwaf /data/*gpubox*.fits 

notes:

  • This will perform RFI flagging and create .mwaf files for each coarse channel. See cotter -help for other ways to use cotter.
  • This assumes /data is a directory on the machine running docker (host) containing the gpubox files and metafits for an observation
  • --rm=true means the container will be deleted once it exits (you may or may not want this)
  • OBSID is an MWA observation ID

About

Rework to allow MPI-level parallelisation of AOFlagger

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 97.7%
  • CMake 1.4%
  • Other 0.9%