Recola depends on the Collier library and Recola2 in addition on Recola2-specific model files which need to be build and linked separately. In order to facilitate building the library we provide the following two options:

Variant 1 (automatic):
The download, configuration and compilation of Recola/Recola2, Recola2-specific model files and the Collier library is carried out with a compilation script which resolves all dependencies automatically.
Variant 2 (manual):
A stand-alone version of Recola/Recola2 which requires the user to resolve the dependency to Collier (and model files) by hand.

Variant1: Recola-Collier

Prerequisites: CMake

Download the recent Recola-Collier package:

Extract it, then switch to the build directory, and run the configuration as follows:

tar -zxvf recola-collier-1.3.6.tar.gz
cd recola-collier-1.3.6/build
cmake ..
tar -zxvf recola2-collier-2.1.6.tar.gz
cd recola2-collier-2.1.6/build
cmake .. -Dmodel=<model>

where <model> can take one of the values SM, SM_BFM, HS, HS_BFM, THDM, THDM_BFM, SMWP.

The compilation is started by invoking inside the build directory:

make -j <threads>

where <threads> is the desired number of compilation units. The package can be installed upon invoking:

make install

and by default the installation path is the recola-collier-1.3.6/install and recola2-collier-2.1.6/install directory for Recola and Recola2, respectively.

A different installation path can chosen by setting the CMAKE_INSTALL_PREFIX variable (see Build options).

Variant 2: Recola standalone

Prerequisites: CMake, COLLIER, Recola2 model file

We assume that the user has obtained a copy of COLLIER and, if Recola2 is compiled, a Recola2-specific model file and that he/she followed the compilation instructions.

Download the recent standalone version:

Extract it, switch to the build directory, and run the configuration as follows:

tar -zxvf recola-1.3.6.tar.gz
cd recola-1.3.6/build
cmake .. -Dcollier_path=<path_to_collier>
tar -zxvf recola2-2.1.6.tar.gz
cd recola2-2.1.6/build
cmake .. -Dcollier_path=<path_to_collier> -Dmodelfile_path=<path_to_modelfile>

where <path_to_collier> and <path_to_modelfile> point to the directories containing the compiled Collier and model file library, respectively.

This operation moves into the build directory where the cmake shell command cmake is executed, generating a makefile for this build.

The compilation is started by invoking:

make -j <threads>

The Recola standalone package is installed to the system (OS dependent) directory upon invoking:

make install

A different installation path can chosen by setting the CMAKE_INSTALL_PREFIX variable (see Build options).

A list of additional configuration and compilation options is given in below.

Build options

Configuration options

CMake option Value Short description
collier_path Path Absolute or relative path to the Collier library.
modelfile_path Path Absolute or relative path to the Recola2 model file. Only available in Recola2 CMakeLists.txt.
static On/Off Compile the library as a shared or static library.
with_python3 On/Off Choose Python 3.x over Python 2.7 to compile pyrecola. Only available in Recola2 CMakeLists.txt.
with_smtests On/Off Run tests against Pole and OpenLoops. Only available in the Recola/Recola2 CMakeLists.txt.
CMAKE_BUILD_TYPE Debug/Release Set the compiler flags. By default Release flags (optimized) are used.
CMAKE_Fortran_COMPILER Path/Name Set the Fortran compiler either via executable name or the absolute path to executable.
CMAKE_INSTALL_PREFIX Path Set the installation prefix.

Compilation options

Makefile option Value Short description
-j Integer Number of threads for compilation.
VERBOSE True/False Enable verbose compilation. In this mode all compilation flags are visible to the user.

Running tests

Recola can be compiled including tests as follows [1]:

cmake [options] .. -Dwith_smtests=On

Then, after compilation, the tests can be run with

make check

inside the build folder.

[1]In the Recola/Recola2-Collier package the with_smtests option is automatically enabled for a SM model file.

Linking recola to collier

When building the standalone Recola version Collier needs to be linked by hand which is done using the find_package feature of cmake requiring a Collier cmake configuration file. However, if Collier has not been build using cmake, no configuration file is generated. A simple Collier configuration file (collierConfig.cmake) should include the following lines:

add_library(collier SHARED IMPORTED)

where "PATH_TO_COLLIER_LIB", "PATH_TO_COLLIER_MODULE" need to be replaced. For instance, if Collier has been installed to /usr/lib/, /usr/include/collier.mod, then:

set(COLLIER_LIBRARY_DIR "/usr/lib")
set(COLLIER_INCLUDE_DIR "/usr/include")