@@ -23,14 +23,6 @@ module m_mpi_proxy
2323
2424 implicit none
2525
26- !> @name Buffers of the conservative variables received/sent from/to neighboring
27- !! processors. Note that these variables are structured as vectors rather
28- !! than arrays.
29- !> @{
30- real(wp), allocatable, dimension(:) :: q_cons_buffer_in
31- real(wp), allocatable, dimension(:) :: q_cons_buffer_out
32- !> @}
33-
3426 !> @name Receive counts and displacement vector variables, respectively, used in
3527 !! enabling MPI to gather varying amounts of data from all processes to the
3628 !! root process
@@ -41,7 +33,7 @@ module m_mpi_proxy
4133
4234 !> @name Generic flags used to identify and report MPI errors
4335 !> @{
44- integer, private :: err_code, ierr
36+ integer, private :: ierr
4537 !> @}
4638
4739contains
@@ -54,61 +46,6 @@ contains
5446
5547 integer :: i !< Generic loop iterator
5648
57- ! Allocating vectorized buffer regions of conservative variables.
58- ! The length of buffer vectors are set according to the size of the
59- ! largest buffer region in the sub-domain.
60- if (buff_size > 0) then
61-
62- ! Simulation is at least 2D
63- if (n > 0) then
64-
65- ! Simulation is 3D
66- if (p > 0) then
67-
68- allocate (q_cons_buffer_in(0:buff_size* &
69- sys_size* &
70- (m + 2*buff_size + 1)* &
71- (n + 2*buff_size + 1)* &
72- (p + 2*buff_size + 1)/ &
73- (min(m, n, p) &
74- + 2*buff_size + 1) - 1))
75- allocate (q_cons_buffer_out(0:buff_size* &
76- sys_size* &
77- (m + 2*buff_size + 1)* &
78- (n + 2*buff_size + 1)* &
79- (p + 2*buff_size + 1)/ &
80- (min(m, n, p) &
81- + 2*buff_size + 1) - 1))
82-
83- ! Simulation is 2D
84- else
85-
86- allocate (q_cons_buffer_in(0:buff_size* &
87- sys_size* &
88- (max(m, n) &
89- + 2*buff_size + 1) - 1))
90- allocate (q_cons_buffer_out(0:buff_size* &
91- sys_size* &
92- (max(m, n) &
93- + 2*buff_size + 1) - 1))
94-
95- end if
96-
97- ! Simulation is 1D
98- else
99-
100- allocate (q_cons_buffer_in(0:buff_size*sys_size - 1))
101- allocate (q_cons_buffer_out(0:buff_size*sys_size - 1))
102-
103- end if
104-
105- ! Initially zeroing out the vectorized buffer region variables
106- ! to avoid possible underflow from any unused allocated memory
107- q_cons_buffer_in = 0._wp
108- q_cons_buffer_out = 0._wp
109-
110- end if
111-
11249 ! Allocating and configuring the receive counts and the displacement
11350 ! vector variables used in variable-gather communication procedures.
11451 ! Note that these are only needed for either multidimensional runs
@@ -366,10 +303,7 @@ contains
366303 subroutine s_mpi_gather_data_extents (q_sf , data_extents )
367304
368305 real (wp), dimension (:, :, :), intent (in ) :: q_sf
369-
370- real (wp), &
371- dimension (1 :2 , 0 :num_procs - 1 ), &
372- intent (inout ) :: data_extents
306+ real (wp), dimension (1 :2 , 0 :num_procs - 1 ), intent (inout ) :: data_extents
373307
374308#ifdef MFC_MPI
375309
@@ -395,13 +329,8 @@ contains
395329 !! @param q_root_sf Flow variable defined on the entire computational domain
396330 subroutine s_mpi_defragment_1d_flow_variable (q_sf , q_root_sf )
397331
398- real (wp), &
399- dimension (0 :m), &
400- intent (in ) :: q_sf
401-
402- real (wp), &
403- dimension (0 :m), &
404- intent (inout ) :: q_root_sf
332+ real (wp), dimension (0 :m), intent (in ) :: q_sf
333+ real (wp), dimension (0 :m), intent (inout ) :: q_root_sf
405334
406335#ifdef MFC_MPI
407336
@@ -421,12 +350,6 @@ contains
421350
422351#ifdef MFC_MPI
423352
424- ! Deallocating the conservative variables buffer vectors
425- if (buff_size > 0 ) then
426- deallocate (q_cons_buffer_in)
427- deallocate (q_cons_buffer_out)
428- end if
429-
430353 ! Deallocating the receive counts and the displacement vector
431354 ! variables used in variable- gather communication procedures
432355 if ((format == 1 .and. n > 0 ) .or. n == 0 ) then
0 commit comments