installing OpenMPI or MPICH2 in MSYS2-MinGW

Viewed 1603

I want to use any of the FLOSS implementations of MPI (i.e., OpenMPI or MPICH2) with my MSYS-MinGW environment and compilers. Please consider that I'm aware of the Microsoft MPI SDK mingw64/mingw-w64-x86_64-msmpi which you may find with

pacman -Ss msmpi

and install with

pacman -S msmpi

but I want to know if I can install any of the open-source implementations. I tried searching

pacman -Ss mpi

but there are too many results to check manually, and openmpi or mpich2 search queries do not return any results. So my questions are:

  • are any of the FLOSS implementations of MPI shipped with MinGW or MSYS2
  • if not how one can install them?

P.S.1. Cygwin does have some openmpi related packages, so it is a wonder why MSYS2, AFIK being a Cygwin fork, doesn't!

P.S.2. MPICH2 binaries are available here but they are way way behind the latest builds for other platforms. That's just sad!

P.S.3. Surprise that Microsoft's MPI implementation is actually open-source! It seems to be a fork of MPICH or at least compatible with it.

1 Answers

MSYS2's main objective is to provide you with an environment to build native Windows applications.

As such, it's natural that it will export bindings to the native Microsoft MPI implementation, while not providing ports of other MPI implementations such as OpenMPI or MPICH which have dependencies on a full POSIX layer.

From How does MSYS2 differ from Cygwin:

MSYS2 tries to provide an environment for building native Windows software. MSYS2 provides a large collection of packages containing such software, and libraries for their development. As a large portion of the software uses GNU build tools which are tightly coupled to the unix world, this environment is also POSIX-compatible, and is in fact based on Cygwin.

Cygwin tries to bring a POSIX-compatible environment to Windows so that most software that runs on unices will build and run on Cygwin without any significant modifications. Cygwin provides a large collection of packages containing such software, and libraries for their development.

There are more details on that page on how MSYS2 leverages Cygwin and a POSIX-compatible layer mainly to offer ports of tools needed in a build environment, mainly to support POSIX-like build systems (such as autoconf, make, meson, etc.), while mainly aiming at exposing these tools to support building Windows native binaries and porting applications to run natively on Windows.

Related