User Tools

Site Tools


comphep:install

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
comphep:install [01/01/2017 12:12] – [CompHEP-4.1. Installation.] admincomphep:install [31/10/2026 12:16] (current) – Update for CompHEP 4.6.2 dudko
Line 1: Line 1:
-====== CompHEP-4.1. Installation. ======+====== CompHEP installation ======
  
-**New:** //For Mac users the installation instruction is [[:comphep:mac:welcome|here]]//+This is a short guide for CompHEP 4.6. The complete instructions are in the [[https://gitverse.ru/comphep/comphep/content/master/INSTALL|INSTALL]] file. To install an older version, follow the INSTALL file in its archive.
  
-Please send all you remarks to A.Kryukov by e-mail: [[kryukov@theory.sinp.msu.ru]]+===== Requirements =====
  
-===== Preliminary remarks and notations. =====+  * Linux. CompHEP also builds on macOS (see [[new-mac|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).
  
-In this document we suppose that Linux is used. Thus, if you have another OS on the computer, please adjust this installation procedure according requirements of your OS.+Debian/Ubuntu:<code> 
 +apt install gcc g++ gfortran make libx11-dev libxext-dev perl 
 +</code> 
 +Fedora/RHEL:<code> 
 +dnf install gcc gcc-c++ gcc-gfortran make libX11-devel perl 
 +</code>
  
-Below, we use the following notations:+===== Getting the code =====
  
-  XXXX - CompHEP version number; +Take an archive from the [[https://gitverse.ru/comphep/comphep/releases|releases page]], or clone the repository:<code> 
-  comphep-XXXX - directory where CompHEP files will live; +git clone https://gitverse.ru/comphep/comphep.git 
-  comphep-XXXX.tgz - distributive tar-file with sources; +</code>
-  comphep-XXXX-linux.tgz - distributive tar-file with binaries;+
  
-See section 4 for the installation from binary distributive.+===== Building from source =====
  
-===== Compilation of the package from the source distributive. =====+<code> 
 +./configure --optimise -mp 
 +make 
 +</code>
  
-  - Untar gzip-tar distributive archive: <code> +  * ''-mp'' enables parallel compilation with all CPU cores; ''-mpN'' uses N threads. 
-tar xzvf comphep-XXXX.tgz +  * 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. 
-</code> The directory with name comphep-XXXX will be created with all files of CompHEP distributive. +  * ''./configure %%--help%%'' lists all options. 
-  - Pass to the comphep-XXXX directory: <code> + 
-cd comphep-XXXXX +When you update the sources, rebuild from a clean tree: ''make clean && make''. 
 + 
 +===== Setting up a user directory ===== 
 + 
 +<code> 
 +make setup WDIR=$HOME/comphep_work 
 +cd $HOME/comphep_work && ./comphep
 </code> </code>
-  - Launch configure script:<code> 
-./configure 
-</code> This script has several options. In order to get help for the options execite ./configure --help 
-  - ./configure generates several files with compiler/linker options: CC, CFLAGS, CLIBS, F77, F77FLAGS, F77LIBS, RANLIB. If user want additional or other option, (s)he can edit this files. Default values (for Linux):<code> 
-CC = gcc 
-CFLAGS = -Wall -DNUM_DOUBLE -DCOMPHEP 
-CLIBS = -Llib -lX11 -lm 
-F77 = gfortran 
-F77FLAGS =   
-F77LIBS = -lgfortran -lgcc 
-RANLIB = ranlib 
-</code> If user wants to have an interface with ROOT the option --with-root must be used. In this case, two files ROOTFLAGS and ROOTLIBS will have options and libriaries necessary for the interface. 
-  - Compile CompHEP:<code> 
-make 
-</code> NOTE:// 
-      All CompHEP binaries are ready to use. But for convenient 
-      work with CompHEP we recommend to create a user directory, which will contain necessary scripts, model files, and directories for results of your calculation. 
-// 
  
-===== Installation of a user directory ===== +===== Testing ===== 
-In order to create a user working directory execute:+
 <code> <code>
-make setup WDIR=path_to_user_work_directory +make test        # fast: numerical protocol and unit tests 
-</code> NOTE: +make test-full   # all suites; some of them need Docker or Podman 
-   * WDIR is a path to a directory where you want to have all CompHEP start-up scripts. Default value is <code>../comphep_XXXX_usr_test (relatively to $COMPHEP).</code> +</code>
-   * Do not use '~' (tilde) to point home directory. Use the $HOME variable instead of '~'.+
  
-After that go to WDIR and enjoy CompHEP!+===== Spack and Docker =====
  
-===== Additional services are provided. =====+Spack:<code> 
 +git clone https://gitverse.ru/comphep/comphep.git 
 +spack repo add comphep/spack 
 +spack install comphep +lhapdf 
 +</code>
  
-   - Clean up CompHEP :<code> +Docker, from the source directory:<code> 
-make clean+docker build -f docker/Dockerfile -t comphep-build . 
 +docker run -it comphep-build
 </code> </code>
-   - make tar gzip archive of CompHEP:<code> 
-make dist 
-</code> NOTE: Archives will be in directory comphep-XXXX/.. with the name comphep-XXXX.tgz 
  
-===== Some incompatibilities with previous versions. =====+===== Parton distributions ===== 
 + 
 +To use LHAPDF 6, install at least one PDF set, for example ''lhapdf install cteq6l1''. See the [[https://gitverse.ru/comphep/comphep/content/master/doc/LHAPDF6-migration.txt|LHAPDF 6 guide]]. 
 + 
 +===== Incompatibilities with old versions =====
  
   - Models of CompHEP version 4.4 and later have different notations for leptons: <code>   - Models of CompHEP version 4.4 and later have different notations for leptons: <code>
Line 70: Line 72:
 </code> </code>
   - 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'   - 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