[mpi-21] Ballot 4 proposal: MPI::COMM_WORLD and MPI::COMM_SELF should be const

Rolf Rabenseifner rabenseifner at [hidden]
Mon Jan 21 10:48:39 CST 2008

As far as I know, this propsal is technical wrong:
MPI-2, Sect.2.5.4, page 10, lines 40-41 clearly allows the changing of
the value of MPI::COMM_WORLD and MPI::COMM_SELF in MPI_Init and MPI_Finalize.
Therefore, I do not expect, that const is correct.

Remember that in Ballot 1&2, the MPI Forum already decided
MPI-2 Page 343, line 44
       Remove the const from const MPI::Datatype.
      Page 344, lines 13, 23, 32, 38, and 47
       Remove the const from const MPI::Datatype.
      Page 345, lines 5 and 11
       Remove the const from const MPI::Datatype.
See http://www.cs.uiuc.edu/homes/wgropp/projects/parallel/MPI/mpi-errata/errata-20-adopted.pdf

And on Jan. 2008 meeting, positve straw vtes wer given for
(in http://www.cs.uiuc.edu/homes/wgropp/projects/parallel/MPI/mpi-errata/ballot3.pdf )
  6. MPI-2, page 345, line 37: Remove the const from const MPI::Op.
     MPI-2, page 346, line 20: Remove the const from const MPI::Group.
     MPI-2, page 346, add after line 34:
      Advice to implementors. If an implementation does not change the value of
      predefined handles while execution of MPI Init, the implementation is free to
      define the predefined operation handles as const MPI::Op and the predefined
      group handle MPI::GROUP EMPTY as const MPI::Group. Other predefined
      handles must not be ”const” because they are allowed as INOUT argument in

I'll move this item from Ballot 3 to Ballot 4 because the last sentence
is not needed when your Proposal "Ballot 4 proposal: INOUT arguments"
will be accepted.

Best regards

On Mon, 21 Jan 2008 10:40:39 -0500
 Jeff Squyres <jsquyres_at_[hidden]> wrote:
>This is not already on Bill's errata page.
>Proposal: Make MPI::COMM_WORLD and MPI::COMM_SELF be "const".
>Change MPI-2:B.2 p345:18 from
>   // Type: MPI::Intracomm
>   // Type: const MPI::Intracomm
>Rationale: The COMM_WORLD and COMM_SELF C++ handles were erroneously  
>not marked "const" because of the incorrect INOUT MPI handle parameter  
>designation of the MPI_COMM_SET_ERRHANDLER, MPI_COMM_SET_ATTR, and  
>MPI_COMM_SET_ERRHANDLER functions.  This caused the C++ bindings  
>methods to not be const, resulting in compile errors if COMM_WORLD was  
>const and you invoked any of the methods listed above (e.g.,  
>The proper solution is to have all the MPI handle arguments be IN  
>instead of INOUT (covered in another proposal) and therefore have the  
>Set_* functions be const (also covered that other proposal).  Once  
>that solution is in place, COMM_WORLD and COMM_SELF should be marked  
>as "const".  Not that many other predefined MPI C++ handles are  
>already const; some erroneously had their "const" designation removed  
>in ballot 2 -- a different proposal seeks to restore their "const"  
>NOTE: This proposal depends on the "change some INOUT parameters to  
>IN" proposal.
>Jeff Squyres
>Cisco Systems
>mpi-21 mailing list

Dr. Rolf Rabenseifner . . . . . . . . . .. email rabenseifner_at_[hidden]
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)

More information about the Mpi-21 mailing list