Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Went back to parallel do simd loop for the narrow-phase loop
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Oct 1, 2021
1 parent 2006e7e commit 9bd7246
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/encounter/encounter.f90
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,10 @@ subroutine encounter_check_all_sort_and_sweep_plpl(npl, nplm, x, v, renc, dt, lv
end do
! Now that we have identified potential pairs, use the narrow-phase process to get the final values
lenc_final(:) = .true.


!$omp parallel do default(private) schedule(static)&
!$omp parallel do simd default(firstprivate) schedule(static)&
!$omp shared(lenc_final, lvdotr_final) &
!$omp firstprivate(nenc, nplm, dt, index1, index2, renc, x, v)
!$omp lastprivate(i, j, xr, yr, zr, vxr, vyr, vzr, renc12)
do k = 1, nenc
i = index1(k)
j = index2(k)
Expand All @@ -248,7 +247,7 @@ subroutine encounter_check_all_sort_and_sweep_plpl(npl, nplm, x, v, renc, dt, lv
call encounter_check_one(xr, yr, zr, vxr, vyr, vzr, renc12, dt, lenc_final(k), lvdotr_final(k))
end if
end do
!$omp end parallel do
!$omp end parallel do simd

nenc = count(lenc_final(:)) ! Count the true number of encounters
allocate(tmp(nenc))
Expand Down

0 comments on commit 9bd7246

Please sign in to comment.