Installation of TurboRVB

The followings are very simple tutorials for installing TurboRVB. The details of the installation options are written in each GitHub repository.

If you have any problem on the installation, please visit TurboRVB Discussions and please post your problem.

Prerequisites

Before installing the packages, ensure you have the following prerequisites:

  • Git (for downloading source code)

  • CMake (version 3.20.0 or higher)

  • C/C++ compiler (gcc, g++, or Intel compiler)

  • Fortran compiler (gfortran, ifort, or Intel oneAPI)

  • OpenMP (for parallel computing support)

  • BLAS/LAPACK libraries (for linear algebra operations)

  • MPI (for parallel execution, optional)

  • CUDA Toolkit (for GPU support, optional)

On macOS, you can install some of these prerequisites using Homebrew:

% brew install cmake pkg-config openblas
% brew install open-mpi    # Optional, for MPI support
% brew install cuda        # Optional, for GPU support

On Ubuntu/Debian:

% sudo apt-get update
% sudo apt-get install cmake pkg-config libopenblas-dev
% sudo apt-get install libopenmpi-dev    # Optional, for MPI support
% sudo apt-get install nvidia-cuda-toolkit    # Optional, for GPU support

TurboRVB installation

  1. Please download the source codes from the GitHub repository.

% cd ~
% mkdir applications
% cd applications
% git clone https://github.com/sissaschool/turborvb.git
% cd ~/applications/turborvb
  1. Compile TurboRVB

% cd ~/applications/turborvb
% cmake -S . -B build
% cd build
% make -j 4

The following CMake options are available to customize your TurboRVB build:

Option

Description

EXT_SERIAL

Compile serial version (default: ON)

EXT_PARALLEL

Compile parallel version (default: ON)

EXT_OPT

Turn on optimization (default: ON)

EXT_DEBUG

Turn on debug mode (default: OFF)

EXT_TIME

Turn on internal time counter (default: OFF)

EXT_DFT

Compile DFT code (default: ON)

EXT_QMC

Compile QMC code (default: ON)

EXT_MODTEST

Compile module test tools (default: ON)

EXT_TOOLS

Compile auxiliary tools (default: ON)

EXT_GPU

Compile GPU version (default: ON)

EXT_LTO

Enable Link Time Optimization (default: OFF)

EXT_SPEEDTEST

Enable speed tests targets (default: OFF)

EXT_STATICPACK

Produce static packaging (default: OFF)

EXT_DETAIL

Produce more detailed config output (default: OFF)

EXT_NVTX

Turn on Nvidia NVTX ranges (default: OFF)

For example, to disable GPU support and enable debug mode:

% cmake -S . -B build -DEXT_GPU=OFF -DEXT_DEBUG=ON
  1. Test TurboRVB

% ctest

Note

If some tests fail, you can see detailed output by running:

% ctest --rerun-failed --output-on-failure

This will show the full output of the failed tests, which can help diagnose the issue.

  1. Copy the compiled binaries to bin/ directory

% cd ~/applications/turborvb
% cp build/*.x bin/
  1. Please add a PATH to the turborvb/bin directory to your environment

% # For bash users
% echo PATH=$HOME/applications/turborvb/bin:'$PATH' >> ~/.bashrc
% source ~/.bashrc

% # For zsh users
% echo PATH=$HOME/applications/turborvb/bin:'$PATH' >> ~/.zshrc
% source ~/.zshrc
  1. Check if it works

% which turborvb-serial.x

If the installation was successful, you should see the path to the executable:

/home/username/applications/turborvb/bin/turborvb-serial.x

Troubleshooting

Common issues and solutions:

  1. CMake not found

    If you get an error about CMake not being found, install it using your package manager:

    % # For Ubuntu/Debian
    % sudo apt-get install cmake
    
    % # For macOS with Homebrew
    % brew install cmake
    
  2. Compilation errors

    If you encounter compilation errors:

    • Ensure you have the required compiler installed

    • Check that all dependencies are satisfied

    • Try cleaning the build directory and rebuilding:

      % cd ~/applications/turborvb
      % rm -rf build
      % cmake -S . -B build
      % cd build
      % make -j 4