-
Notifications
You must be signed in to change notification settings - Fork 8
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
should the ABI support mpif.h? #834
Comments
There is precedent in excluding |
I'd welcome an explicit statement that the feature is applied or not applied to deprecated features. Not specifying that const-ness is not/ applied for deprecated functions was annoying for tools. |
Many Fortran users would likely benefit from ABI support as it will ease
code deployment. Compiling for older Fortran versions has typically been
more reliable. Thus people with programs they wish to run without
modifications may choose to stay with older implementations of the MPI
standard and recompile as needed. Fortran developers are not heavily
engaged with the MPI Forum, and there are options such as CAF which some
developers may choose for new programs. It maybe helpful to directly
seek input from parallel Fortran code developers, for example from
Quantum Espresso, maybe creating a list of example Fortran MPI codes is
helpful - a MPI Fortran Users group list in addition to the MPI Fortran WG.
|
Three large projects that currently use PETSc and Quantum Espresso both support |
https://fortran-lang.discourse.group/t/should-the-mpi-abi-support-mpif-h/ |
HDF5 uses ScaLAPACK only uses MPI Fortran support in test programs, not the library itself: WRF is so good at MPI Fortran, it deletes In any case, I can fix ScaLAPACK and HDF5 easily enough. I don't know whether or not the WRF people can be helped.
|
https://github.com/Nek5000/Nek5000 uses |
HDF5 is known for breaking their API in minor (and sometimes even patch) releases. Thus updating to a newer HDF5 version isn't always straightforward. |
I am fine with not providing an official ABI for That said I just opened a PR for HDF5 ... |
The question isn't really whether there is an "ABI for |
The practical question boils down to using COMMON or not. If we put sentinels in COMMON, mpif.h is easy but we use obsolescent Fortran. If we put sentinels in a module, we can't do mpif.h at all with that. However, implementations could still support it by adding duplicate sentinels in COMMON and checking for both of them in the layer that calls C. If we are going to delete mpif.h in MPI 5, it sucks to have to design the ABI around it. |
All current MPI implementations use common blocks in their current implementation. That makes it easy for them to support an ABI that also uses common blocks; implementations "only" have to redefine the constants. Switching away from this adds a burden. |
|
It takes 2 minutes to implement in a module. COMMON has been obsolescent for 34 years. |
I would also prefer not to pursue ABI standardization for mpif.h for similar reasons to those noted above. |
If an MPI ABI cannot support |
This to me seems like a correct next step for deprecation of |
MPI.mod will support the ABI. I will not bend on this. Over half of our users are using that version of the API. |
I'm for ignoring |
Section 19.2 (Support for Large Count and Large Byte Displacement in MPI Language Bindings) has this text:
Something similar could be added to whatever section we'll have about the Fortran ABI:
|
I disagree with the statement "It does not break anything". Technically this is true. However, the main point of a standard ABI is to simplify interoperability between different MPI implementations without requiring people to change their codes. The switch could be as simple as switching from Yet, if people now find that they'll have to modify their codes be compatible with the newest (yet-to-be-released) version of HDF5, or have to patch HDF5, or have to make (straightforward, but still) changes to their codes, then this will hinder acceptance of the ABI. Building and installing codes is a complex task, and upgrading dependency versions is non-trivial. If you want to push people away from using What seems to happen here is that a standardization process (a common ABI) that has the chance to greatly benefit the community is co-opted for another goal, namely asking people to modernize their codes. The MPI standard chose a time scale for phasing out |
That is all I care about. Codes will run the same way they run today. Want an ABI? Change to
You will still get
Absolutely not. The day we stop shipping
There is no official timeline, and that is part of the problem here. HPC moves at glacial speeds so anything that helps us get rid of a feature whose use has been discouraged for a decade within the next two decades is welcome. By not providing an ABI for |
The ABI can be implemented in As I've noted before, any implementation can support the ABI including sentinels in |
The MPI standard doesn't allow multiple values for sentinels in Fortran. See e.g. section 19.3.6 "MPI Opaque Objects"; this describes how buffer addresses can be converted between C and Fortran. This section clearly assumes that the value of |
I'm aware of that, but don't really care, since I don't see a reasonable scenario where it matters. |
An MPI implementation needs to be able to provide the ABI without breaking the MPI standard. The suggestions regarding
|
the easiest change is to omit mpif.h from the ABI. i'm not aware of any serious objections to deleting it in MPI 5.0. we could always pull that in and do it in 4.2. |
@hzhou posted another option on the mpich mailing list: make mpi.h a wrapper for use mpi. Would this be a feasible way to provide backwards compatibility for legacy codes assuming compilers would accept use mpi wherever the code includes mpi.h? |
Unfortunately it is not possible to make |
@eschnett Thanks for pointing that out. |
Problem
mpif.h
was deprecated in 4.1. If I understand correctly, we do not need to worry about deprecated features anymore. This means that the ABI standardization effort can ignorempif.h
.The reason this matters is that buffer sentinels must be implemented using Fortran
COMMON
, which itself has been obsolescent since Fortran 90 (34 years ago).If we permit ourselves to ignore
mpif.h
from the ABI effort, we can avoid usingCOMMON
, because the sentinels will be in a module (use
d by both theMPI
andMPI_F08
modules).A side effect of this is that it motivates Fortran users to stop using
mpif.h
in order to get the ABI. The downside is that way too many people still usempif.h
and if they stubbornly refuse to change, then it hurts ABI adoption.Proposal
I want the MPI Forum to express its opinions about this decision.
Changes to the Text
TBD
Impact on Implementations
Not having to worry about
mpif.h
for the ABI effort might save some effort, but it's not a big deal.Impact on Users
Users of
mpif.h
will not be able to adopt the standard ABI.References and Pull Requests
#958
The text was updated successfully, but these errors were encountered: