Skip to content

Commit

Permalink
squash me: in the middle of implementing change team (see notes)
Browse files Browse the repository at this point in the history
should switch strategy and have the form team and allocations
broadcast child heap data, and change team if the new team has child teams
  • Loading branch information
everythingfunctional committed Aug 7, 2024
1 parent dc7546e commit c5021bf
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions src/caffeine/teams_s.f90
Original file line number Diff line number Diff line change
@@ -1,13 +1,29 @@
! Copyright (c), The Regents of the University of California
! Terms of use are as specified in LICENSE.txt
submodule(prif:prif_private_s) teams_s
use iso_c_binding, only: c_null_funptr, c_f_pointer
use iso_c_binding, only: c_null_funptr, c_f_pointer, c_loc

implicit none
contains

module procedure prif_change_team
call unimplemented("prif_change_team")
if (caf_this_image(team%gex_team) == 1) then ! need to setup the shared heap
if (caf_this_image(current_team%gex_team) /= 1) then ! we need to get the heap info from the parent team leader
block
integer :: me
call prif_this_image_no_coarray(team = initial_team, this_image = me)
call prif_get( &
image_num = me, &
coarray_handle = current_team%child_team_handle, &
offset = 0_c_size_t, &
current_image_buffer = c_loc(current_team%child_heap_info), &
size_in_bytes = int(storage_size(current_team%child_heap_info)/8, c_size_t))
end block
end if
end if

allocate(current_team)
current_team = team
end procedure

module procedure prif_end_team
Expand Down

0 comments on commit c5021bf

Please sign in to comment.