Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building MPICH on Windows #7280

Open
eschnett opened this issue Jan 26, 2025 · 4 comments
Open

Building MPICH on Windows #7280

eschnett opened this issue Jan 26, 2025 · 4 comments

Comments

@eschnett
Copy link
Contributor

I want to build MPICH on Windows; specifically, I want to cross-build it for a mingw32 environment. Any global statements on this endeavour would be appreciated.

As background: The Julia community build MPICH for many architectures, and uses it (see https://github.com/JuliaBinaryWrappers/MPICH_jll.jl) as one of the backends for the MPI.jl package. This makes it straightforward to use MPI everywhere. In many cases, MPI may just be used "under the hood" when running a Jupyter notebook on a laptop, without people knowing it's actually there, but this allows us e.g. to provide other parallel packages (FFTW, HDF5, PETSc, ...) as binaries.

I'm aware that an antediluvian copy of MPICH was forked and is available as MicrosoftMPI. This package is too old for our purposes, and many important features are missing. So, I'm trying to build a modern MPICH for Windows.

I'm currently stuck on the header file sys/socket.h, which is used by MPL. My question is: How do I build MPICH without support for sockets? (I realize that this is a rather invasive change, and I'm not saying that the resulting library would be useful in an actual HPC environment.) I tried the configure options --with-pm=none --disable-romio to disable Hydro and ROMIO, as these two subsystems seem to require MPL. However, MPL is still built.

@hzhou
Copy link
Contributor

hzhou commented Jan 27, 2025

We haven't supported building MPICH on Windows for quite a while, mainly due to a lack of interest. That said, if you are interested and are willing to spend effort, we can work together to get the support back. Last I checked, MPICH is able to build on WSL. I haven't checked with MinGW, but I think it is possible with the ch3:socket channel. If unix socket isn't available, then we need to build a port on WinSock. Start with src/mpl/include/mpl_sockaddr.h, which abstracts most of the socket functions in MPICH.

@eschnett
Copy link
Contributor Author

Thanks for the information. This sounds as if it required a new backend ("channel"?), which sounds more work than I was hoping for.

@hzhou
Copy link
Contributor

hzhou commented Jan 27, 2025

Not really. mpl is MPICH's utility lib. It abstracts away some of the platform and compiler dependency. But yeah, it is quite involved. I estimate it's about a week's effort. If it's not urgent, we can put the work on TODO.

@eschnett
Copy link
Contributor Author

It is definitively not urgent. The current status quo is that we build binaries for packages "with MicrosoftMPI", while in reality we might just punt and build a serial version for Windows. In practice that's probably good enough for Windows systems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants