Installation

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.

Recola-Collier

Required:

CMake 2.8.7 or higher

Download the recent Recola-Collier package:

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

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

where <model> can take one of the values:

tar -zxvf recola-collier-1.4.4.tar.gz
cd recola-collier-1.4.4/build
cmake ..

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.4.4/install and recola2-collier-2.2.4/install directory for Recola and Recola2, respectively.

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

Recola standalone

Required:

CMake 2.8.7 or higher

COLLIER

Recola2 model file

Obtain a copy of COLLIER and, if Recola2 is used, a Recola2-specific model file and follow the compilation instructions. Then proceed as follows.

Download a recent Recola standalone version:

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

tar -zxvf recola2-2.2.4.tar.gz
cd recola2-2.2.4/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.

tar -zxvf recola-1.4.4.tar.gz
cd recola-1.4.4/build
cmake .. -Dcollier_path=<path_to_collier>

where <path_to_collier> is the directory containing the compiled Collier library.

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 be 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.

CMake option

Value

Short description

collier_path

Path

Absolute or relative path to the Collier library.

static

On/Off

Compile the library as a shared or static library.

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 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:

collierConfig.cmake
set(COLLIER_LIBRARY_DIR "PATH_TO_COLLIER_LIB")
set(COLLIER_INCLUDE_DIR "PATH_TO_COLLIER_MODULE")
add_library(collier SHARED IMPORTED)
find_library(COLLIER_LIBRARY_PATH collier HINTS ${COLLIER_LIBRARY_DIR})
set_target_properties(collier PROPERTIES IMPORTED_LOCATION ${COLLIER_LIBRARY_PATH})
include_directories(${COLLIER_INCLUDE_DIR})

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

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