D Ballot 4, Item 22 – Change INOUT to IN for MPI Handle Parameters in several routines (2) Background:
{"Image DocumentName": "DBallot 4, Item 22 \u2013 Change INOUT to IN for MPI Handle Parameters in several routines (2) Background:", "Image ImageDescription": "MPI 2.0 Sect. 2.3 Procedure Specification, page 6 lines read: There is one special case - if an argument is a handle to an opaque object (these terms are defined in Section 2.5.1), and the object is updated by the procedure call, then the argument is marked OUT. It is marked this way even though the handle itself is not modified - we use the OUT attribute to denote that what the handle references is updated. Thus, in C++, IN arguments are either references or pointers to const objects. Example: MPI 1.1, page 171, lines 26-34: MPI_ATTR_PUT(comm, keyval, attribute val) IN comm communicator to which attribute will be attached (handle) IN keyval key value, as returned by MPI_KEYVAL_CREATE (integer) IN attribute_val attribute value. int MPI_Attr_put(MPI_Comm comm, int keyval, void  attribute_val) Example: MPI 2.0, page 44, lines 36-43: MPI_INFO_SET(info, key, value) INOUT info info object (handle) IN key key (string) IN value value (string) int MPI_Info_set(MPI_Info info, char  key, char  value) Handle with call by value (IN) The object behind is modified (INOUT) MPI 2.1. Rolf Rabenseifner.", "Image XResolution": "37", "Image YResolution": "37", "Image ResolutionUnit": "Pixels/Centimeter", "Image Software": "SlidePlayer", "Image YCbCrPositioning": "Centered"}