Skip to content

Commit 5bbe1df

Browse files
committed
fix: Change more c_intmax_t to c_int64_t in interfaces
To match PRIF v0.5, update the kind of more integer arguments from `c_intmax_t` to `c_int64_t` and update the `caf_teams` test accordingly.
1 parent f9c8e79 commit 5bbe1df

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/prif.F90

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ module subroutine prif_num_images_with_team(team, num_images)
506506

507507
module subroutine prif_num_images_with_team_number(team_number, num_images)
508508
implicit none
509-
integer(c_intmax_t), intent(in) :: team_number
509+
integer(c_int64_t), intent(in) :: team_number
510510
integer(c_int), intent(out) :: num_images
511511
end subroutine
512512

@@ -520,15 +520,15 @@ module subroutine prif_this_image_with_coarray(coarray_handle, team, cosubscript
520520
implicit none
521521
type(prif_coarray_handle), intent(in) :: coarray_handle
522522
type(prif_team_type), intent(in), optional :: team
523-
integer(c_intmax_t), intent(out) :: cosubscripts(:)
523+
integer(c_int64_t), intent(out) :: cosubscripts(:)
524524
end subroutine
525525

526526
module subroutine prif_this_image_with_dim(coarray_handle, dim, team, cosubscript)
527527
implicit none
528528
type(prif_coarray_handle), intent(in) :: coarray_handle
529529
integer(c_int), intent(in) :: dim
530530
type(prif_team_type), intent(in), optional :: team
531-
integer(c_intmax_t), intent(out) :: cosubscript
531+
integer(c_int64_t), intent(out) :: cosubscript
532532
end subroutine
533533

534534
module subroutine prif_failed_images(team, failed_images)
@@ -621,7 +621,7 @@ module subroutine prif_co_broadcast(a, source_image, stat, errmsg, errmsg_alloc)
621621

622622
module subroutine prif_form_team(team_number, team, new_index, stat, errmsg, errmsg_alloc)
623623
implicit none
624-
integer(c_intmax_t), intent(in) :: team_number
624+
integer(c_int64_t), intent(in) :: team_number
625625
type(prif_team_type), intent(out) :: team
626626
integer(c_int), intent(in), optional :: new_index
627627
integer(c_int), intent(out), optional :: stat
@@ -653,7 +653,7 @@ module subroutine prif_get_team(level, team)
653653
module subroutine prif_team_number(team, team_number)
654654
implicit none
655655
type(prif_team_type), intent(in), optional :: team
656-
integer(c_intmax_t), intent(out) :: team_number
656+
integer(c_int64_t), intent(out) :: team_number
657657
end subroutine
658658

659659
module subroutine prif_sync_all(stat, errmsg, errmsg_alloc)

test/caf_teams_test.f90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module caf_teams_test
2-
use iso_c_binding, only: c_size_t, c_ptr, c_intmax_t, c_null_funptr, c_int64_t
2+
use iso_c_binding, only: c_size_t, c_ptr, c_null_funptr, c_int64_t
33
use prif, only: &
44
prif_coarray_handle, &
55
prif_allocate_coarray, &
@@ -31,15 +31,15 @@ function check_teams() result(result_)
3131
! TODO: use final_func to observe automatic deallocation of coarrays
3232
integer :: dummy_element, initial_num_imgs, num_imgs, me, i
3333
integer(c_size_t) :: element_size
34-
integer(c_intmax_t) :: which_team
34+
integer(c_int64_t) :: which_team
3535
integer, parameter :: num_coarrays = 4
3636
type(prif_coarray_handle) :: coarrays(num_coarrays)
3737
type(c_ptr) :: allocated_memory
3838
type(prif_team_type) :: team
3939

4040
call prif_this_image_no_coarray(this_image=me)
4141
call prif_num_images(num_images=initial_num_imgs)
42-
which_team = merge(1_c_intmax_t, 2_c_intmax_t, mod(me, 2) == 0)
42+
which_team = merge(1_c_int64_t, 2_c_int64_t, mod(me, 2) == 0)
4343
element_size = int(storage_size(dummy_element)/8, c_size_t)
4444
call prif_form_team(team_number = which_team, team = team)
4545
call prif_change_team(team)

0 commit comments

Comments
 (0)