-
Notifications
You must be signed in to change notification settings - Fork 7
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
Fortran pair types #70
Comments
@jeffhammond , do you plan to work on this for the December timeframe; we need a champion to get this ready for reading. Otherwise, who else could we encourage to write it up? Thanks, |
I seriously doubt I will have time for this for December. My priority is #23. |
Ok thank you ; I’ll focus on big Mpi —- and see if we can find a fortranner for this one
|
Predefined MPI_Op only apply to predefined MPI_Datatype. This dynamic creation of datatypes would require to also extend the definition of predefined ops and datatypes. |
Problem
The current list of enumerated pair types is rather limiting, particularly in Fortran. The Fortran pair types are designed for Fortran 77, which does not support anything like a C
struct
. Fortran 90+ supports user-defined types. Given that the MPI standard has never been compliant with Fortran 77, and we now have explicit support for Fortran 2008, we should leverage Fortran 90 features to improve pair types (which are used inMPI_MAXLOC
andMPI_MINLOC
reductions, of course).This is a future-proof solution to the challenge of enumerating all the potentially valid pair types, which was proposed in #18. This or something similar is essential if and when we add large-count support to MPI (see https://github.com/mpiwg-large-count/large-count-issues/issues for details).
Proposal
We can create a pair type constructor along the lines of
MPI_Type_create_f90_real
......that returns to the user the predefined defined associated with the following Fortran type:
Note that this is a special case of
MPI_Type_create_struct
that only returnsMPI_SUCCESS
when the resulting type is valid for use withMPI_MAXLOC
andMPI_MINLOC
.Changes to the Text
TODO
Impact on Implementations
This is a special case of
MPI_Type_create_struct
so the implementation is quite simple. Implementers merely need to determine what pair types are valid and only support those.Having a separate function for this makes it easier to do error checking for the user.
Impact on Users
This function allows Fortran users to use modern language features instead of the awkward hacks
MPI_2REAL
,MPI_2DOUBLE
, andMPI_2INTEGER
. It also allows Fortran users to perform M**LOC reductions over more types, such as when the array values areINTEGER*8
and the locations areINTEGER
, which is oftenINTEGER*4
.References
The text was updated successfully, but these errors were encountered: