To: J3 J3/14-102r1 From: John Reid & Bill Long Subject: FAIL IMAGE Date: 2014 February 10 References: N1996, N1999 Discussion ---------- We need a statement whose effect is to cause the executing image to behave as if it is a failed image. This is needed for the testing of a program that is intended to continue execution in the presence of failed images. Edits to N1996: --------------- [12:17-] Add a new subclause: 5.6+ FAIL IMAGE statement R509 <> FAIL IMAGE [] Execution of a FAIL IMAGE statement causes the executing image to behave as if it has failed. No further statements are executed by that image. When an image has executed a FAIL IMAGE statement, its stop code, if any, is made available in a processor-dependent manner. NOTE 5.5+ The FAIL IMAGE statement allows a program to test a recovery algorithm without experiencing an actual failure. On a processor that does not have the ability to detect that an image has failed, execution of a FAIL IMAGE statment might provide a simulated failure environment that provides debug information. In a piece of code that each image executes about once a second, invoking the subroutine SUBROUTINE FAIL REAL :: X CALL RANDOM_NUMBER(X) IF(X<0.001) FAIL IMAGE "Subroutine FAIL called" END SUBROUTINE FAIL will randomly cause the executing image to become a failed image, on average after about 1000 seconds. [29:37+] In 8.7, add the following new edit: {Following 8.4 STOP and ERROR STOP statements, insert 5.6 FAIL IMAGE statement from this Technical Specification as 8.4a, with rule and Note numbers modified.} [33:26+] add an additional processor dependency "the manner in which the stop code of the FAIL IMAGE statement is made available."