I just resend Reinhold's answer to the list for the case that Reinhold is not member of the list. I'll try to call him to better understand his answer; and then he or I will come back. _________________ Hello Rolf, apologies for the delayed response. Here my comments: 1. If an MPI implementation already implements the specifics with assumed rank dummy arguments (with run-time checks for conformity of rank and shape), making these ELEMENTAL would not be possible. One would need to change the implementation to have scalar arguments. Similar if multiple specifics for different ranks are implemented. 2. Adding ELEMENTAL in an implementation will necessitate recompilation of application codes 3. Lack of portability for application codes seems to me to be less of a problem than it is now, i.e., adding the ELEMENTAL requirement in the spec would simply assure that implementations are not permitted to limit themselves to the scalar case. Regards Reinhold
-----Ursprüngliche Nachricht----- Von: Rolf Rabenseifner <[email protected]> Gesendet: Dienstag, 8. März 2022 11:59 An: Bader, Reinhold <[email protected]> Cc: Jeff Hammond <[email protected]>; MPI-WG Fortran working group <[email protected]> Betreff: Re: [MPIWG Fortran] "ELEMENTAL" keyword on mpi_f08 comparison operator functions
Hello Reinhold,
can you give as background information about this question on ELEMENTAL below.
Our MPI handles are defined according to MPi-4.0 page 18 as
TYPE, BIND(C) :: MPI_Comm INTEGER :: MPI_VAL END TYPE MPI_Comm
and same for MPI_Group, ...
The MPI standard specifies for both the mpi and the mpi_f08 module:
mpi_f08 in MPI-4.0 Section 19.1.2 page 793 lines 23-24:
* Overload the operators .EQ. and .NE. to allow the comparison of these MPI handles with .EQ. , .NE. , == and /= .
mpi module in MPI-4.0 Section 19.1.3 page 795 lines 35-37: * Defi
ne the derived type MPI_Status and all named handle types that are used in the mpi_f08 module. For these named handle types, overload the operators .EQ. and .NE. to allow handle comparison via the .EQ., .NE., == and /= operators.
Best regards Rolf
----- Original Message -----
From: "MPI-WG Fortran working group" <[email protected]> To: "MPI-WG Fortran working group" <[email protected] forum.org> Cc: "Jeff Hammond" <[email protected]> Sent: Tuesday, March 8, 2022 11:01:13 AM Subject: Re: [MPIWG Fortran] "ELEMENTAL" keyword on mpi_f08 comparison operator functions
It should be correct to add ELEMENTAL here and we should encourage that.
I would argue that we should require ELEMENTAL in the place where it says:
* Overload the operators .EQ. and .NE. to allow the comparison of these MPI handles with .EQ. , .NE. , == and /= . [ https://www.mpi-forum.org/docs/mpi-3.1/mpi31-report/node409.htm | https://www.mpi-forum.org/docs/mpi-3.1/mpi31-report/node409.htm ] (I assume the text is unchanged in MPI-4)
Jeff
On Tue, Mar 8, 2022 at 1:19 AM Jeff Squyres (jsquyres) via mpiwg-fortran < [ mailto:[email protected] | [email protected] ]
wrote:
Forum Fortran WG --
Any comments?
I got one off-list reply explaining the use of ELEMENTAL, but I'm curious as to what the Forum's response should be.
I ask because the use of ELEMENTAL has an impact on MPI application portability. E.g., if the Open MPI family of implementations use ELEMENTAL but the MPICH family of implementations do not, that could be confusing for users.
-- Jeff Squyres [ mailto:[email protected] | [email protected] ]
________________________________________ From: mpiwg-fortran < [ mailto:[email protected] | [email protected] ] > on behalf of Jeff Squyres (jsquyres) via mpiwg-fortran < [ mailto:[email protected] | [email protected] ] > Sent: Tuesday, March 1, 2022 10:24 AM To: MPI Forum Cc: Jeff Squyres (jsquyres) Subject: [MPIWG Fortran] "ELEMENTAL" keyword on mpi_f08 comparison operator functions
An Open MPI user this morning requested that we add the "ELEMENTAL" keyword to the mpi_f08 module eq / neq operator functions: [ https://github.com/open-mpi/ompi/issues/10057 | https://github.com/open-mpi/ompi/issues/10057 ]
The only statement I can find in MPI-4.0 about the eq / neq operators is section 19.1.2, "Fortran Support Through the mpi_f08 Module", only says the following about the operator functions (p793, 22:23):
Overload the operators .EQ. and .NE. to allow the comparison of these MPI handles with .EQ., .NE., == and /=.
This doesn't seem to allow or disallow the use of ELEMENTAL.
What are the pros / cons of adding ELEMENTAL to the eq / neq operator functions?
-- Jeff Squyres [ mailto:[email protected] | [email protected] ] _______________________________________________ mpiwg-fortran mailing list [ mailto:[email protected] | [email protected] ] [ https://lists.mpi-forum.org/mailman/listinfo/mpiwg-fortran | https://lists.mpi-forum.org/mailman/listinfo/mpiwg-fortran ] _______________________________________________ mpiwg-fortran mailing list [ mailto:[email protected] | [email protected] ] [ https://lists.mpi-forum.org/mailman/listinfo/mpiwg-fortran | https://lists.mpi-forum.org/mailman/listinfo/mpiwg-fortran ]
-- Jeff Hammond [ mailto:[email protected] | [email protected] ] [ http://jeffhammond.github.io/ | http://jeffhammond.github.io/ ]
_______________________________________________ mpiwg-fortran mailing list [email protected] https://lists.mpi-forum.org/mailman/listinfo/mpiwg-fortran
-- Dr. Rolf Rabenseifner . . . . . . . . . .. email [email protected] . High Performance Computing Center (HLRS) . phone ++49(0)711/685-65530 . University of Stuttgart . . . . . . . . .. fax ++49(0)711 / 685-65832 . Head of Dpmt Parallel Computing . . . www.hlrs.de/people/rabenseifner . Nobelstr. 19, D-70550 Stuttgart, Germany . . . . (Office: Room 1.307) .