[J3] FORM TEAM statement NEW_INDEX= specifier & failed images
Nathan Weeks
weeks at iastate.edu
Mon May 6 18:02:43 EDT 2019
I have two questions regarding the semantics of a FORM TEAM statement
with the NEW_INDEX= specifier.
(Question 1) N2146 states the following in section 11.6.9:
3 The value of the scalar-int-expr in a NEW_INDEX= specifier
specifies the image index that the executing image will have in its
new team. It shall be positive, less than or equal to the number of
images in the team, and different from the value specified by every
other image that belongs to that team.
4 If the NEW_INDEX= specifier does not appear, the image index of
the executing image in the new team is
processor dependent. This image index will be positive, less than or
equal to the number of images in the team,
and different from that of every other image in the team.
Can some images specify NEW_INDEX=, and some images omit? The phrase
"different from the value specified by every other image that belongs
to that team" almost seems to imply that the intent of the standard is
for it to be specified by all images if specified by any.
One scenario where this might occur is the case where one image
specifies NEW_INDEX=1 (e.g., it has data to broadcast; or it will
receive the results of a reduction; or it's a "master" in a
master-worker pattern, and it doesn't matter what the image indexes of
the workers are).
(Question 2) 11.6.9 also states:
2 Successful execution of a FORM TEAM statement creates a new team
for each unique team-number value specified by the active images of
the current team...
6 If execution of a FORM TEAM statement assigns the value
STAT_FAILED_IMAGE to the stat-variable, the effect is the same as for
the successful execution of FORM TEAM except for the value assigned to
stat-variable.
What happens in the case where an image specifies both NEW_INDEX= and
STAT= in a FORM TEAM statement, and the image index specified for
NEW_INDEX= turns out to be greater than the number of images in the
new team due to image failure during the execution of FORM TEAM? It
seems that STAT_FAILED_IMAGE would be assigned to a stat-variable,
but, as the new team can't have any missing image indexes (in section
5.3.4: "The image index that identifies an image is an integer value
in the range one to the number of images in a team"), the effect of
FORM TEAM would not be the same as a successful execution without the
STAT_FAILED_IMAGE (e.g., in a successful execution, an executing image
would have the value specified in the NEW_INDEX= specifier as its
image index in the new team).
Thanks,
--
Nathan
More information about the J3
mailing list