I agree with the analysis of the output but disagree with the conclusion - to make the behavior consistent with that of MPI_Cart_create, ndim == 0 should be permitted (with nnodes == 1) but there is, as noted, no output other than a return value / error value set of MPI_SUCCESS. Otherwise the use of MPI_Dims_create with MPI_Cart_create in the general case looks like if (ndim > 0) MPI_Dims_create(…) MPI_Cart_create(…) while the intent of the changes for MPI_Cart_create was to allow MPI_Dims_create(…) MPI_Cart_create(…) even if ndim == 0. Bill William Gropp Acting Director and Chief Scientist, NCSA Director, Parallel Computing Institute Thomas M. Siebel Chair in Computer Science University of Illinois Urbana-Champaign On Nov 9, 2016, at 9:17 AM, Rolf Rabenseifner <[email protected]> wrote:
We added all that the MPI_CART_... routines work fine with ndims==0.
We oversaw that MPI_DIMS_CREATE is also a candidate for ndims==0.
Reading the standard, I would say that MPI_DIMS_CREATE - with ndims==0 can never have any output, because the ndims Array has no element, - with ndims==0 and nnodes != 1 is erronous because a zero-dim-cart-topology has alwas exactly one node (and erronous implies always undefined behavior, i.e., the MPI library may catch or ignore this error), - with ndims==0 and nnodes == 1 would be okay but would not produce any output (because ndims has no entries), - but compared to the other CART routines where ndims==0 behaviour is always explicitely specified, I would conclude that MPI_DIMS_CREATE with ndims==0 has always undefined behavior, i.e., that also ndims==0 and nnodes == 1 may be treated by the MPI library as erronous.
Therefore, I would recommend to clarify the standard by defining ndims of MPI_DIMS_CREATE as "positive integer" instead of only "integer".
Rolf
----- Original Message -----
From: "wgropp" <[email protected]> To: "Comments on the MPI Standard" <[email protected]> Sent: Wednesday, November 9, 2016 3:18:10 PM Subject: Re: [Mpi-comments] MPI_Dims_create(..., ndims=0, ...) semantic ?
The standard doesn’t specify this, though I recall us discussing this and IIRC agreeing that ndims equal to zero was well-defined and not an error. And there is nothing in the standard that suggests that it should be an error, just nothing that says it shouldn’t.
Bill
William Gropp Acting Director and Chief Scientist, NCSA Director, Parallel Computing Institute Thomas M. Siebel Chair in Computer Science University of Illinois Urbana-Champaign
On Nov 8, 2016, at 11:40 PM, Gilles Gouaillardet < [ mailto:[email protected] | [email protected] ] > wrote:
Folks,
Does the standard specifiy the behavior of MPI_Dims_create() when the ndims argument is zero ?
the standard only says negative input values of dims[i] are erroneous, but does not say anything about ndims.
ndims is the number of Cartesian dimensions (integer), and though a negative number likely looks erroneous
to most of us, a zero value is incorrect from a mathematical point of view (and i wish i remembered that ...)
Could someone tell me how a zero value should be interpreted ?
(e.g. valid/invalid/up to the implementor ?)
FWIW, currently
in MPICH, this is a no-op.
In Open MPI, this is an error by default, but if parameter check is manually disabled, then this is a no-op too.
Cheers,
Gilles
_______________________________________________ mpi-comments mailing list [ mailto:[email protected] | [email protected] ] https://lists.mpi-forum.org/mailman/listinfo/mpi-comments
_______________________________________________ mpi-comments mailing list [email protected] https://lists.mpi-forum.org/mailman/listinfo/mpi-comments
-- 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) _______________________________________________ mpi-comments mailing list [email protected] https://lists.mpi-forum.org/mailman/listinfo/mpi-comments
_______________________________________________ mpi-comments mailing list [email protected] https://lists.mpi-forum.org/mailman/listinfo/mpi-comments