1

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.

Foad
  • 7,892
  • 8
  • 38
  • 126
  • 1
    MSYS2 is not really a fork of Cygwin. While the projects are related and somewhat similar, they're also different. See https://github.com/msys2/msys2/wiki/How-does-MSYS2-differ-from-Cygwin – filbranden Mar 14 '20 at 02:22
  • @filbranden Oh, I didn't know that. I used [this post](https://stackoverflow.com/a/25023611/4999991) as a reference. – Foad Mar 14 '20 at 02:23

1 Answers1

1

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.

filbranden
  • 6,980
  • 2
  • 7
  • 23
  • Thanks. But I'm still not convinced why OpenMPI and MPICH2 shouldn't be compilable with/inside MSYS2-MinGW. You are saying MSYS2 is POSIX-compatible but OpenMPI/MPICH2 requires "full POSIX layer". So what is missing in MSYS2 stoping a complete port of that software? – Foad Mar 14 '20 at 02:48
  • 2
    @Foad I'd classify OpenMPI and MPICH2 mainly as *libraries* to link to the program you're building or porting. As such, to use these libraries you need your program to use a POSIX-emulation layer. But MSYS2 is a POSIX-emulation layer meant for your *build* environment, not for the binaries you build with it. If you want the binaries you build to use a POSIX-emulation layer, what you want is Cygwin... – filbranden Mar 14 '20 at 03:21