(j3.2006) Comment concerning TEAM_TYPE
Bill Long
longb
Tue Oct 8 16:07:31 EDT 2013
On 10/7/13 11:56 PM, Malcolm Cohen wrote:
> While I thinking of strange things, this seems to be valid:
> CLASS(*),POINTER :: a,b
> TYPE(team_type),TARGET :: x
> a => x
> FORM TEAM(a,13)
(I see you seem to be supporting 13-337)
> ALLOCATE(b,SOURCE=a) ! TEAM_TYPE with POINTER attr?
This violates C501, since b is a team variable. Unfortunately, given
the declarations this would be hard for a compiler to enforce at compile
time. Lock and event variables have the same issue. Maybe these
cannot be constraints. ?
> SELECT TYPE(b)
> TYPE IS (team_type)
> SYNC TEAM(b) ! b is a copy of a?
Yes. There is no ban on having two names for the same team. You can write
form team (a, 13)
form team (b, 13)
where a and b are declared explicitly as type team_type. Effectively a
and b are two names for the same team.
> END SELECT
> DEALLOCATE(b) ! Deallocating TEAM_TYPE is ok?
The omission of DEALLOCATE in the places where team variables can appear
is corrected in Paper 13-336, first edit.
Cheers,
Bill
--
Bill Long longb at cray.com
Fortran Technical Support & voice: 651-605-9024
Bioinformatics Software Development fax: 651-605-9142
Cray Inc./Cray Plaza, Suite 210/380 Jackson St./St. Paul, MN 55101
More information about the J3
mailing list