From 075b11bce2f932c83de3e80e198b8386d31b5768 Mon Sep 17 00:00:00 2001 From: Dan Bonachea Date: Thu, 16 Jan 2025 17:50:17 -0800 Subject: [PATCH] Resolve a minor TODO This is a left-over from pull request #171 and #172 that was only possible to fully resolve now they are both merged. --- src/caffeine/prif_private_s.F90 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/caffeine/prif_private_s.F90 b/src/caffeine/prif_private_s.F90 index 7862c3db..79fb2466 100644 --- a/src/caffeine/prif_private_s.F90 +++ b/src/caffeine/prif_private_s.F90 @@ -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 @@ -246,11 +249,7 @@ subroutine base_pointer(coarray_handle, image_num, 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