There are several methods available to get MPI on Windows, including
or Windows Subsystem for Linux
We often use MPI via MSYS2 with GCC / Gfortran compilers on Windows:
Download and install Microsoft MS-MPI
mpiexec.exeavailable by adding to user PATH:
C:\Program Files\Microsoft MPI\Bin– this is needed even when using MSYS2.
Install MSYS2 MS-MPI library from the MSYS2 Terminal
pacman -S mingw-w64-x86_64-msmpi
We didn’t use OpenMPI because it is not currently available for native Windows.
Upon installing or updating Intel oneAPI compilers and libraries on Windows, you may experience CMake failing to find MPI for MinGW. This happens because Intel compilers put Intel MPI on the system PATH. Fix this by removing Intel MPI from the system PATH and use the Intel Compiler shell instead, which provides all the needed directories.