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

MPI support in HDF5_jll / NetCDF_jll on Windows? #8523

Open
Alexander-Barth opened this issue Apr 24, 2024 · 3 comments
Open

MPI support in HDF5_jll / NetCDF_jll on Windows? #8523

Alexander-Barth opened this issue Apr 24, 2024 · 3 comments

Comments

@Alexander-Barth
Copy link
Contributor

Alexander-Barth commented Apr 24, 2024

Since HDF5_jll is built with MPI support, NetCDF_jll and the wrapper NCDatasets.jl can use parallel IO.
NetCDF+MPI works well on Linux and MacOS X, however it does not work on Windows.

By looking at the build log files it seems that HDF5_jll (1.14.3) has not detected the MPI libraries on Windows:

https://github.com/JuliaBinaryWrappers/HDF5_jll.jl/releases/download/HDF5-v1.14.3%2B3/HDF5-logs.v1.14.3.x86_64-w64-mingw32-libgfortran3-cxx03-mpi+microsoftmpi.tar.gz

Features:
---------
                     Parallel HDF5: no
  Parallel Filtered Dataset Writes: no
                Large Parallel I/O: no

Similarily with NetCDF_jll (400.902.211) the parallel support seem to be missing from the Windows NetCDF_jll:

https://github.com/JuliaBinaryWrappers/NetCDF_jll.jl/releases/download/NetCDF-v400.902.211%2B0/NetCDF-logs.v400.902.211.x86_64-w64-mingw32-mpi+microsoftmpi.tar.gz

checking whether parallel io is enabled in hdf5... no
checking for library containing H5Dread_chunk... none required
checking for library containing H5Pset_fapl_ros3... none required
checking whether HDF5 allows parallel filters... yes
checking whether szlib was used when building HDF5... yes
checking whether HDF5 library is version 1.10.6 or later... yes
configure: WARNING: Parallel io disabled for netcdf-4 because hdf5 does not support
checking whether parallel I/O is enabled for netcdf-4... no
# Features
--------
Benchmarks:		no
NetCDF-2 API:		yes
HDF4 Support:		no
HDF5 Support:		yes
NetCDF-4 API:		yes
CDF5 Support:		yes
NC-4 Parallel Support:	no
PnetCDF Support:	no

Do you have any ideas what could be the issue?
CC: @eschnett @visr
Ref: Alexander-Barth/NCDatasets.jl#122

@eschnett
Copy link
Contributor

We disable MPI for 32-bit Windows builds in the HDF5 build script because

        # Do not enable MPI; the function MPI_File_close is not defined
        # in the 32-bit version of Microsoft MPI 10.1.12498.18

We disable MPI for 64-bit Windows builds because

        # Do not enable MPI
        # Mingw-w64 runtime failure:
        # 32 bit pseudo relocation at 0000000007828E2C out of range, targeting 00007FFDE78BAD90, yielding the value 00007FFDE0091F60.
        # Consider: https://www.symscape.com/configure-msmpi-for-mingw-w64
        # gendef msmpi.dll - creates msmpi.def
        # x86_64-w64-mingw32-dlltool -d msmpi.def -l libmsmpi.a -D msmpi.dll - creates libmsmpi.a

It seems that there might be a way to make MPI work for 64-bit Windows systems following the pointers in the comments. I do not have access to a Windows system for testing (I can only cross-compile via Yggdrasil) and this makes debugging difficult for me.

Either way, the MPI library available to us on Windows is quite old and is based on an ancient version of MPICH. It would be nice to have a modern MPI implementation for Windows if we want to support MPI there.

Unless you are really interested in use MPI on Windows systems, you could take a similar approach and disable MPI support for NetCDF on Windows systems.

@Alexander-Barth
Copy link
Contributor Author

Alexander-Barth commented Apr 24, 2024

Thanks a lot @eschnett ! I don't have access to a Windows system either. Maybe we can leave this issue open in case there would be a volunteer able to debug this issue on Windows?

I will also disable NetCDF with MPI on Windows for now.

(I had checked build_tarballs.jl, but I did not noticed that the elif false despite the comment mentioning that the 64-bit case was disabled. Thank you for pointing that out).

P.S. Pretty sad to see how unimportant MPI seems to be for Microsoft (https://github.com/microsoft/Microsoft-MPI/graphs/contributors)

@visr
Copy link
Contributor

visr commented Apr 25, 2024

Yeah disabling MPI support in Windows like HDF5 makes sense for now.

I can do checks on Windows, but right now I don't have the need or time to push for MPI support on Windows.

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

3 participants