@@ -101,7 +101,6 @@ contains
101101 type(integer_field), optional, intent (in ) :: ib_markers
102102 type(scalar_field), intent (in ), optional :: beta
103103 integer , dimension (num_dims) :: sizes_glb, sizes_loc
104- integer , dimension (1 ) :: airfoil_glb, airfoil_loc, airfoil_start
105104
106105#ifdef MFC_MPI
107106 integer :: i, j
@@ -180,11 +179,11 @@ contains
180179 subroutine s_initialize_mpi_data_ds (q_cons_vf )
181180
182181 type(scalar_field), dimension (sys_size), intent (in ) :: q_cons_vf
183- integer , dimension (num_dims) :: sizes_glb, sizes_loc
182+ integer , dimension (num_dims) :: sizes_loc
184183 integer , dimension (3 ) :: sf_start_idx
185184
186185#ifdef MFC_MPI
187- integer :: i, j, q, k, l, m_ds, n_ds, p_ds, ierr
186+ integer :: i, m_ds, n_ds, p_ds, ierr
188187
189188 sf_start_idx = (/ 0 , 0 , 0 / )
190189
@@ -297,16 +296,22 @@ contains
297296 real (wp), intent (out ) :: vcfl_max_glb
298297 real (wp), intent (out ) :: Rc_min_glb
299298
299+ icfl_max_glb = icfl_max_loc
300+ vcfl_max_glb = vcfl_max_loc
301+ Rc_min_glb = Rc_min_loc
302+
300303#ifdef MFC_SIMULATION
301304#ifdef MFC_MPI
302- integer :: ierr !< Generic flag used to identify and report MPI errors
305+ block
306+ integer :: ierr
303307
304- call MPI_REDUCE(icfl_max_loc, icfl_max_glb, 1 , mpi_p, MPI_MAX, 0 , MPI_COMM_WORLD, ierr)
308+ call MPI_REDUCE(icfl_max_loc, icfl_max_glb, 1 , mpi_p, MPI_MAX, 0 , MPI_COMM_WORLD, ierr)
305309
306- if (viscous) then
307- call MPI_REDUCE(vcfl_max_loc, vcfl_max_glb, 1 , mpi_p, MPI_MAX, 0 , MPI_COMM_WORLD, ierr)
308- call MPI_REDUCE(Rc_min_loc, Rc_min_glb, 1 , mpi_p, MPI_MIN, 0 , MPI_COMM_WORLD, ierr)
309- end if
310+ if (viscous) then
311+ call MPI_REDUCE(vcfl_max_loc, vcfl_max_glb, 1 , mpi_p, MPI_MAX, 0 , MPI_COMM_WORLD, ierr)
312+ call MPI_REDUCE(Rc_min_loc, Rc_min_glb, 1 , mpi_p, MPI_MIN, 0 , MPI_COMM_WORLD, ierr)
313+ end if
314+ end block
310315#else
311316 icfl_max_glb = icfl_max_loc
312317
@@ -336,9 +341,9 @@ contains
336341 !> Reduce an array of vectors to their global sums across all MPI ranks.
337342 impure subroutine s_mpi_allreduce_vectors_sum (var_loc , var_glb , num_vectors , vector_length )
338343
339- integer , intent (in ) :: num_vectors, vector_length
340- real (wp), dimension (:,:), intent (in ) :: var_loc
341- real (wp), dimension (:,:), intent (out ) :: var_glb
344+ integer , intent (in ) :: num_vectors, vector_length
345+ real (wp), dimension (:,:), intent (in ) :: var_loc
346+ real (wp), dimension (:,:), intent (inout ) :: var_glb
342347
343348#ifdef MFC_MPI
344349 integer :: ierr !< Generic flag used to identify and report MPI errors
0 commit comments