> Is this the kind of thing you want?
> subroutine p (one_t, size)
> type(t) :: one_t
> integer, intent(in) :: size
> allocate(one_t%x(size))
> !
> ! etc. ...
> !
> end subroutine p
No. one_t%x is already allocated on entry (it contains an optimized
sampling grid) and my concern is to make sure that this information
ends up on the right processor. [ In my MPI version, I send one_t as
a message from the master to the computing slaves. ]
> You don't want to say the subroutine is PURE in this case
Why? As long as it doesn't change anything besides one_t, the
procedure is pure, isn't it?
> (nor do you need to, since there is no FORALL involved any more).
It's nice if the compiler can catch some obviosu dependencies.
Cheers,
-Thorsten
--
Thorsten Ohl, Physics Department, TU Darmstadt -- [log in to unmask]
http://crunch.ikp.physik.tu-darmstadt.de/~ohl/ [<=== PGP public key here]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|