Technical data

Writing Parallel Fortran
77
I is a loop index variable for the C$DOACROSS loop, so it is LASTLOCAL
by default. However, even though J is a loop index variable, it is not the loop
index of the loop being multiprocessed and has no special status. If it is not
declared, it is given the normal default of SHARE, which would be wrong.
C$&
Occasionally, the clauses in the C$DOACROSS directive are longer than one
line. The C$& directive is used to continue the directive onto multiple lines.
C$DOACROSS share(ALPHA, BETA, GAMMA, DELTA,
C$& EPSILON, OMEGA), LASTLOCAL(I,J, K, L, M, N),
C$& LOCAL(XXX1, XXX2, XXX3, XXX4, XXX5, XXX6, XXX7,
C$& XXX8, XXX9)
C$
The C$ directive is considered a comment line except when multiprocessing.
A line beginning with C$ is treated as a conditionally compiled Fortran
statement. The rest of the line contains a standard Fortran statement. The
statement is compiled only if multiprocessing is turned on. In this case, the
C and $ are treated as if they are blanks. They can be used to insert
debugging statements, or an experienced user can use them to insert
arbitrary code into the multiprocessed version.
C$ PRINT 10
C$ 10 FORMAT('BEGIN MULTIPROCESSED LOOP')
C$DOACROSS LOCAL(Ii), SHARE(A,B)
DO I = 1, 100
CALL COMPUTE(A, B, I)
END DO