[MPIWG Fortran] "ELEMENTAL" keyword on mpi_f08 comparison operator functions

Jeff Squyres (jsquyres) jsquyres at cisco.com
Fri Mar 11 18:43:01 CST 2022


Rolf --

Did Reinhold reply?  If he's not a member of this list, his reply wouldn't have been distributed to the entire list.

--
Jeff Squyres
jsquyres at cisco.com

________________________________________
From: mpiwg-fortran <mpiwg-fortran-bounces at lists.mpi-forum.org> on behalf of Rolf Rabenseifner via mpiwg-fortran <mpiwg-fortran at lists.mpi-forum.org>
Sent: Tuesday, March 8, 2022 5:58 AM
To: Reinhold Bader
Cc: Rolf Rabenseifner; MPI-WG Fortran working group
Subject: 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" <mpiwg-fortran at lists.mpi-forum.org>
> To: "MPI-WG Fortran working group" <mpiwg-fortran at lists.mpi-forum.org>
> Cc: "Jeff Hammond" <jeff.science at gmail.com>
> 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:mpiwg-fortran at lists.mpi-forum.org | mpiwg-fortran at lists.mpi-forum.org ]
> > 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:jsquyres at cisco.com | jsquyres at cisco.com ]
>
> ________________________________________
> From: mpiwg-fortran < [ mailto:mpiwg-fortran-bounces at lists.mpi-forum.org |
> mpiwg-fortran-bounces at lists.mpi-forum.org ] > on behalf of Jeff Squyres
> (jsquyres) via mpiwg-fortran < [ mailto:mpiwg-fortran at lists.mpi-forum.org |
> mpiwg-fortran at lists.mpi-forum.org ] >
> 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:jsquyres at cisco.com | jsquyres at cisco.com ]
> _______________________________________________
> mpiwg-fortran mailing list
> [ mailto:mpiwg-fortran at lists.mpi-forum.org | mpiwg-fortran at lists.mpi-forum.org ]
> [ https://lists.mpi-forum.org/mailman/listinfo/mpiwg-fortran |
> https://lists.mpi-forum.org/mailman/listinfo/mpiwg-fortran ]
> _______________________________________________
> mpiwg-fortran mailing list
> [ mailto:mpiwg-fortran at lists.mpi-forum.org | mpiwg-fortran at lists.mpi-forum.org ]
> [ https://lists.mpi-forum.org/mailman/listinfo/mpiwg-fortran |
> https://lists.mpi-forum.org/mailman/listinfo/mpiwg-fortran ]
>
>
> --
> Jeff Hammond
> [ mailto:jeff.science at gmail.com | jeff.science at gmail.com ]
> [ http://jeffhammond.github.io/ | http://jeffhammond.github.io/ ]
>
> _______________________________________________
> mpiwg-fortran mailing list
> mpiwg-fortran at lists.mpi-forum.org
> https://lists.mpi-forum.org/mailman/listinfo/mpiwg-fortran

--
Dr. Rolf Rabenseifner . . . . . . . . . .. email rabenseifner at hlrs.de .
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) .
_______________________________________________
mpiwg-fortran mailing list
mpiwg-fortran at lists.mpi-forum.org
https://lists.mpi-forum.org/mailman/listinfo/mpiwg-fortran


More information about the mpiwg-fortran mailing list