How to install SU2 in MPI mode

2 minute read


  1. Python3. See how to install Python3
  2. Swig. See how to install swig

  3. For Windows, MinGW-w64 version 8.1.0 download here. See how to install MinGW

  4. Install a MPI implementation.
  5. Install MPI for Python (mpi4py)

  6. It is not needed to install Meson, Ninja, CoDiPack and MeDiPack beforehand. SU2 installation process does that for you and ensures the correct versions.



Installing from binaries

  1. Download the zipped package containing the binary executables from

  2. Unzip the package in a directory of your preference. It is a good idea to avoid spaces in the address.

Installing from source files

Linux and macOS
  1. Make sure you are using bash.
     echo $SHELL
     # if it is not bash, command: bash
  2. Create a folder for SU2
     mkdir /home/you/su2
  3. Download to that folder the latest stable source code version of SU2 from:

  4. Unzip the file
  5. Create a build folder
     mkdir /home/you/su2/build
  6. Enter the unziped su2 source code folder and run mason, giving the full address of the build folder above in the prefix argument:
     cd /home/you/su2/su2code...
     ./ build -Denable-autodiff=true --prefix=/home/you/su2/build
  7. Compile with ninja
     ./ninja -C build install


It works for Windows 10 and it is expected to work for newer versions as well.

  1. Download SU2 v7.x.x download here

  2. Install Microsoft MPI by simply executing the installers msmpisetup.exe and the msmpisdk.msi.

  3. Install MinGW by executing the installer mingw-w64-install.exe. Choose Version 8.1.0 and Architecture x86_64 on the Settings page. Everything else can stay on their default values. On the next page set a destination folder and remember it! Click next until everything has been downloaded and installed.

  4. In the file browser go to the mingw installation directory and execute the file mingw-w64. This should open the command prompt. Navigate to the SU2 source code directory.

  5. Create a build folder.
     mkdir build
  6. Enter the unziped su2 source code folder and run mason, giving the full address of the build folder above in the prefix argument:
     python build -Denable-autodiff=true --prefix=/home/you/su2/build
  7. Compile with ninja
     ninja.exe -C build install

Setting Environment variables

In order to use the executables from any directory without explicitly specifying the path to the executable you should set some environment variables.

Linux and macOS

Either add the following lines to your ~/.bashrc or ~/.bash_profile to be permanent, or type the commands into the terminal for temporary use. Assuming that is the path to the SU2 binaries (i.e. the folder that contains SU2_CFD etc. If you have built SU2 from source, it will be the path that you specified with the --prefix option):

export SU2_RUN=<install_path>
export PATH=$SU2_RUN:$PATH

The export commands are also printed after a successful configuration using


Search for “Environment Variables” in Windows Search. At the bottom “System Variables” panel, add to the “Path” variable: .

Learn more

Install on Windows



Leave a comment