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

Jeff Squyres (jsquyres) jsquyres at cisco.com
Mon Mar 7 17:18:50 CST 2022

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
jsquyres at cisco.com

From: mpiwg-fortran <mpiwg-fortran-bounces at lists.mpi-forum.org> on behalf of Jeff Squyres (jsquyres) via mpiwg-fortran <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

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
jsquyres at cisco.com
mpiwg-fortran mailing list
mpiwg-fortran at lists.mpi-forum.org

More information about the mpiwg-fortran mailing list