Re: MPI_JOIN

William Saphir (wcs@nsgi3.lbl.gov)
Thu, 29 May 1997 14:24:58 -0700

On May 29, 4:49pm, Dick Treumann wrote:
>
> Your example is the sort of thing I had in mind. I am not sure what the
> difference is between describing something as erroneous and saying its
> outcome is undefined. I expect correct programs only to do things which
> have defined outcomes.

I agree this is a subtle difference.
Obviously a program that uses JOIN to connect connected
processes is not guaranteed to work. By calling it undefined,
though, we allow implementations to support it and
applications to target this specific implementation.
We label the application as "not portable" rather than
"incorrect", which is kinder and gentler.
On the other hand, I do think it was a big mistake, for
example, not to label as "incorrect" programs that rely on
buffering to avoid deadlock. This has caused lots
of headaches and incorrect assumptions about what MPI
requires.

I guess I wouldn't have too much of a problem declaring
it to be erroneous. I suspect my original instinct to make
it undefined was partly based on several prior experiences
trying to label something as "erroneous" and getting
"corrected" by the Forum.

This is cc'd to mpi-dynamic/core in case someone can give
a clear explanation of the reason for distinguishing between
undefined and erroneous.

Bill

ps. Examples in the current dynamic chapter of "undefined" behavior.

If the program named in \mpiarg{command} does not call
\mpifunc{MPI\_INIT}, but instead forks a process that calls
\mpifunc{MPI\_INIT}, the results are undefined. Implementations
may allow this case to work but are not required to.

if \mpifunc{service\_name} has already been published
within the scope determined by \mpiarg{info}, the behavior
of \mpifunc{MPI\_PUBLISH\_NAME}
is undefined.

\mpiarg{port\_name} should be the name of a port established
by \mpifunc{MPI\_OPEN\_PORT} and not yet deleted by
\mpifunc{MPI\_CLOSE\_PORT}. If it is not, the result is undefined.

\item[\info{ip\_address}] Value contains IP address at which to
establish a \mpiarg{port}. If the address is not a valid IP address of
the host on which the \mpifunc{MPI\_OPEN\_PORT} call is made,
the results are undefined. (Reserved for \mpifunc{MPI\_OPEN\_PORT}
only).

If a function does not recognize a key, it will
ignore it, unless otherwise specified. If an
implementation recognizes a key but does not recognize the
format of the corresponding value, the result is undefined.