-
-
Notifications
You must be signed in to change notification settings - Fork 123
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
Minimum MPI Version Supported #39
Comments
Many real-world large-scale HPC systems provide quite conservative versions of software libraries such as MPI. I'm sure many of these don't provide MPI-3 yet. This means that requiring MPI-3 is out of the question. At the same time, I really appreciate some of the new features, such as split-phase global operations. Combined, this means that we need to autodetect the available MPI version. |
True, personally I try to stick with MPI-1 only for my large scale codes. You never know what MPI function is going to break on you at scale (we once had allgather break on us). @eschnett are you okay with requiring MPI-2, as we do now? Or should we make it optional as well. |
MPI-2 is from 1995; I hope that all relevant vendors support this standard. (Yes, I'm okay with requiring this.) |
@lcw, very true. An issue is that there can be a vast difference between satisfying the MPI-3 standard and providing an efficient implementation. An example is I am commenting here because this might also be relevant to @amitmurthy 's proposed work re #38 : If the the custom transport for a ClusterManager is to be implemented purely with MPI, some MPI-2 and MPI-3 features might be useful and/or necessary. |
I think the right thing to do is to have a minimum requirement of MPI-2, while using MPI-3 if available. I don't know if any of the major open source MPI libraries support MPI-3 yet. |
MPICH and Open MPI (which I would presume account for the vast majority of open-source MPI installations) both adhere to the MPI-3 standard. |
Yes, those are the major ones. Good to know. Thanks. |
I find that in particular the MPI-3 function |
It seems we now require MPI 3, and had a build failure in the wild as a result: https://discourse.julialang.org/t/error-building-mpi-already-tried-setting-cc-fc/17817. In particular, that user reported the Ubuntu 16.04 package for OpenMPI installed MPI 2, not MPI 3. |
Maybe we should just ship openmpi binaries using BinaryBuilder, that way it will work out of the box for everyone. I'm not sure how well this would cross-compile for Windows, but if it does it might even be a good way to get rid of the Windows-specific code? We should of course keep config options so an already installed MPI can be used if desired. |
I think the better solution is to add version checks to the files in |
@barche Sometimes a system's MPI library is built against hardware-specific libraries to use specific drivers and particular hardware. It is also often necessary to configure MPI so that it knows which network devices to use. Otherwise it won't work; hence, the "out of the box" is difficult to achieve. |
Yes, of course it would not cover all use cases, but it would make it easier for other packages to depend on MPI.jl and "just work" within the confines of the BinaryBuilder dependency chain. The Ubuntu package is also a one-size-fits-all MPI binary, so it shouldn't matter there if our binary is used instead. Clusters also typically offer different versions of MPI, so it shouldn't be too hard to pick one that works? Is MPI3 really that unsupported? If so, adding version checks seems to be indeed a necessity. |
Yes. The Blue Gene at my school still doesn't support all of MPI 2. HPC systems with custom MPI implementations may never update the MPI implementation from when the system is first designed (and the systems have a service life of ~10 years). |
I created a proof of concept for finding in what version of MPI a symbol first appears here. |
It would be useful to have a BinaryBuilder-supplied MPI that could be used for local testing, along with a way to override to use a specific MPI when available. |
I don't agree with having a BinaryBuilder-supplied MPI being the default. What would happen if a package pulls-in |
Yes, it's debatable what should be the default. Maybe we could also detect if an MPI is already installed and loaded? I also think a cluster user would be more inclined to double-check the correct MPI is used. |
This would make more sense. On a related note, I personally think that a much more urgent thing would be to make I had started to experiment in splitting the build phase into 5 parts (versions 1.0, 1.1, 2.0, 3.0, 3.1). I don't have the time now, but if we agree on how the feature should be implemented I could hopefully get back to it after the summer. |
Yes, the version compatibility is a must-have, I had planned to look at it too, but I haven't even gotten round to looking at @JaredCrean2 's work. |
I had experimented with having a I would then compile each one of them, and at the first failure I would stop and consider the previous version as the maximum supported MPI version. Ugly, but it was working. Though I'm sure there must be an easier way to do it. |
On a cluster, it is typically a non-trivial decision to find out which MPI library to use, to make it available (by loading modules or setting paths), and how to run with that version. It's quite easy to get confused and to build, link, and run with inconsistent MPI versions, leading to run-time errors (at best). I think a BinaryBuilder provided version should be the default, combined with a simple way to output the MPI configuration that is used to aid debugging. In particular if a package pulls in I wish it was possible that the default was "it just works for a cluster", but that isn't possible. Configuring things properly on a cluster (using a queuing system etc.) just isn't feasible. |
Yes, maybe it's too simplistic, but I assumed that on a cluster the user would load the required module before starting Julia, and we could just use whatever MPI is in the path, or the BinaryBuilder one if none is found. |
Did you also look at the |
Yes I had, and it does not change much. The reason of my try-catch approach is that I work on a cluster that has a custom MPI distribution which does not support Besides, when you detect the right |
The easiest solution would be to use environment variables (say |
Typically, one cannot just call |
In #271 I've exposed an It seems like some libraries (e.g. MS-MPI) do partially add functionality from newer versions, so we may want a way to enable functionality beyond what is officially supported by the reported version. It would be good to test the selective versioning: I guess one option is to test against an older version of MPICH/OpenMPI? |
Apparently now MPICH is supposed to be ABI compatible with many of its derivatives (though, interestingly, not Microsoft MPI): |
cc: @andreasnoack , @ViralBShah , @eschnett , @amitmurthy
A pull request from @steven-varga with an MPI-3 function brought up this issue. What should be the minimum supported MPI version for this wrapper?
Right now we are using some things from MPI-2 for the types so that is probably as low as we should go but should we require MPI-3? From this document it looks like most major MPI implementations have MPI-3 support or are planning it. The major exception seems to be Microsoft MPI.
We can at compile time determine the MPI version with the constants
MPI_VERSION
andMPI_SUBVERSION
--- see MPI-1.3 Standard section 7.1.1 for more info --- so we could only bring in MPI-3 functions if the library supports it but it makes the wrapper a little more complicated.Does anyone have any thoughts or concerns on this front?
The text was updated successfully, but these errors were encountered: