To: J3 10-113 From: John Reid Subject: Comments GB-14 and CA-02/3/4: Clarifiy execution of certain intrinsic procedures Date: 2010 February 01 References: WG5/N1802, WG5/N1803, J3/09-007r3 DISCUSSION 1. GB-14 The document does not specify how certain intrinsic procedures, principally in class S, may be used as far as their use in unordered images is concerned. The proposal is already implied for those of classes E, ES and PS by other wording. Those of class A are already covered. For implementations where images are separate processes run under a batch scheduler, it is common for the command and its environment to be different for image 1 and the other images; this restriction is already in the standard for "READ (*,...)". It would also be reasonable to implement secondary images by calls to 'network CPU servers', where they might not be associated with a command at all. 2. CA-02 There is a discussion on random number generator (RANDOM_NUMBER) on multiple images, but is left unstated what the relationship is between cores. We prefer that each image be able to generate random numbers independently, but if this is not possible, there should be a statement that this is processor dependent. 3. CA-03 It is not stated what the behaviour is between 2 images that execute EXECUTE_COMMAND_LINE concurrently. We recommend that this be stated to be processor dependent. 4. CA-04 The behaviour between two images that execute the following intrinsics cannot be guaranteed. COMMAND_ARGUMENT_COUNT, GET_COMMAND, GET_COMMAND_VARIABLE, CPU_TIME, DATE_AND_TIME, SYSTEM_CLOCK. We'd like to specify that it is processor dependent to the values returned on multiple images using the listed intrinsics. PROPOSAL The edit proposed here comes from GB-14. It appears to cover CA-02/3/4, too. EDIT [325:1-]In 13.5 "SYNC IMAGES statement" after Table 13.1, add the new paragraphs: The effects of calling COMMAND_ARGUMENT_COUNT, EXECUTE_COMMAND_LINE, GET_COMMAND, GET_COMMAND_ARGUMENT, GET_ENVIRONMENT_VARIABLE on any image other than image 1 are processor dependent. If RANDOM_SEED is called in a segment A, and either RANDOM_SEED or RANDOM_NUMBER is called in segment B, then segments A and B shall be ordered. It is processor dependent whether all images use a common generator or whether each image uses a separate generator. If a processor uses a common generator, then the interleaving of the calls to RANDOM_NUMBER in unordered segments is unspecified. It is processor dependent whether the results returned from CPU_TIME, DATE_AND_TIME and SYSTEM_CLOCK are dependent on which image calls them. NOTE 13.x This means that it is unspecified whether images use synchronized clocks, whether CPU_TIME returns a per-image or per-program value, whether all images run in the same time zone and whether the count rate and maximum in SYSTEM_CLOCK are the same for all images. The use of all other standard intrinsic procedures in unordered segments is subject only to their argument use following the rules in 8.5.2.