To: J3 07-270r2
From: Aleksandar Donev
Subject: Collective's argument restrictions
Date: 2007 August 7th
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 is difficult to rationalize.
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.
It is therefore best to require that both the leading
and result arguments be co-arrays. This
would guide programmers to use the most efficient version and help
implementors by limiting the number of cases they have to optimize.
Future revisions could relax this restriction if this is seen as
desirable. It would then become difficult to rationalize the dummy
name CO_ARRAY. We propose to change the argument name to SOURCE.
While discussing this we noticed that the description of CO_FINDLOC
does not require the same value for the VALUE argument as it should.
Edits to 07-007r2:
----------------
Edits to '13.2.4 Arguments to collective subroutines':
[354:19] Delete the first sentence
[354:22] Replace the last sentence with two sentences:
"The ultimate argument (12.5.2.3) of the leading co-array dummy
argument shall be the same object on every image of the team.
The ultimate argument (12.5.2.3) of the result co-array
dummy argument shall be the same object on every image of the team."
-----------------
Edits to '13.7.43 CO_SUM (CO_ARRAY, RESULT [, TEAM])'.
Similar edits for all collectives that have a CO_ARRAY dummy argument.
[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".
-----------------
Edits to '13.7.43 CO_SUM (CO_ARRAY, RESULT [, TEAM])'.
Similar edits for all collectives.
[381:41] In the description of the 'Result' argument, replace:
"shall be of the same type"
with
"shall be a co-array of the same type"
-----------------