To: J3 07-220 From: Aleksandar Donev Subject: Co-arrays with non-Fortran main program Date: 2007 May 08 References: J3/07-007r1, J3/07-184r1 Discussion: Consider the example: A C main program calls an interoperable Fortran subroutine, both compiled with companion processors. The current standard guarantees that works---run time library will be initialized etc. Now someone rewrote the Fortran routine to use co-arrays (ALLOCATABLE for example). Can the program suddenly stop working? There are two options: 1) Yes: The current draft does not specify anything about the creation of images when the main program is not in Fortran. 2) No: The program should still work. What the value of NUM_IMAGES will be is outside the standard, but it will be *something* (probably 1 if it is a serial program). No edits are needed if we choose option 1. Edits for option 2 are provided below: Edits for option 2: [16:11-13] Replace the first sentence with: "Execution of a program begins by creating a fixed number of instances of the program. If the program contains a Fortran main program, each image begins execution with the first executable construct of the main program."