Skip to content

Commit 23aacd7

Browse files
jaguilarjaguilar
authored andcommitted
Bug Fix in simulation/mpi_proxy
I removed the collision force sending arrays in mpi_proxy and added a check in the deallocate for processor count greater than 0. This is a bug fix for running mfc with mpi with only 1 rank.
1 parent f061ae2 commit 23aacd7

1 file changed

Lines changed: 1 addition & 16 deletions

File tree

src/simulation/m_mpi_proxy.fpp

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,6 @@ module m_mpi_proxy
3838
integer :: neighbor_list(MAX_NEIGHBORS, 3)
3939
integer :: n_neighbors
4040
$:GPU_DECLARE(create='[p_send_counts]')
41-
integer, allocatable :: force_send_counts(:), force_recv_counts(:)
42-
integer, allocatable :: force_send_ids(:,:)
43-
integer, allocatable :: flat_send_ids(:)
44-
real(wp), allocatable :: force_send_vals(:,:,:)
45-
real(wp), allocatable :: flat_send_vals(:)
46-
$:GPU_DECLARE(create='[force_send_counts, force_send_ids, force_send_vals]')
4741

4842
contains
4943

@@ -133,12 +127,6 @@ contains
133127
end do
134128
end do
135129
end do
136-
@:ALLOCATE(force_send_counts(0:num_procs-1))
137-
@:ALLOCATE(force_recv_counts(0:num_procs-1))
138-
@:ALLOCATE(force_send_ids(0:num_procs-1, 1:lag_params%nParticles_glb))
139-
@:ALLOCATE(force_send_vals(0:num_procs-1, 1:lag_params%nParticles_glb, 1:3))
140-
@:ALLOCATE(flat_send_ids(1:lag_params%nParticles_glb))
141-
@:ALLOCATE(flat_send_vals(1:3*lag_params%nParticles_glb))
142130
#endif
143131

144132
end subroutine s_initialize_solid_particles_mpi
@@ -1292,11 +1280,8 @@ contains
12921280
@:DEALLOCATE(ib_buff_send, ib_buff_recv)
12931281
end if
12941282
1295-
if (particles_lagrange) then
1283+
if (particles_lagrange .and. num_procs > 1) then
12961284
@:DEALLOCATE(p_send_buff, p_recv_buff, p_send_ids)
1297-
@:DEALLOCATE(force_send_counts, force_recv_counts)
1298-
@:DEALLOCATE(force_send_ids, force_send_vals)
1299-
@:DEALLOCATE(flat_send_ids, flat_send_vals)
13001285
end if
13011286
#endif
13021287

0 commit comments

Comments
 (0)