install.md

July 6, 2026 · View on GitHub

Tomofast-x Install

Installation instructions for Windows and Linux systems are provided below.

  1. Download and install oneAPI runtimes:
  1. Download and unzip the tomofast-x files from github so that you have some test data:
  1. Download the precompiled tomofast-x executable into the unzipped tomofast-x directory:
  1. Open a Command Prompt console from Start Menu (click on start icon then type cmd and the Command Prompt tool will be shown)
  • Once the console is open, type (including quotes where shown):
"C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
  1. Then change directory (linux command is cd) to downloaded tomofastx.exe directory, then type:
mpiexec -n 4 tomofastx.exe -p parfiles\Parfile_mansf_slice.txt

Windows Native (for compilation)

  1. Install Visual Studio Build Tools and C++ Desktop Tools
  1. Install IntelOne API Toolkit
  1. Optionally Install GNU Make for Windows [Optional, if you intend to compile tomofast-x rather than using a precompiled binary]
To compile the source code from scratch:
  • i. Download and unzip latest tomofast-x code from:

  • https://github.com/TOMOFAST/Tomofast-x

  • ii. Open x64 Native Tools Command Prompt from Start Menu → Visual Studio 2026 Directory

  • iii. Once the console is open, copy or type (including quotes):

 “C:\Program Files (x86)\Intel\oneAPI\setvars.bat”
  • iv. Then copy or type:
set PATH=%PATH%;C:\Program Files (x86)\GnuWin32\bin
  • v. Then change directory (linux command is cd so something like cd C:\Users\vogarko\Downloads\Tomofast-x-master) to unzipped Tomofast-x code directory, then copy or type:
make WINDOWS=1
  • vi. If the code compiles without error, it will create a new tomofastx.exe file and then you can test the code with:
mpiexec -n 4 tomofastx.exe -p parfiles\Parfile_mansf_slice.txt

Windows WSL

First install Windows Subsytem for Linux (WSL): Open Windows PowerShell or Windows Command Prompt in administrator mode by right-clicking and selecting Run as administrator, type in the following command on the command line

    wsl --install   

then restart your machine. This will also install the Ubuntu operating system wihin WSL (it will not affect your normal Windows system). Now follow the steps for Linux installation below.

Linux / MacOS

  1. Install gfortran compiler using the relevant install commands: https://fortran-lang.org/learn/os_setup/install_gfortran/
  2. Install OpenMPI library using the relevant install commands: https://docs.open-mpi.org/en/v5.0.x/installing-open-mpi/quickstart.html
  3. If not already installed, install git on your computer using the relevant install commands: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
  4. Download Tomofast-x code by entering:
    git clone https://github.com/TOMOFAST/Tomofast-x.git  
  1. Change to the tomofast-x directory and compile the code by entering the following command:
     make
  1. If the code compiles without error, it will create a new tomofastx file and then you can test the code with:
     mpirun -np 4 ./tomofastx -p ./parfiles/Parfile_mansf_slice.txt

Note that the Makefile by default assumes the gfortran (GCC) compiler. It can be switched to the Intel compiler by setting the flag "COMPILER = 2". To use the Intel compiler, you will need to install it separately on your system.