This C++ version of BAT is still being maintained, but addition of new features is unlikely. Check out our new incarnation, BAT.jl, the Bayesian analysis toolkit in Julia. In addition to Metropolis-Hastings sampling, BAT.jl supports Hamiltonian Monte Carlo (HMC) with automatic differentiation, automatic prior-based parameter space transformations, and much more. See the BAT.jl documentation.

Installation instructions for BAT 0.1

You can find here a short description of what to do to be able to compile and use BAT on your computer. In the future a detailed description of the installation procedure should become a part of the manual.

Platforms

BAT has been developed on Linux machines running different distributions and different versions of the kernel and gcc. As far as we know there is nothing distribution dependent inside of BAT. However, we have not yet started to systematically check for compatibility and portability. This is planned for future releases of BAT. For the moment the only statement we can do here is that if you don't have a too old or too specific installation of Linux you should be able to compile and use BAT without problems.

Windows is not supported for the moment.

Dependencies

ROOT:

ROOT is an object oriented data analysis framework. You can obtain it from http://root.cern.ch/. To compile and run BAT you will need a ROOT version 5.16 or later. Please, check your linux distribution for the availability of precompiled packages on your system. Mostly used distributions nowdays have the ROOT packages available.

CUBA:

CUBA is a library containing general purpose multidimensional integration algorithms. It can be obtained from http://www.feynarts.de/cuba/. In future versions of BAT we plan to make the use of CUBA optional but for the moment it has to be installed on your system if you want to compile BAT.

Note: To compile CUBA libraries use command   make lib instead of plain   make since it tries to compile MathLink executables and fails if MathLink is not installed on the system.

Installation Procedure

Manual installation is necessary at the moment which contains just a few staps.

Unpack the tarball containing the BAT source usually named like   bat-x.x.tgz (here x.x is the version number) using command

        tar -xzf bat-x.x.tgz

A directory called   bat-x.x will be created containing the source code. Enter the directory and run the compilation using commands

        cd bat-x.x
        make

After a successful compilation a file called   libBAT.so will be created which is a shared library.

To be able to compile and run with BAT you have to put the library as well as the include files into the location accessible to your system. For compilation it is enough to add the options   -L/bat/library/location/path/ and   -I/bat/include/location/path/ to the gcc compiler commands in your makefile. To run with BAT you have to place the   libBAT.so to the directory where you system searches for shared libraries. You can also setup your environmental variables to add the location of the library to the search path of your system via setting:

        export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/bat/lib/location/path/
        export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/bat/inc/location/path/

or

        setenv LD_LIBRARY_PATH     $LD_LIBRARY_PATH:/bat/lib/location/path/
        setenv CPLUS_INCLUDE_PATH  $CPLUS_INCLUDE_PATH:/bat/inc/location/path/

for   bash and   csh compatible shells, respectively. The second line adds the location of BAT header files to the standard compiler search path.

In the future we plan to automatize the whole installation process, possibly using autoconf/automake tools.