Installing BBarolo¶
Pre-compiled binaries¶
Pre-compiled executable files for the GUI and the command line utility are available at this page. Binaries are for Linux x86_64 and Mac OS X (> 10.6).
The command line executable (BBarolo
) is also included in the GUI binary packages and can be found at:
Linux: same directory of BBaroloGUI
MacOS: BBaroloGUI.app/Contents/MacOS/BBarolo
The pre-compiled executables should work on most systems. If they don’t, please compile BBarolo from source following the instructions below.
Compiling from source¶
The best way to exploit BBarolo functionalities is to compile the code directly on your computer. BBarolo compiles and runs on Unix machines only.
Requirements¶
To compile the code, all you need is:
a C++ compiler supporting C++11 standard, like the GNU compiler. OpenMP support is required for multi-threading.
CFITSIO library.
FFTW library.
WCS library.
QT toolkit (> 4.0), only if you would like to use the GUI.
Most of these libraries and packages should already be installed on scientific machines. Otherwise, you can easily install them through the terminal commands of the various package managers, i.e. apt-get on Ubuntu-based, pacman on Arch-based, yum on RPM-based distros, brew or port on Mac OS X. Note that the QT toolkit is only needed to compile the GUI, which is optional. Gnuplot and Python are not needed to successfully compile the code, but without them BBarolo will not produce any outputs.
Compiling¶
If your machine satisfies the above requirements, compiling BBarolo will hopefully be a piece of cake.
Download the latest stable release. From a terminal:
> wget https://github.com/editeodoro/Bbarolo/archive/X.Y.tar.gz
where X.Y is the release version. If you are brave, you can also try the latest (non stable) source code from here.
Uncompress it and enter the BBarolo directory:
> tar -xvf X.Y.tar.gz > cd Bbarolo-X.Y
Configure running autoconfigure script:
> ./configure
If the script is not executable:
> chmod +x configure
. The configure script takes a number of optional arguments. For instance, it is possible to specify installation and library directories, or the compiler to use:> ./configure CXX=icpc --prefix=/dir/to/install --with-cfitsio=/dir/of/cfitsio --with-wcslib=/dir/to/wcslibIf the configuration fails, follow the suggestions given by the script to manually set the path of libraries.
Compile the source:
> make
To compile in parallel:
> make -j N
, where N is the number of processors. If the compilation succeeds, the executable BBarolo will appear in the current directory.
Optional steps¶
Install, e.g. copy the executable in the installation path (default is /usr/local/bin):
> make install
Compile the GUI (QT > 4 needed):
> make gui
This can fail for a number of reasons.
Compile BBarolo as a library:
> make lib
Clean up unnecessary files:
> make clean
Installing via Homebrew (MAC only)¶
If you use Homebrew package manager for MacOSX, there is a simpler way of compiling and installing the code:
> wget https://raw.github.com/editeodoro/Bbarolo/master/bbarolo.rb
> brew install [--HEAD] bbarolo.rb
The first command downloads a ruby installing script, the second command installs BBarolo in /usr/local/Cellar/bbarolo and symlinks the executable to /usr/local/bin. Homebrew takes care of all dependencies. After installation, you will be able to run the code from any directory just by typing BBarolo
. The optional argument --HEAD
install the latest non-stable version rather than the stable release.
To uninstall BBarolo:
> brew uninstall bbarolo