[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MPI-2.1 corrections, Batch 2 // Item 16-18 (C++ const handles)



In addition to batch 2, item 16-18:
 
Proposal:

    Page 345, line 37:
       Remove the const from const MPI::Op.

    Page 346, line 20: 
       Remove the const from const MPI::Group.
    
    Page 346, add after line 34:
    
    Advice to implementors. If an implementation does not change the value of
    predifined 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 the  MPI_COMM_SET_NAME/ATTR and MPI_TYPE_SET_NAME/ATTR
    routines.  End of advice to implementors. 

Reason:

    MPI_Init may change the predefined handles, because
    MPI 1.1, page 10, lines 9-10 says: "Opaque objects accessed by constant 
    handles are defined and do not change value between MPI initialization 
    (MPI_INIT() call) and MPI completion (MPI_FINALIZE() call)."
    Therefore they must not be defined as const in the MPI standard. 

    I would allow one exception: The predefined ...._NULL handles, 
    because as fare as I know, all implementations handle
    ..._NULL as (zero) constant of arbitrary datatype. 


Dr. Rolf Rabenseifner                      High Performance Computing
Parallel Computing                         Center Stuttgart    (HLRS)
Rechenzentrum Universitaet Stuttgart (RUS) Phone:    ++49 711 6855530
Allmandring 30                             FAX:      ++49 711 6787626
D-70550 Stuttgart                   rabenseifner@rus.uni-stuttgart.de
Germany                        http://www.hlrs.de/people/rabenseifner