GoSam-2.0 is distributed with an automatic installation script which simplifies the installation and update of GoSam and all related programs. To install the package using this script go to the automatic installation section. If you prefer to install the different programs needed by GoSam individually, you can follow the instructions of the manual installation section.
Please consider first the following
Basic prerequisites To run GoSam you need the following dependencies (typically preinstalled in a Linux distribution):
|
AUTOMATIC INSTALLATION
A dedicated python script allows to install GoSam-2.0 and all dependencies fully automatically. To use the script installation simply download the this link or directly from the command line with:
wget http://gosam.hepforge.org/gosam_installer.py
Save the file in the desired folder. By default GoSam will be installed in a subdirectory ./local of the directory where the script is saved. An alternative installation path can be specified using the option:
--prefix=path/to/install
To run the script execute the following commands:
chmod +x gosam_installer.py python3 gosam_installer.py [--prefix=path/to/install]
or alternatively:
python3 gosam_installer.py [--prefix=path/to/install]
Upon installation, the installer will ask some questions, which are described in more detail in the manual.
To use the default installation all the questions can be “answered” by pressing the ENTER key.
The installer will check if QGRAF and FORM already exist on the system. If they are not found, one can either press ENTER to have them installed by the script, or provide a path to the binary (tab-completion can be used).
If they are found, their version is checked, and if needed the installation of a version which has been tested to run with GoSam is suggested. As soon as all questions are answered, the main installation process will start. The components will be downloaded, built and installed.
The whole procedure can take about 10-30 minutes.
At the end, a script gosam_setup_env.sh will be created in the bin/ subdirectory of the install location, which will set (temporarily) all environment variables as soon as the script is sourced into a shell with the command
source [path]/gosam_setup_env.sh
The installer also gives a recommendation how these environment variables can be set permanently. The script can be used in all tcsh- and bash-compatible shells.
All files which have been installed are tracked in the installer-log.ini file. It is important to keep this file and the install script. They are needed to update and uninstall GoSam.
MANUAL INSTALLATION
Dependencies for manual installation
In order to be able to generate codes to compute one-loop amplitudes, some further codes apart from GoSam itself need to be installed on your machine. We recommend to install the different packages in the following order:
Installation of QGRAF
For the installation of QGRAF we refer to the original QGRAF webpage
Installation of FORM
For the installation of FORM we refer to the original form webpage. It is important that the version of FORM is 4.0 or more recent.
We recommend following version: https://github.com/vermaseren/form/releases/tag/v4.1-20131025.
Installation of the gosam-contrib suite
The gosam-contrib suite is available both as tarball or from an svn repository. For update purposes we encourage the installation from the svn repository. The package bundles different codes and allows to install them simultaneously with a single installation procedure.
Installation from svn repository:
To download the package from the svn repository
-
Go to the desired folder where you wish to place the source code
-
Type from there
svn co http://gosam.hepforge.org/svn/gosam-contrib-2.0/ my_gosam_contrib_dir
-
Enter into the newly created my_gosam_contrib_dir directory
cd my_gosam_contrib_dir
-
Run the configuration and installation
./configure --prefix=/desired/installation/path/to/gosam-contrib-2.0 make make install
where /installation/path/to/gosam-contrib-2.0 corresponds to the desired installation location, which we strongly recommend to set. Lastly, if the installation path of the package is different from the default, do not forget to update the environment variable \$LD_LIBRARY_PATH by adding the following in the .bashrc file:
export LD_LIBRARY_PATH=/installation/path/to/gosam-contrib-2.0/lib:\$LD_LIBRARY_PATH
or alternatively, in the .cshrc file:
setenv LD_LIBRARY_PATH (\$LD_LIBRARY_PATH):/installation/path/to/gosam-contrib-2.0/lib
Installation from tarball:
To install the suite from the tarball follow this steps:
-
Download the tarball from this link: gosam.hepforge.org/gosam-contrib-2.0-latest.tar.gz
-
Save it into the desired folder
-
Unpack the tar.gz file with
tar xzvf gosam-contrib-2.0-latest.tar.gz
-
Enter into the newly created folder
cd gosam-contrib-2.0
-
Run the configuration and installation following point 4. of the svn installation above. Please, refer to the links below for full reference or if you prefer a seperate installation of the individual packages:
Installation of GoSam
Similarly to the gosam-contrib package, also GoSam is available as tarball or from an svn repository. Again for update purposes we encourage the installation from the svn repository.
Installation from svn repository:
To download the package from the svn repository
-
Go to the desired folder where you wish to place the source code
-
Type from there
svn co http://gosam.hepforge.org/svn/branches/gosam-2.0 my_gosam_dir
-
Enter into the newly created my_gosam_dir directory
cd my_gosam_dir
-
Install GoSam with the python setup.py script typing
python setup.py install --prefix=/desired/installation/path/to/gosam
where /installation/path/to/gosam corresponds to the desired installation location, which we strongly recommend to set. Lastly, if the installation path of the package is different from the default, do not forget to update the environment variable \$PATH by adding the following in the .bashrc file:
export PATH = /installation/path/to/gosam/bin:\$PATH
or alternatively, in the .cshrc file:
setenv PATH (\$PATH):/installation/path/to/gosam/bin
Installation from tarball:
To install the package from the tarball follow these steps:
-
Download the tarball from this link: gosam.hepforge.org/gosam-2.0-latest.tar.gz.
-
Save it into the desired folder
-
Unpack the tar.gz file with
tar xzvf gosam-2.0-latest.tar.gz
-
Enter into the newly created folder
cd gosam-2.0
-
Run the configuration and installation following point 4. of the svn installation above.