Building and Installation
This page guides you through the process of installing MCHEP and its dependencies for different environments.
Rust API
MCHEP provides several optional features such as mpi to enable distributed integration
using MPI, gpu to enable GPU acceleration using the Burn framework, and simd to enable
SIMD-optimized routines (enabled by default).
C/C++ API
The C/C++ API can be installed using a pre-built binary script or built from source.
Use the provided installation script to download and install the latest pre-built binaries:
curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/QCDLab/mchep/refs/heads/master/install-capi.sh | sh
To pass the installation directory for where to put the files, change the arguments of the shell as follows:
By default, the script will download the latest stable release. If you would like a specific
version, pass the version along with --version:
This script automatically detects your platform, downloads the correct tarball from GitHub, and configures the pkg-config files.
Environment Configuration
After installation, make sure your environment variables are set:
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
Verify the installation: