Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions src/simulation/m_ibm.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ contains
#ifdef MFC_MPI
if (num_procs > 1) then
@:ALLOCATE(send_ids(size(patch_ib)), send_ft(6, size(patch_ib)))
allocate (recv_forces_snap(size(patch_ib), 3), recv_torques_snap(size(patch_ib), 3), recv_ids(size(patch_ib)), &
& recv_ft(6, size(patch_ib)))
@:ALLOCATE(recv_forces_snap(size(patch_ib), 3), recv_torques_snap(size(patch_ib), 3), recv_ids(size(patch_ib)), &
& recv_ft(6, size(patch_ib)))
end if
#endif

Expand Down Expand Up @@ -1310,6 +1310,7 @@ contains

recv_forces_snap = 0._wp
recv_torques_snap = 0._wp
$:GPU_UPDATE(device='[recv_forces_snap, recv_torques_snap]')
tag = 300

do k = 1, min(2*ib_neighborhood_radius, num_procs_${X}$ - 1)
Expand All @@ -1335,8 +1336,8 @@ contains
call MPI_UNPACK(ib_force_recv_buf, buf_size, unpack_pos, recv_ids, recv_count, MPI_INTEGER, &
& MPI_COMM_WORLD, ierr)
call MPI_UNPACK(ib_force_recv_buf, buf_size, unpack_pos, recv_ft, 6*recv_count, mpi_p, MPI_COMM_WORLD, ierr)
$:GPU_PARALLEL_LOOP(private='[i, j]', copyin='[recv_ft, recv_ids]', copy='[forces, torques, &
& recv_forces_snap, recv_torques_snap]')
$:GPU_UPDATE(device='[recv_ids, recv_ft]')
$:GPU_PARALLEL_LOOP(private='[i, j]', copy='[forces, torques]')
Comment on lines +1339 to +1340
do i = 1, recv_count
call s_get_neighborhood_idx(recv_ids(i), j)
if (j > 0) then
Expand Down Expand Up @@ -1381,7 +1382,8 @@ contains
call MPI_UNPACK(ib_force_recv_buf, buf_size, unpack_pos, recv_ids, recv_count, MPI_INTEGER, &
& MPI_COMM_WORLD, ierr)
call MPI_UNPACK(ib_force_recv_buf, buf_size, unpack_pos, recv_ft, 6*recv_count, mpi_p, MPI_COMM_WORLD, ierr)
$:GPU_PARALLEL_LOOP(private='[i, j]', copyin='[recv_ft, recv_ids]', copy='[forces, torques]')
$:GPU_UPDATE(device='[recv_ids, recv_ft]')
$:GPU_PARALLEL_LOOP(private='[i, j]', copy='[forces, torques]')
Comment on lines +1385 to +1386
do i = 1, recv_count
call s_get_neighborhood_idx(recv_ids(i), j)
if (j > 0) then
Expand Down Expand Up @@ -1599,7 +1601,7 @@ contains
#ifdef MFC_MPI
if (num_procs > 1) then
@:DEALLOCATE(send_ids, send_ft)
deallocate (recv_forces_snap, recv_torques_snap, recv_ids, recv_ft)
@:DEALLOCATE(recv_forces_snap, recv_torques_snap, recv_ids, recv_ft)
end if
#endif

Expand Down
Loading