Skip to content

Commit

Permalink
(#44) memory issue with listneigh in test_link fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
danieljprice committed Aug 5, 2020
1 parent 434b194 commit 02cdfc7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/tests/test_link.F90
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,15 @@ subroutine test_link(ntests,npass)
integer :: nfailed(8)
logical :: iactivei,iactivej,activecell
real, allocatable :: xyzcache(:,:)
integer :: listneigh(maxneigh)
integer, allocatable :: listneigh(:)
character(len=1), dimension(3), parameter :: xlabel = (/'x','y','z'/)

if (id==master) write(*,"(a,/)") '--> TESTING LINKLIST / NEIGHBOUR FINDING'
!
!--allocate memory for neighbour list
!
allocate(listneigh(maxneigh))
!
!--set up a random particle distribution
!
npart = 0
Expand Down Expand Up @@ -436,6 +440,7 @@ subroutine test_link(ntests,npass)
enddo

if (allocated(xyzcache)) deallocate(xyzcache)
deallocate(listneigh)

if (id==master) write(*,"(/,a,/)") '<-- LINKLIST TEST COMPLETE'

Expand Down

0 comments on commit 02cdfc7

Please sign in to comment.