@@ -72,8 +72,8 @@ contains
7272 !> Initializes the values of various IBM variables, such as ghost points and image points.
7373 impure subroutine s_ibm_setup ()
7474
75- integer :: i, j, k
76- integer :: max_num_gps
75+ integer :: i, j, k
76+ integer (kind = 8 ) :: max_num_gps
7777
7878 call nvtxStartRange(" SETUP-IBM-MODULE" )
7979
@@ -119,10 +119,10 @@ contains
119119 ! find the number of ghost points and set them to be the maximum total across ranks
120120 call s_find_num_ghost_points(num_gps)
121121 if (moving_immersed_boundary_flag) then
122- call s_mpi_allreduce_integer_sum(num_gps, max_num_gps)
123- max_num_gps = min (max_num_gps* 2 , (m + 1 ) * (n + 1 ) * (p + 1 ))
122+ call s_mpi_allreduce_integer_sum(int ( num_gps, 8 ) , max_num_gps)
123+ max_num_gps = min (max_num_gps* 2_8 , int (m + 1 , 8 ) * int (n + 1 , 8 ) * int (p + 1 , 8 ))
124124 else
125- max_num_gps = num_gps
125+ max_num_gps = int ( num_gps, 8 )
126126 end if
127127
128128 ! set the size of the ghost point arrays to be the amount of points total, plus a factor of 2 buffer
@@ -1071,7 +1071,8 @@ contains
10711071 subroutine s_compute_centroid_offset (ib_marker )
10721072
10731073 integer , intent (in ) :: ib_marker
1074- integer :: i, j, k, num_cells, num_cells_local, decoded_gbl_id
1074+ integer :: i, j, k, num_cells_local, decoded_gbl_id
1075+ integer (kind= 8 ) :: num_cells
10751076 real (wp), dimension (1 :3 ) :: center_of_mass, center_of_mass_local
10761077
10771078 ! Offset only needs to be computes for specific geometries
@@ -1098,7 +1099,7 @@ contains
10981099 end do
10991100
11001101 ! reduce the mass contribution over all MPI ranks and compute COM
1101- call s_mpi_allreduce_integer_sum(num_cells_local, num_cells)
1102+ call s_mpi_allreduce_integer_sum(int ( num_cells_local, 8 ) , num_cells)
11021103 if (num_cells /= 0 ) then
11031104 call s_mpi_allreduce_sum(center_of_mass_local(1 ), center_of_mass(1 ))
11041105 call s_mpi_allreduce_sum(center_of_mass_local(2 ), center_of_mass(2 ))
0 commit comments