I am trying to apply OpenMP to a large Fortran code.
Presumably to reuse memory many loops rely on work arrays that are created during initialisation. The loops access them through a long series of pointers.
Now according to the standard any PRIVATE() variables in Fortran must be either allocatable or defineable. Is their is way to dereference this pointer mess or is my best option to create a new variable with allocate(foo, source=bar)?
The complete structure I am dealing with is something like this:
type work_type
allocatable :: bar
end type
type(work_type) :: work
pointer, type(work_type) :: w
w => work
pointer :: foo, bar
bar => w%bar
foo => bar
Or to summarise:
for => bar => w%bar
w => work