[Mpi-forum] Reserved MPI_ prefix & namespace in C and Fortran

William Gropp wgropp at illinois.edu
Fri Aug 24 12:01:12 CDT 2012


Of course, we no longer have C++.  But it could always come back in a different form.  The best way to handle this is to not enumerate the languages either; alternately, the C++ could also be mentioned, noting that the C++ binding has been removed but MPI should not be used as a namespace in C++.

Bill

William Gropp
Director, Parallel Computing Institute
Deputy Director for Research
Institute for Advanced Computing Applications and Technologies
Paul and Cynthia Saylor Professor of Computer Science
University of Illinois Urbana-Champaign



On Aug 24, 2012, at 11:38 AM, Bronis R. de Supinski wrote:

> 
> I'm not a C++ expert but my understanding is that "MPI_"
> is not all that you want reserved there. I think you also
> what to reserve "MPI::". Does it matter?
> 
> On Fri, 24 Aug 2012, Rolf Rabenseifner wrote:
> 
>> Bill,
>> 
>> good idea. I try it; what about
>> 
>> C:
>>>>  "Programs must not declare
>>      names (identifiers), e.g., for variables, functions, constants,
>>      macros, types, or namespaces,
>>>>   beginning with the prefix MPI_."
>> 
>> Fortran:
>>>>  "Programs must not declare
>>      names, e.g., for variables, parameters, functions,
>>      derived types, or abstract interfaces,
>>>>   beginning with the prefix MPI_.
>> 
>> Rolf
>> 
>> 
>> ----- Original Message -----
>>> From: "William Gropp" <wgropp at illinois.edu>
>>> To: "Main MPI Forum mailing list" <mpi-forum at lists.mpi-forum.org>
>>> Sent: Friday, August 24, 2012 6:05:38 PM
>>> Subject: Re: [Mpi-forum] Reserved MPI_ prefix & namespace in C and Fortran
>>> The intent of the Forum has always been that all names that begin with
>>> MPI_ or PMPI_, and the MPI namespace, are reserved for MPI. The
>>> mistake (a common one) was to attempt to enumerate all of the items to
>>> which this applies. Rather than attempt to cover everything, I would
>>> prefer changing the text to match the indent; it can mention specific
>>> categories as examples but should not attempt to list them, as this is
>>> always error prone.
>>> 
>>> Bill
>>> 
>>> William Gropp
>>> Director, Parallel Computing Institute
>>> Deputy Director for Research
>>> Institute for Advanced Computing Applications and Technologies
>>> Paul and Cynthia Saylor Professor of Computer Science
>>> University of Illinois Urbana-Champaign
>>> 
>>> 
>>> 
>>> On Aug 24, 2012, at 10:31 AM, Rolf Rabenseifner wrote:
>>> 
>>>> Dear all,
>>>> 
>>>> Jeremiah detected a very old inconsistency in the MPI standard:
>>>> 
>>>>> On page 19 line 14, the restriction on use of MPI_* names should
>>>>> also
>>>>> apply to preprocessor macros, namespaces in C++, types, and other
>>>>> things.
>>>> 
>>>> In MPI-2.2, it was page 18, lines 15-16:
>>>> 
>>>>  "Programs must not declare variables or functions
>>>>   with names beginning with the prefix MPI_."
>>>> 
>>>> Together with MPI-2.2 p4:26
>>>> 
>>>>  "Any correct MPI-2.1 program is a correct MPI-2.2 program."
>>>> 
>>>> and the new constant declaration on p258:17: MPI_DIST_GRAPH,
>>>> the implication is that the MPI standard is inconsistent.
>>>> 
>>>> The solution is very simple, an MPI-2 errata ticket changing
>>>> MPI-2.2, lines 15-16 into (addition marked with {...}):
>>>> 
>>>>  "Programs must not declare variables, functions,
>>>>   { constants, macros, types, or namespaces }
>>>>   with names beginning with the prefix MPI_."
>>>> 
>>>> And for Fortran on p17:41-42 (addition marked with {...}):
>>>> 
>>>>  "Programs must not declare variables, parameters, functions,
>>>>   { derived types, or abstract interfaces }
>>>>   with names beginning with the prefix MPI_.
>>>> 
>>>> It should be a single reading+vote errata ticket, because it does
>>>> not change the standard, it only makes it obvious.
>>>> The reservation was in MPI-2.1 in fact already there through the
>>>> sentence
>>>> 
>>>>  "Any correct MPI-2.1 program is a correct MPI-2.2 program."
>>>> 
>>>> because nobody could foresee, which new things we will
>>>> have added to MPI-2.2.
>>>> 
>>>> Details are in ticket
>>>> https://svn.mpi-forum.org/trac/mpi-forum-web/ticket/343
>>>> 
>>>> And see markups ticket0.343 on page 11 in
>>>> https://svn.mpi-forum.org/trac/mpi-forum-web/attachment/ticket/343/ticket0.343-terms-2.pdf
>>>> 
>>>> I hope that there is a broad consensus
>>>> to solve this inconsistency.
>>>> 
>>>> Best regards
>>>> Rolf
>>>> 
>>>> 
>>>> ----- Original Message -----
>>>>> From: "Jeremiah Willcock" <jewillco at osl.iu.edu>
>>>>> To: mpi-comments at mpi-forum.org
>>>>> Sent: Sunday, August 19, 2012 2:13:41 AM
>>>>> Subject: [Mpi-comments] Comments on MPI 3.0 draft 2
>>>>> These are in reference to the draft at
>>>>> <URL:http://meetings.mpi-forum.org/mpi3.0_draft_2.pdf>. Thank you
>>>>> for
>>>>> considering them.
>>>>> 
>>>>> -- Jeremiah Willcock
>>>> ...
>>>>> On page 19 line 14, the restriction on use of MPI_* names should
>>>>> also
>>>>> apply to preprocessor macros, namespaces in C++, types, and other
>>>>> things.
>>>> 
>>>> --
>>>> 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: Allmandring 30)
>>>> _______________________________________________
>>>> mpi-forum mailing list
>>>> mpi-forum at lists.mpi-forum.org
>>>> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-forum
>>> 
>>> 
>>> _______________________________________________
>>> mpi-forum mailing list
>>> mpi-forum at lists.mpi-forum.org
>>> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-forum
>> 
>> -- 
>> 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: Allmandring 30)
>> _______________________________________________
>> mpi-forum mailing list
>> mpi-forum at lists.mpi-forum.org
>> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-forum
>> 
> _______________________________________________
> mpi-forum mailing list
> mpi-forum at lists.mpi-forum.org
> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-forum





More information about the mpi-forum mailing list