[Omp] Clarification of the Fortran OpenMP 2.0 specs about FLUSH
directive is needed
Marina Kraeva
kraeva at iastate.edu
Mon Jul 31 13:38:47 PDT 2006
Hello,
I have several questions about thread-visible variables and FLUSH
directive. In the Fortran OpenMP API 2.0 specs it's said that "Local
variables that have had their address taken and saved or have had their
address passed to another subprogram" are thread-visible.
The first question is how one can take and save the address of a variable.
The second question is whether I understand it right that the
thread-visible variables are shared variables and "global-lifetime
memory locations". I did not find any mention of thread-visible
variables in the OpenMP API 2.5 specs other than in the following
sentence: "A flush construct without a list, executed on a given thread,
operates as if the whole thread-visible data state of the program, as
defined by the base language, is flushed."
The last question is about passing address of a local variable to
another subprogram (see the quote from the specs 2.0 above). Does it
mean that in case a local variable was passed into another subprogram
(and in Fortran all variables are passed by address), this variable is
considered thread-visible? Can anyone provide an example for that quote?
Or should I disregard everything in the specs 2.0 as there is new specs?
Thank you in advance,
Marina Kraeva.
More information about the Omp
mailing list