[J3] FORM TEAM statement NEW_INDEX= specifier & failed images
Steidel, Jon L
jon.l.steidel at intel.com
Tue May 7 12:01:09 EDT 2019
Malcom said:
This cannot happen. A failed image does not participate in program execution so cannot specify a team number.
Say we have 10 images, and NEW_IMAGE=THIS_IMAGE(), and we are creating a single team of 10 images (just for simplicity sake). On the new team, each image will have the same image index as on the parent team. Prior to executing the FORM TEAM statement, image 8 fails. Nine images then execute the FORM TEAM statement. Image number 9 and 10 will be assigned the image indices 9 and 10, respectively.
If the implementation checks for out of range image indices in a FORM TEAM statement, image 10 may detect that its NEW_INDEX is out of range, and if STAT= is not specified, image termination may be initiated (depending if the implementation views this as a fatal error). If STAT= is specified, by the rules of 11.6.11 p5, stat-var would be assigned a positive value different from STAT_STOPPED_IMAGE and STAT_FAILED_IMAGE.
If the implementation does not detect out of range image indices, and if STAT= is specified and no other error condition is detected, stat-var would then be assigned the value STAT_FAILED_IMAGE.
-jon
From: J3 [mailto:j3-bounces at mailman.j3-fortran.org] On Behalf Of Malcolm Cohen via J3
Sent: Monday, May 6, 2019 8:55 PM
To: 'General J3 interest list' <j3 at mailman.j3-fortran.org>
Cc: Malcolm Cohen <malcolm at nag-j.co.jp>
Subject: Re: [J3] FORM TEAM statement NEW_INDEX= specifier & failed images
<<<
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?
>>>
This cannot happen. A failed image does not participate in program execution so cannot specify a team number.
FORM TEAM is not a multi-step operation with exposed internal failure modes, so either the effect is as if the image failed “immediately before FORM TEAM” (in which case STAT_FAILED_IMAGE is returned, and the NEW_INDEX= values must match the number of active images in the new team), or the effect is as if the image failed “immediately after FORM TEAM”, in which case there is no error (STAT==0), it’s just that some of the images in the new team failed very quickly afterwards.
This is not terribly explicit, but I don’t see any other way to interpret the text that’s actually there. For there to be weird effects with exposed internal failure modes *we’d have to have allowed that* and we did not.
Cheers,
--
..............Malcolm Cohen, NAG Oxford/Tokyo.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20190507/88afb347/attachment.html>
More information about the J3
mailing list