Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/caffeine/prif_private_s.F90
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
! Copyright (c), The Regents of the University of California
! Terms of use are as specified in LICENSE.txt

#include "assert_macros.h"

submodule(prif) prif_private_s
use assert_m
implicit none
Expand Down Expand Up @@ -244,13 +247,8 @@ subroutine base_pointer(coarray_handle, image_num, ptr)
integer(c_int), intent(in) :: image_num
integer(c_intptr_t), intent(out) :: ptr

integer(c_int) :: num_img

! TODO TEAMS: either move the assertion below into `caf_convert_base_addr()`
! (avoiding the need to call prif_num_images here to fetch initial team size)
! or cache the initial team size in a private module variable so we can just access it (issue #62)
call prif_num_images(num_images=num_img)
call assert(image_num > 0 .and. image_num <= num_img, "base_pointer: image_num not within valid range")
call_assert_describe(image_num > 0 .and. image_num <= initial_team%num_images, "base_pointer: image_num not within valid range")
ptr = caf_convert_base_addr(coarray_handle%info%coarray_data, image_num)
end subroutine

Expand Down