To: J3 07-270 From: Bill Long and John Reid Subject: Collective's argument restrictions Date: 2007 July 31 References: J3/07-007r2 (N1678) Discussion The requirement that the leading argument to a collective subroutine is a co-array while the result argument is not a co-array is not symmetric and seems somewhat arbitrary. Likely implementations would require remote access to both arguments during execution of the subroutine (a fan-in reduction on the input argument and a fan-out broacast to the result). Performance would be optimal if both are co-arrays, assuming the processor implements optimized mechanisms for accessing remote co-arrays. Since we currently allow the result to not be a co-array, the subroutine has to be able to handle that case. It should be able to handle a non-co-array as the input argument as well. If the argument is not a co-array, then it is not even necessary to require that the effective argument be the same variable on each image. The actual argument could, for example, be a pointer with different targets on different images. Allowing non-co-array arguments will simplify the incremental addition of co-arrays to an existing MPI program. These restrictions are needed independent of whether the arguments are co-arrays: 1) The shape of the leading and result arguments shall be the same. 2) The shape, type, and type parameters of the leading argument shall be the same on all images of the team. Similarly for the result argument. To take advantage of high performance versions of the collectives, this restriction is needed on co-array arguments: 3) If an actual leading or result argument is a co-array, then the corresponding ultimate argument shall be the same object on every image of the team. For collective subroutines that have an argument named CO_ARRAY, that name should be changed to SOURCE. Edits to 07-007r2: ---------------- Edits to '13.2.4 Arguments to collective subroutines': [354:19] In the first sentence, replace "shape" with "shape, type, and type parameters". [354:22] In the last sentence, replace "of the co-array dummy argument" with "of a leading or result dummy argument that corresponds to a co-array actual argument". ----------------- Edits to '13.7.43 CO_SUM (CO_ARRAY, RESULT [, TEAM])': [381:35] In subclause title, replace "CO_ARRAY" with "SOURCE". Make the same change in Table 13.1 (page 358). [381:39, 41, 42; 382:1, 3, 7, 9] replace all occurrences of "CO_ARRAY" in the subclause with "SOURCE". [381:39] In the description of the first 'Argument', delete "a co-array". ----------------- Similar edits for the other Collective Subroutine descriptions.