To: J3 J3/19-244 From: Malcolm Cohen Subject: Collective subroutines and STAT= Date: 2019-October-15 Reference: 19-181 1. Introduction Paper 19-181 contains five purported interpretation requests glommed into a single paper. This paper discusses the fifth of them. 2. The alleged problem From 19-181: QUESTION 5: A collective subroutine is defined (3.143.2) as an "intrinsic subroutine that performs a calculation on a team of images without requiring synchronization", and collective subroutines are invoked "on all active images of its current team in segments that are not ordered with respect to each other" (16.6 par. 1). Is the guarantee provided by 16.6 par. 7: "If the STAT argument is present and ... the current team contained failed images, an error condition occurs and the value STAT_FAILED_IMAGE from the intrinsic module ISO_FORTRAN_ENV is assigned to the STAT argument" too strong? It seems to imply that all images in the team will have knowledge of a failed image if there is one. ANSWER 5: Yes. It was not intended to require a synchronization of all the images involved. Rather than "if the current team contained failed images", the standard should say "if the current team is detected to contain failed images". This is particularly important for CO_BROADCAST, because the failure of one image does not prevent others receiving the correct result, and each should be allowed to continue execution as soon as it has the result. EDIT 5: In 16.6 Collective subroutines, para 7, sentence 2, change "if the current team contained failed images" to "if the current team is detected to contain failed images". so that the sentence becomes "Otherwise, if the current team is detected to contain failed images, an error condition occurs and the value STAT_FAILED_IMAGE from the intrinsic module ISO_FORTRAN_ENV is assigned to the STAT argument." 3. Response from /INTERP The question is without merit, and the answer does not make sense. (a) According to 16.6, the value assigned to each STAT argument is consistent. It would be a disaster if some part of the program were to be told that the CO_WHATEVER was successfully executed but another part was told that it was not. (b) If there are any failed images in the team, CO_WHATEVER is going to find them as it involves communication with each image in the team. Thus the edit suggested is unlikely to make any difference to the synchronisation argument. (c) The assertion that failed image detection necessarily requires full synchronisation is false. Collectives do necessarily require some internal synchronisation in any case. (d) Minor nitpickery, but the standard says "contains". Not past tense. (e) In the case of CO_BROADCAST, as well as all the other collective subroutines, the variable does not receive "the correct result" in the case of an error condition occurring, but becomes undefined (16.6p6). (f) My view is that "Unreliable collective subroutines" would be a new feature, different from the one we currently have, and should not be added via the interpretation process. Therefore /INTERP politely declines to accept this interpretation request in its current form at this time. Instead, /HPC is requested to examine these issues and determine whether there any issue here that needs addressing in the current standard, or whether there are any issues here that should be addressed in the next revision. ===END===