Print

Print


OK.  The only reason I put the allocate in the subroutine was to show
that it could be done there.  Since you made the field PRIVATE, it
must be allocated in a routine in the module that defines the type.
As long as you have declared the mapping of the array of these
objects, they will be allocated correctly (i.e., on the correct
processors) by the ALLOCATE statement.

Yes, you can say PURE, although you don't need to.

I don't know what you meant by your last sentence.

Maybe we should take this offline to save bandwidth on the mailing
list?

	 --Carl Offner

****************************************************************
Carl Offner
High Performance Fortran Compiler Development
Digital Equipment Corporation
129 Parker Street, PKO3-2/B12
Maynard, MA 01754-2198
USA

(978) 493-3051
[log in to unmask]
****************************************************************


>Date: Wed, 29 Apr 1998 20:06:26 +0200
>From: Thorsten Ohl <[log in to unmask]>
>
>> 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]
>


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%