INSTALL 6.12 KB
Newer Older
1 2 3 4 5 6 7 8 9
LOFAR (LOw Frequency ARray) Software Repository - INSTALL
=========================================================

Installation instructions for LOFAR software.


Supported Systems
-----------------

10
- Linux      (most in use at ASTRON are Ubuntu, CentOS, and SUSE Linux Enterprise)
11
- Mac OS X   (reasonably recent should work, also with LLVM/Clang)
12

13
- any        See the next section on Docker
14 15


16 17
Install using a Docker image / script
-------------------------------------
18

19
For prepared Docker images, see:
20

21
	http://www.lofar.org/wiki/doku.php?id=public:docker
22

23

24
To create a Docker image with Ubuntu or CentOS and LOFAR Offline processing tools, see:
25

26
	https://github.com/lofar-astron/lofar-deploy
27

28

29 30 31 32 33 34 35
For a(nother) Docker image, see the next section.


Install from Ubuntu Packages (or a Docker image / script)
---------------------------------------------------------

To install LOFAR Offline processing tools (and many more radio astro packages)
36
the easy way for Ubuntu LTS 16.04, see:
37 38

	KERN: The Radio Astronomy Software Suite
39 40
	http://kernsuite.info/

41

42 43
Dependencies for Manual Build from Source
-----------------------------------------
44

45 46
Please first try to install as many dependencies as possible using your OS
package manager. For almost all cases, you also need the development packages
47
('pkgname-dev' for Debian/Ubuntu, or 'pkgname-devel' for CentOS/Fedora).
48

49
For Debian/Ubuntu (likely incomplete list, but goes a long way):
50

51
	apt-get install subversion cmake make g++ gfortran python-dev python-numpy
52 53
	apt-get install libboost-dev libblitz0-dev libfftw3-dev libcfitsio3-dev libxml2-dev liblog4cplus-dev
	apt-get install libpng12-dev                         # or latest version; for AOFlagger
54
	apt-get install libreadline-dev libpqxx-dev doxygen python-coverage  # optional
55
	apt-get install libxml++2.6-dev                      # or newer
56
        apt-get install libarmadillo-dev                     # optional, for DPPP_DDECal
57
	apt-get install libunittest++-dev                    # optional, for tests that use UnitTest++
58 59 60
	apt-get install python-xmlrunner                     # for some CEP/Pipeline/ tests
	apt-get install python-pygresql python-psycopg2 python-mysql.connector  # python mysql and postgresql interfaces
	apt-get install python-mock python-django            # for some SAS/ tests
61
	apt-get install postgresql                           # optional, for some SAS/OTDB_Services/ tests
62
	apt-get install libhdf5-dev                          # optional, required by casacore-dev from the KERN-2 suite.
63 64


65
For CentOS/Fedora (likely incomplete list, but goes a long way):
66

67 68
	yum install subversion cmake make gcc python-devel numpy
	yum install boost-devel fftw-devel cfitsio-devel libxml2-devel libpng-devel
69
	yum install readline-devel libpqxx-devel doxygen python-coverage  # optional
70
	yum install libxml++-devel
71
        yum install armadillo-devel                          # optional, for DPPP_DDECal
72 73
	yum install PyGreSQL python-psycopg2 mysql-connector-python  # python mysql and postgresql interfaces
	yum install python2-mock python-django               # for some SAS/ tests
74
	yum install postgresql                               # optional, for some SAS/OTDB_Services/ tests
75

76 77 78 79 80 81 82
	RPMs for these 3 known to work on CentOS 7 can be found at https://support.astron.nl/lofar_issuetracker/issues/8161
	- blitz, blitz-devel: available on some distros, but not on e.g. CentOS 7.
	  If required for your build, but not in your repo, take the two RPMs from CentOS 6 (or build from source).
	- log4cplus: idem as blitz (LOFAR log4cxx support is dodgy).
	- unittest++, unitest++-devel (optional): idem, but can take two RPMs from Fedora 22 (or build from source).

	- python-xmlrunner: pip install xmlrunner  # possibly with: --target=/your/path/libdir/pythonversion/site-packages
83 84


85

86
NOTE (any OS): For manual builds, the most prominent dependencies you may need to install are:
87 88 89

	casacore:                  https://github.com/casacore/casacore
	python-casacore ('pyrap'): https://github.com/casacore/python-casacore
90
	IERS/measures tables:      ftp://ftp.astron.nl/outgoing/Measures/WSRT_Measures.ztar (auto-updated weekly),
91
	                               also see https://github.com/casacore/casacore-data-update
92
	casarest:                  https://github.com/casacore/casarest
93

94
	AOFlagger:                 https://sourceforge.net/projects/aoflagger/
95 96
	    which may need: Debian/Ubuntu: libgsl-dev libgtkmm-[2.4|3.0]-dev libsigc++-2.0-dev
	                    CentOS/Fedora: gsl-devel gtkmm[24|30]-devel libsigc++20-devel
97

98 99
	PyBDSF (blob detector & source finder): https://github.com/lofar-astron/PyBDSF

100
	python-monetdb (if using GSM inside the LOFAR network): pip install python-monetdb  # possibly with: --target=/your/path/libdir/pythonversion/site-packages
101

102 103 104 105

Instructions for Manual Build from Source
-----------------------------------------

106 107
- SVN checkout build and configuration scripts of a tagged release x.y.z (or the
  trunk) from https://svn.astron.nl/LOFAR/ into e.g. $HOME/src/LOFAR-x.y.z/
108

109 110 111
	LOFAR_RELEASE=LOFAR-Release-x.y.z  # set to used release version
	svn checkout --depth=files "https://svn.astron.nl/LOFAR/tags/$LOFAR_RELEASE" "$HOME/src/$LOFAR_RELEASE"
	svn update --depth=infinity "$HOME/src/$LOFAR_RELEASE/CMake"
112

113 114
- Auto-checkout and install the usual offline data reduction (imaging) packages
  into e.g. $HOME/local/$LOFAR_RELEASE/
115 116
  (Only ends succesfully once CMake can find all required dependencies.)

117
	mkdir -p $HOME/build/$LOFAR_RELEASE/gnu_opt  # last directory must be {gnu|clang}[cxx11]_{debug|opt}
118 119
	cd $HOME/build/$LOFAR_RELEASE/gnu_opt
	cmake -DCMAKE_INSTALL_PREFIX="$HOME/local/$LOFAR_RELEASE" -DBUILD_PACKAGES="DP3 Calibration Imager PyBDSM" -DUSE_OPENMP=ON "$HOME/src/$LOFAR_RELEASE"
120 121 122

- Build and install:

123 124
	make -j 4
	make -j 4 install  # with sufficient privileges
125 126 127

- Optionally, run the regression tests:

128
	ctest -j 4 --timeout 60
129

130
  All tests should pass, however, a few packages (not selected above) require
131
  GPU hardware or a database to pass all tests.
132

133
- You may want to add the installation path bin/ to your PATH by sourcing the lofarinit script:
134

135 136
	source "$HOME/local/$LOFAR_RELEASE/lofarinit.sh"  # for Bourne-like shells, or
	source "$HOME/local/$LOFAR_RELEASE/lofarinit.csh" # for C-like shells
137