Skip to content

deprecate or fix MPI_COMM_JOIN #13

Open
@jeffhammond

Description

@jeffhammond

This was https://svn.mpi-forum.org/trac/mpi-forum-web/ticket/301. Since there is no obvious working group for this, I am putting it here.

Background

At the October 2011 meeting (10/26/2011), Bill said that interaction with an explicit externally specified environment like POSIX was totally inappropriate for the MPI standard. On this basis, and the lack of demonstrated necessity for such a routine, we should deprecate MPI_COMM_JOIN.

MPI_COMM_JOIN explicitly refers to the externally specified protocol known as Berkeley Sockets. It is not compatible with other implementations of sockets due to the choice of type for the socket file descriptor (integer); for example, MPI_COMM_JOIN is incompatible with Windows Sockets (source: Fab Tillier). I do not see how a *nix-specific routine is no more inappropriate for the MPI standard than a POSIX-oriented MPI_FILE_STAT one.

Here is the relevant excerpt from http://www.lam-mpi.org/MailArchives/lam/2001/09/3315.php as to why this routine is probably superfluous (see paragraph 2):

From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2001-09-21 08:24:50

> I am trying to understand the command MPI_Comm_join.

This is a fairly specialized function that was added to MPI-2 for whacky 
configurations that the MPI Forum couldn't predict. It is intended to 
take a file descriptor as an argument that represents another MPI process 
(where that file descriptor can be a pipe or a socket or some other IPC 
mechanism), and create a communicator between the two processes. You will 
need to create this file descriptor yourself -- it is intended to *only* 
be used by the MPI_Comm_join call. 

What do you need to use MPI_Comm_join for? You may wish to explore 
MPI_Comm_connect and MPI_Comm_accept instead -- they may provide an easier 
way to connect to previously unrelated MPI programs since there's no need 
for anything outside of the scope of MPI (i.e., a file descriptor). 

Proposal

We propose to redefine the current interface in such a way as to not break backwards compatibility on platforms that currently support this function while enabling those that currently cannot support it to do so in the future. Backwards compatibility on currently supporting platforms requires MPI_Socket to be defined to an integer file descriptor. On systems such as Windows that currently do not support this function, MPI_Socket can be defined to be the appropriate object without introducing a regression.

MPI_COMM_JOIN(fd, intercomm) 
   IN     fd                    socket file descriptor
   OUT    intercomm             new intercommunicator (handle)

int MPI_Comm_join(MPI_Socket fd, MPI_Comm *intercomm)

MPI_Comm_join(fd, intercomm, ierror) BIND(C)
    TYPE(MPI_Socket), INTENT(IN) ::  fd
    TYPE(MPI_Comm), INTENT(OUT) ::  intercomm
    INTEGER, OPTIONAL, INTENT(OUT) ::  ierror

MPI_COMM_JOIN(FD, INTERCOMM, IERROR)
    INTEGER FD, INTERCOMM, IERROR
Advice to implementers: In order to preserver backwards compatibility, 
MPI_Socket should be an integer file descriptor on platforms that currently 
support this function.  On platforms that do not support this function, there 
is no backwards compatibility issue, and MPI_Socket can be defined to be anything.

Metadata

Metadata

Labels

mpi-6For inclusion in the MPI 5.1 or 6.0 standardwg-collectivesCollectives Working Group

Type

No type

Projects

Status

To Do

Relationships

None yet

Development

No branches or pull requests

Issue actions