[mpi-21] Ballot 4 proposal: INOUT arguments

Jeff Squyres jsquyres at [hidden]
Mon Jan 21 08:42:02 CST 2008



This is not already on Bill's errata page.

Proposal: change the INOUT designation of the MPI handle parameters in  
several MPI-2 functions to be IN, because the values of the handles  
are not changing.  Only the underlying MPI objects are changing.  The  
C bindings for each of these functions do *not* pass the MPI handle by  
reference, therefore disallowing the possibility of these parameters  
actually being INOUT.  By the same argument, the C++ methods for these  
functions should be const since the C++ object invoking the method  
will not be changed.

The functions in question are:

MPI_*_SET_NAME for communicators, datatypes, windows
MPI_*_SET_ATTR for communicators, datatypes, windows
MPI_*_SET_ERRHANDLER for communicators, files, windows

Locations of specific text to be changed (INOUT -> IN, add "const" to C 
++ methods):

MPI_COMM_SET_NAME: MPI-2:8.4, p177:35,44
                    MPI-2:A.8.5, p336:28
MPI_TYPE_SET_NAME: MPI-2:8.4, p179:41, p180:2
                    MPI-2:A.8.5, p337:2
MPI_WIN_SET_NAME: MPI-2:8.4, p181:25,35
                    MPI-2:A.8.5, p337:36

MPI_COMM_SET_ATTR: MPI-2:8.8.1, p201:6,17
                    MPI-2:A.8.5, p336:27
MPI_WIN_SET_ATTR: MPI-2:8.8.2, p204:2,12
                    MPI-2:A.8.5, p337:35
MPI_TYPE_SET_ATTR: MPI-2:8.8.3, p206:26,37
                    MPI-2:A.8.5, p337:1

MPI_COMM_SET_ERRHANDLER: MPI-2:4.13.1, p62:35,43
                          MPI-2:A.8.1, p331:38
MPI_WIN_SET_ERRHANDLER: MPI-2:4.13.2, p64:2,10
                         MPI-2:A.8.1, p333:13
MPI_FILE_SET_ERRHANDLER: MPI-2:4.13.3, p65:14,22
                          MPI-2:A.8.1, p332:34

NOTE: The "const" issues of this proposal will be dependent upon a 2nd  
proposal about re-instituting the "const" on MPI predefined handles  
that was removed in ballot 2.


-- 
Jeff Squyres
Cisco Systems




More information about the Mpi-21 mailing list