Skip to content

Commit

Permalink
hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
mjv500 committed Dec 21, 2018
1 parent dfb4538 commit e248126
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/wannierise.F90
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,13 @@ subroutine wann_main
if (ierr /= 0) call io_error('Error in allocating cdq in wann_main')

! for MPI
if (allocated(counts)) deallocate (counts)
allocate (counts(0:num_nodes - 1), stat=ierr)
if (ierr /= 0) then
call io_error('Error in allocating counts in wann_main')
end if

if (allocated(displs)) deallocate(displs)
if (allocated(displs)) deallocate (displs)
allocate (displs(0:num_nodes - 1), stat=ierr)
if (ierr /= 0) then
call io_error('Error in allocating displs in wann_main')
Expand Down Expand Up @@ -809,8 +810,8 @@ subroutine wann_main
if (ierr /= 0) call io_error('Error in deallocating m0_loc in wann_main')
end if

if (allocated(counts)) deallocate(counts)
if (allocated(displs)) deallocate(displs)
if (allocated(counts)) deallocate (counts)
if (allocated(displs)) deallocate (displs)

deallocate (history, stat=ierr)
if (ierr /= 0) call io_error('Error deallocating history in wann_main')
Expand Down

0 comments on commit e248126

Please sign in to comment.