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

Commit

Permalink
Small changes to help track down the source of a mysterious segfault …
Browse files Browse the repository at this point in the history
…that only happens in ifort
  • Loading branch information
daminton committed Aug 29, 2021
1 parent c22a1a7 commit 1ae2a6f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/symba/symba_encounter_check.f90
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module function symba_encounter_check_pl(self, system, dt, irec) result(lany_enc
integer(I8B) :: k, nplplm
integer(I4B) :: i, j, nenc
real(DP) :: xr, yr, zr, vxr, vyr, vzr, rhill1, rhill2
logical, dimension(self%nplplm) :: lencounter, loc_lvdotr
logical, dimension(:), allocatable :: lencounter, loc_lvdotr
real(DP), dimension(:,:), pointer :: xh, vh
real(DP), dimension(:), pointer :: rhill
integer(I4B), dimension(:,:), pointer :: k_plpl
Expand All @@ -28,6 +28,8 @@ module function symba_encounter_check_pl(self, system, dt, irec) result(lany_enc

associate(pl => self, xh => self%xh, vh => self%vh, rhill => self%rhill, npl => self%nbody, k_plpl => self%k_plpl)
nplplm = self%nplplm
allocate(lencounter(nplplm))
allocate(loc_lvdotr(nplplm))
lencounter(:) = .false.
loc_lvdotr(:) = .false.

Expand All @@ -48,7 +50,9 @@ module function symba_encounter_check_pl(self, system, dt, irec) result(lany_enc
end do
!$omp end parallel do

!$omp parallel workshare
nenc = count(lencounter(:))
!$omp end parallel workshare
lany_encounter = nenc > 0
if (lany_encounter) then
associate(plplenc_list => system%plplenc_list)
Expand Down

0 comments on commit 1ae2a6f

Please sign in to comment.