[Mpi-comments] MPI_Dims_create(..., ndims=0, ...) semantic ?
William Gropp
wgropp at illinois.edu
Wed Nov 9 12:04:44 CST 2016
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 <rabenseifner at hlrs.de> 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" <wgropp at illinois.edu>
>> To: "Comments on the MPI Standard" <mpi-comments at lists.mpi-forum.org>
>> 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:gilles at rist.or.jp |
>> gilles at rist.or.jp ] > 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:mpi-comments at lists.mpi-forum.org | mpi-comments at lists.mpi-forum.org ]
>> https://lists.mpi-forum.org/mailman/listinfo/mpi-comments
>>
>>
>> _______________________________________________
>> mpi-comments mailing list
>> mpi-comments at lists.mpi-forum.org
>> https://lists.mpi-forum.org/mailman/listinfo/mpi-comments
>
> --
> Dr. Rolf Rabenseifner . . . . . . . . . .. email rabenseifner at hlrs.de
> 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
> mpi-comments at lists.mpi-forum.org
> https://lists.mpi-forum.org/mailman/listinfo/mpi-comments
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpi-forum.org/pipermail/mpi-comments/attachments/20161109/eebc962d/attachment-0001.html>
-------------- next part --------------
_______________________________________________
mpi-comments mailing list
mpi-comments at lists.mpi-forum.org
https://lists.mpi-forum.org/mailman/listinfo/mpi-comments
More information about the mpi-comments
mailing list