(j3.2006) this_image( team=zzz), for zzz not current or an ancestor
Anton Shterenlikht
mexas
Wed Jun 7 04:39:31 EDT 2017
>From: Bill Long <longb at cray.com>
>
>> On May 31, 2017, at 4:38 AM, Anton Shterenlikht <mexas at BRIS.AC.UK> wrote:
>>
>> use iso_fortran_env
>> type( team_type ) :: team_new
>> form team( 1 + mod(this_image(),2), team_new )
>> print *, this_image( team_new )
>> end
>>
>> I think this program is not conforming because
>> CD 16.9.190p3 [435:10-11] has:
>> "TEAM ... scalar ... whose value identifies
>> the current or an ancestor team."
>> In this case team_new is neither.
>> Correct?
>
>Correct.
Bill, thanks.
And this modified program:
use iso_fortran_env
type( team_type ) :: team_new
form team( 1 + mod(this_image(),2), team_new )
print *, team_number( team_new )
end
is probably also not conforming because
CD 16.9.189p3 [434:21] has the same text:
"TEAM ... scalar ... whose value identifies
the current or an ancestor team."
I'm just thinking about the implications
of the fact that team-variable becomes
defined after a successful execution of
a FORM TEAM, but is essentially unusable until
CHANGE TEAM.
Are nested CHANGE TEAM statements conforming?
use iso_fortran_env
type( team_type ) :: t1, t2
form team( 1 + mod(this_image(), 2 ), t1 )
form team( 1 + mod(this_image(), 3 ), t2 )
change team(t1)
print *, team_number(t2) ! not conforming?
! t2 neither current nor ancestor
change team(t2)
print *, team_number(t1) ! conforming?
! t1 is an ancestor
end team
end team
end
I find the first 2 sentences of
CD 11.1.5.2p1 [188:4-7] confusing:
"The team-values on the active images that
execute the CHANGE TEAM statement shall
be those of team variables defined by corresponding
executions of the same FORM TEAM statement (11.6.9).
When the CHANGE TEAM statement is executed,
the current team shall be the team that was current
when those team variables were defined."
My feeling is that nested CHANGE TEAM statements
violate somehow the above CD text, but I'm not sure.
Anton
More information about the J3
mailing list