Installation¶
The MCFM package may be downloaded from the homepage at https://mcfm.fnal.gov.
The external requirements for are
- cmake (>= 3.13)
- gcc/g++/gfortran (>= 7)
Optional external dependencies:
- LHAPDF (6.2.X)
- MPI implementation (We recommend OpenMPI)
To compile with default options just run “cmake ..” in the Bin directory or in a new “build” directory, then run make to compile the MCFM program. If you compile in a directory different than “Bin”, please run “make install” to copy some required files over from the Bin directory. The Bin directory contains several example input files that can be used as an argument to mcfm.
For most recent installation information, process information and troubleshooting see https://mcfm.fnal.gov. The documents Docs/cute-mcfm.pdf and Docs/manual.pdf also provide further information for now, but are superseded by the HTML documentation. The document cute-mcfm.pdf includes a quick-start guide with information regarding the resummation features and implementation.
The following parameters can be added to choose a custom compiler. For example with MPI the wrapper mpifort will have to be chosen as the Fortran compiler:
-DCMAKE_C_COMPILER=gcc-8
-DCMAKE_CXX_COMPILER=g++-8
-DCMAKE_Fortran_COMPILER=gfortan-8
Note: Additional complications may arise especially on OS X systems, where by
default gcc
/g++
is linked to the clang compiler. Please make sure to follow
change the compiler names to the GNU versions.
Please ensure that your compiler is working and can produce executable
program files. For example when your compiler has been installed into a
non-standard location you probably need to append the compiler library
path to LD_LIBRARY_PATH
(DYLD_FALLBACK_LIBRARY_PATH
on OS X). This
can be achieved, for example, as follows:
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/home/user/local/lib/gcc7
PDFs and LHAPDF¶
The following parameter specifies the use of LHAPDF (internal, external):
-Duse_internal_lhapdf=ON (default)
and can be set to OFF to link against an external LHAPDF library.
When an external LHAPDF is used, cmake might not find the library. A library
search path can be added with -DCMAKE_PREFIX_PATH=/usr/local
, for example.
Additionally, the LHAPDF include path can be set with
-Dlhapdf_include_path=/usr/local/include
if it deviates from a standard
location.
When linking against an external version of LHAPDF, please note that LHAPDF 6.3.0 has a multithreading bug and we therefore we do not recommend to use it. LHAPDF 6.4.0 should work, but MCFM has only been tested with version 6.2.X. Version 5 of LHAPDF is not supported.
For the bundled LHAPDF, PDF sets go into the directory Bin/PDFs. This installation includes the central PDF members of CT14nnlo and NNPDF31_nnlo_as_0118 with their resummation grids. Additional PDFs can be downloaded from https://lhapdf.hepforge.org/pdfsets.html and untar’ed in the PDFs directory.
Additional PDF directories can be added to the LHAPDF search path by using for example:
export LHAPDF_DATA_PATH=/usr/local/share/LHAPDF
MPI and OpenMP¶
MCFM uses OMP (Open Multi-Processing) to implement multi-threading and automatically adjusts to the number of available CPU threads. The multi-threading is implemented with respect to the integration routine Vegas, which distributes the event evaluations over the threads and combines all events at the end of every iteration.
Two environment variables are useful. On some systems, depending on the
OMP implementation, the program will crash when calculating some of the
more complicated processes, for example W+2 jet production at NLO.
Then, adjusting OMP_STACKSIZE
may be needed for the program to run
correctly. Setting thisvariable to 16000
, for instance in the Bash
shell by using the command export OMP_STACKSIZE=16000
, has been found
to be sufficient for all processes. The second useful variable
OMP_NUM_THREADS
may be used to directly control the number of threads
used during OMP execution (the default is the maximum number of threads
available on the system).
It is also possible to build MCFM using MPI (Message Passing Interface). To build in this mode run cmake with :
-Duse_mpi=ON
and adjust the compiler names as described above to the mpi wrapped
versions (typically mpifort
and mpic++
).
Alternatively also a Fortran Coarray implementation can be used with:
-Duse_coarray=ON
This option experimental and cannot be used together with MPI.
Disabling processes¶
The processes WW,WZ and ZZ at NNLO require compilation of the VVamp amplitudes, which is about 100MB of additional sourcecode and adds significant additional compilation time. The following flag disables these amplitudes:
-Dwith_vvamp=OFF
Directory structure¶
The directory structure of MCFM is as follows:
-
Doc
. The source for this document. -
Bin
. The directory containing the executablemcfm
, and various essential files – notably the options fileinput.ini
. -
Bin/Pdfdata
. The directory containing the internal data-files. -
Bin/PDFs
. Directory for PDF grid files used by the bundled LHAPDF. -
src
. The Fortran source files in various subdirectories. -
lib/TensorReduction
General tensor reduction code based on the work of Passarino and Veltman and Oldenborgh and Vermaseren . -
lib/qcdloop-2.0.5
. The source files to the library QCDLoop . -
lib/oneloop
. The source files to the library OneLOop . -
lib/qd-2.3.22
. Library to support double-double and quad-double precision data types . -
lib/AMOS
. Library for AMOS, “ A Portable Package for Bessel Functions of a Complex Argument and Nonnegative Order”, taken fromhttp://www.netlib.org/amos/
. -
lib/SpecialFns
. Library containing the implementation of special functions from a variety of sources. -
lib/VVamp
. Library containing the implementation of two-loop helicity amplitudes for q**q̄ → V1V2, from the results of Ref. . -
The
lib/handyG
library for the evaluation of generalized polylogarithms .