Technical data

Advanced Features
103
Each item must be a member of a local COMMON block. It can be a variable,
an array, an individual element of an array, or the entire COMMON block.
For example,
C$COPYIN x,y, /foo/, a(i)
will propagate the values for x and y, all the values in the COMMON block
foo, and the ith element of array a. All these items must be members of local
COMMON blocks. Note that this directive is translated into executable
code, so in this example i is evaluated at the time this statement is executed.
Compatibility With sproc
The parallelism used in Fortran is implemented using the standard system
call sproc. It is recommended that programs not attempt to use both
C$DOACROSS loops and sproc calls. It is possible, but there are several
restrictions:
Any threads you create may not execute $DOACROSS loops; only the
original thread is allowed to do this.
The calls to routines like mp_block and mp_destroy apply only to the
threads created by mp_create or to those automatically created when
the Fortran job starts; they have no effect on any user-dened threads.
Calls to routines such as m_get_numprocs(3p) do not apply to the
threads created by the Fortran routines. However, the Fortran threads
are ordinary subprocesses; using the routine kill(2) with the arguments
0 and sig (kill(0,sig)) to signal all members of the process group might
possibly result in the death of the threads used to execute
C$DOACROSS.
If you choose to intercept the IGCLD signal, you must be prepared to
receive this signal when the threads used for the C$DOACROSS loops
exit; this occurs when mp_destroy is called or at program termination.
Note in particular that m_fork(3p) is implemented using sproc, so it is
not legal to m_fork a family of processes that each subsequently
executes C$DOACROSS loops. Only the original thread can execute
C$DOACROSS loops.