I’ll add something, but I disagree that this is a change - the standard is implicitly quite clear - ndim can be an integer, and 0 is an integer. 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 10, 2016, at 2:52 AM, Rolf Rabenseifner <[email protected]> wrote:
Yes I agree: Bill's solution is better, but it requires that the MPI libraries may Need to be fixed, because then, ndimm==0 && nnodes==1 is no error. Currently, it is undefined, i.e., a MPI library may handle it as an erronous input and may call the error handler. I.e., this solution would require a change log entry that all MPI library developers check there code.
Proposal: I would add after the Example 7.1 on MPI-3.1 page 293 line 42
If ndims is zero, then nnodes must be one, and the argument dims will be ignored, i.e., there will be no output.
Changelog in "Changes in MPI-4.0":
Section 7.5.2 on page 792. MPI_DIMS_CREATE was extended to additionally allow a zero-dimensional Cartesian topology, i.e., input ndims==0 together with nnodes==1.
Bill, please can you provide the ticket/issue/... with probably better wording ...
Rolf
----- Original Message -----
From: "wgropp" <[email protected]> To: "Comments on the MPI Standard" <[email protected]> Sent: Wednesday, November 9, 2016 7:04:44 PM Subject: Re: [Mpi-comments] MPI_Dims_create(..., ndims=0, ...) semantic ?
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 < [ mailto:[email protected] | [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" < [ mailto:[email protected] | [email protected] ] > To: "Comments on the MPI Standard" < [ mailto:[email protected] | [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] | mailto:[email protected] ] | [ 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] | mailto:[email protected] ] | [ mailto:[email protected] | [email protected] ] ] [ https://lists.mpi-forum.org/mailman/listinfo/mpi-comments | 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 [ mailto:[email protected] | [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 . . . [ http://www.hlrs.de/people/rabenseifner | www.hlrs.de/people/rabenseifner ] Nobelstr. 19, D-70550 Stuttgart, Germany . . . . (Office: Room 1.307) _______________________________________________ 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