Coarrays are used to split the trials across multiple copies of the program. They are called images. Each image has its own local variables, plus a portion of any coarrays shared variables. A coarray can be a scalar. A coarray can be thought of as having extra dimensions, referred to as codimensions. To declare a coarray, either add the CODIMENSION attribute, or specify the cobounds alongside the variable name. The cobounds are always enclosed in square brackets. Some examples:
The Intel® Fortran Compiler requires that the coarray features are enabled by specifying the /Qcoarray option. In Microsoft Visual Studio*, set the project property to Fortran > Language > Enable Coarrays to For Shared Memory and then click OK.
You have completed the Using Coarray Fortran tutorial. The source file: mcpi_coarray_final.f90 should contain a completed version of the coarray application. This source includes a modification to ensure that the random number sequence is different on each image. Initializations that are based on the time-of-day may yield the same seed on more than one image if the clock had the same value. See the source for more detail.