Installation#

MPPT combines a Python/PySCF frontend with C, C++, and Fortran executables. The supported workflow requires all parts to use the same HDF5 and numerical library environment.

Requirements#

  • Linux with C, C++, and Fortran compilers.

  • CMake 3.27 or newer.

  • Python 3.11 or newer.

  • GNU Fortran 10.1 or newer when GNU compilers are used.

  • BLAS, LAPACK, OpenMP, and HDF5.

The supplied mppt_env.yaml installs the Python and numerical dependencies, but the host still needs a working Fortran compiler.

Clone The Repository#

Release snapshots include the exact pinned cipsixx source under external/cipsixx, so no private dependency checkout is required:

git clone https://gitlab.com/seregmikhail/mppt-public.git mppt
cd mppt

For another source layout, ensure external/cipsixx contains the pinned source or set MPPT_CIPSIXX_SOURCE_DIR explicitly. If cipsixx is intentionally unavailable, configure with -DMPPT_ENABLE_CIPSIXX=OFF; the unified selection stage will not be available.

Create The Environment#

conda env create -f mppt_env.yaml
conda activate mppt

Use one environment for CMake discovery, the Python package, and runtime HDF5 libraries. Mixing system and conda HDF5 installations commonly causes link or runtime loader failures.

Configure And Build#

From the repository root:

cmake -S . -B build \
  -UBLAS_LIBRARIES \
  -ULAPACK_LIBRARIES \
  -DCMAKE_BUILD_TYPE=Release \
  -DCMAKE_PREFIX_PATH="$CONDA_PREFIX" \
  -DHDF5_ROOT="$CONDA_PREFIX" \
  -DOpenMP_gomp_LIBRARY="$CONDA_PREFIX/lib/libgomp.so.1" \
  -DMPPT_ENABLE_CIPSIXX=ON \
  -DMPPT_COPY_TO_HOME_BIN=OFF \
  -DINSTALL_PYSCF2MPPT=OFF

cmake --build build --parallel 1

The serial build is intentional for the current mixed-language target graph. Core executables are written to build/bin; the main ones are cipsixx_select, diagpt, and heffso.

Install the Python CLI separately so an ordinary CMake build does not mutate the active environment:

python -m pip install --no-cache-dir -e "./pyscf2mppt[test]"
export PATH="$PWD/build/bin:$PATH"
pyscf2mppt --version

cmake --install does not install every core executable. Use build/bin for the compiled workflow tools.

Build Options#

Option

Default

Effect

MPPT_ENABLE_CIPSIXX

ON

Build the pinned HDF5 selector. Requires HDF5 and the cipsixx source tree.

WITH_MKL

OFF

Use oneMKL BLAS/LAPACK.

WITH_MKL_SPARSE

OFF

Build the oneMKL sparse HEFFSO backend.

WITH_CUDA_SPARSE

OFF

Build the experimental CUDA/cuSPARSE HEFFSO backend.

WITH_LIBGRPP

OFF

Enable libgrpp discovery/build support.

MPPT_ENABLE_FORTUNO_TESTS

ON

Fetch and build DIAGPT/HEFFSO unit tests.

MPPT_COPY_TO_HOME_BIN

ON

Copy built executables and scripts after a build.

MPPT_HOME_BIN_DIR

~/bin

Destination used by the optional convenience copy.

INSTALL_PYSCF2MPPT

ON

Install the Python package during cmake --install.

Only enable MKL or CUDA after the portable build works. See HEFFSO build and usage for backend-specific configuration.

PRIMME is not optional. CMake fetches the repository-pinned PRIMME 3.2.3 revision and builds its static LP64 library. Configuration or compilation stops when the dependency cannot be fetched or built; neither DIAGPT nor HEFFSO has an alternate eigensolver path.

When INSTALL_PYSCF2MPPT=ON, CMake installs only from the local PYSCF2MPPT_SOURCE_DIR. Configuration fails if that directory does not contain pyproject.toml; there is no network fallback to a moving package revision.

Verify The Installation#

The Python and compiled unit suites use the current checkout and build tree:

python -m pytest -q pyscf2mppt/tests
ctest --test-dir build --output-on-failure -L Unit

The repository-level test-light target injects exact CMake target paths into workflow tests:

cmake --build build --target test-light

When a workflow test.sh is run directly, it defaults to build/bin; set MPPT_BIN_DIR only when testing another build tree.

Continue with the quick start after the CLI and unit tests work.