User Tools

Site Tools


comphep:install

CompHEP installation

This is a short guide for CompHEP 4.6. The complete instructions are in the INSTALL file. To install an older version, follow the INSTALL file in its archive.

Requirements

  • Linux. CompHEP also builds on macOS (see macOS notes) and other UNIX-like systems.
  • gcc, g++, gfortran, GNU make, X11 development libraries (libX11, libXext), perl.
  • Optional: LHAPDF 6 with yaml-cpp, ROOT, libxml2 (for HepML), pdflatex (for diagram export).

Debian/Ubuntu:

apt install gcc g++ gfortran make libx11-dev libxext-dev perl

Fedora/RHEL:

dnf install gcc gcc-c++ gcc-gfortran make libX11-devel perl

Getting the code

Take an archive from the releases page, or clone the repository:

git clone https://gitverse.ru/comphep/comphep.git

Building from source

./configure --optimise -mp
make
  • -mp enables parallel compilation with all CPU cores; -mpN uses N threads.
  • LHAPDF 6, ROOT and libxml2 are detected automatically if lhapdf-config, root-config and xml2-config are in PATH. Use --with-lhapdf, --no-lhapdf, --with-root, --no-root, --with-libxml and --no-libxml to change this.
  • ./configure --help lists all options.

When you update the sources, rebuild from a clean tree: make clean && make.

Setting up a user directory

make setup WDIR=$HOME/comphep_work
cd $HOME/comphep_work && ./comphep

Testing

make test        # fast: numerical protocol and unit tests
make test-full   # all suites; some of them need Docker or Podman

Spack and Docker

Spack:

git clone https://gitverse.ru/comphep/comphep.git
spack repo add comphep/spack
spack install comphep +lhapdf

Docker, from the source directory:

docker build -f docker/Dockerfile -t comphep-build .
docker run -it comphep-build

Parton distributions

To use LHAPDF 6, install at least one PDF set, for example lhapdf install cteq6l1. See the LHAPDF 6 guide.

Incompatibilities with old versions

  1. Models of CompHEP version 4.4 and later have different notations for leptons:
    e,E/ne,Ne instead of e1,E1/n1,N1; m,M/nm,Nm instead of e2,E2/n2,N2; and l,L/nl,Nl instead of e3,E3/n3,N3.
  2. In debug mode the environment variable COMPHEP defined in the startup scripts like ~/.cshrc can interfere with the run time environment defined in the script 'comphep'
comphep/install.txt · Last modified: by dudko