11-259 To: J3 Subject: COPY_ASYNC using asynchronous I/O From: Van Snyder Date: 13 October 2011 References: 11-256 Background ---------- Paper 11-256 included a proposal for asynchronous copying between images, using a new statement or intrinsic procedure. Proposal -------- Rather than multiply concepts, asynchronous I/O could be adapted to solve this problem, with additional functionality not possible with the proposal in 11-256. In particular, WRITE is a gather, and READ is a scatter. Method ------ 1. Extend "internal file" to arrays of variables of any type, restricting formatted I/O using internal files to character variables. For variables of other types, only unformatted I/O is permitted. In either case, the internal file can be a coarray. 2. In the unformatted internal file case, the type and kind of every effective list item shall be the same as the type and kind of the internal file. Care is needed here when describing expansion of list items of derived type: Expansion stops when components of the type of the internal file are reached. 3. The internal file is used in array element order. 4. Extend the ID= specifier in a control information list to allow variables of type(EVENT). This applies to READ, WRITE and WAIT statements. ID= variables of type(EVENT) could equally be used for external file I/O. 5. Use the WAIT statement rather than a new statement for event-type based notify/query synchronization. 6. Internal I/O using a coarray internal file does not have to be asynchronous. It is then a synchronous gather or scatter. 7. A WAIT statement with an event that appears in a WRITE statement completes when the data in the I/O list have been transferred to the internal file. Existing rules concerning access continue to apply. 8. A WAIT statement with an event that appears in a READ statement completes when the variables in the I/O list have been transferred from the internal file. Existing rules concerning access continue to apply.