Skip to content

Commit 3a3be3b

Browse files
committed
Add testing of team creation when running with only one image in
native-multi-image test
1 parent fbb7fb2 commit 3a3be3b

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

app/native-multi-image.F90

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -112,18 +112,20 @@ program native_multi_image
112112
res = GET_TEAM()
113113
write(*,'(A,I3)') "Initial team number is ", TEAM_NUMBER()
114114

115-
if (ni < 2) then
116-
if (me == 1) write(*,'(A)') "Please run program again with at least 2 images to test more TEAM features."
115+
if (ni == 1) then
116+
team_id = ni
117117
else
118118
team_id = merge(1, 2, me <= ni/2)
119-
form team(team_id, subteam)
120-
sync team(subteam)
121-
change team(subteam)
122-
write(*,'(A,I3,A,I3,A,I3)') 'Inside CHANGE TEAM construct: ', this_image(), ' of ', num_images(), ' in team number ', team_number()
123-
end team
124-
call sync_all
125-
write(*,'(A,I3)') "After END TEAM statement, TEAM_NUMBER() is ", team_number()
126119
end if
120+
121+
form team(team_id, subteam)
122+
sync team(subteam)
123+
change team(subteam)
124+
write(*,'(A,I3,A,I3,A,I3)') 'Inside CHANGE TEAM construct: ', this_image(), ' of ', num_images(), ' in team number ', team_number()
125+
end team
126+
call sync_all
127+
write(*,'(A,I3)') "After END TEAM statement, TEAM_NUMBER() is ", team_number()
128+
127129
#endif
128130

129131
call sync_all

0 commit comments

Comments
 (0)