Skip to content

Commit

Permalink
Nullify pointers on repeated calls to write_trajectory()
Browse files Browse the repository at this point in the history
- When calling write_trajectory() a second time, the declaration
    type(buffer), pointer :: obuffer_io=>null()
  does not nullify the pointer. Added explicit nullification
  in the code in addition.
- No answer changes.
  • Loading branch information
adcroft committed Jul 16, 2015
1 parent 150ae95 commit cea2074
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion icebergs_io.F90
Original file line number Diff line number Diff line change
Expand Up @@ -829,14 +829,17 @@ subroutine write_trajectory(trajectory)
integer :: stderrunit

!I/O vars
type(xyt), pointer :: traj4io=>NULL()
type(xyt), pointer :: traj4io=>null()
integer :: ntrajs_sent_io,ntrajs_rcvd_io
integer :: from_pe,np
type(buffer), pointer :: obuffer_io=>null(), ibuffer_io=>null()
logical :: io_is_in_append_mode

! Get the stderr unit number
stderrunit=stderr()
traj4io=>null()
obuffer_io=>null()
ibuffer_io=>null()

!Assemble the list of trajectories from all pes in this I/O tile

Expand Down

0 comments on commit cea2074

Please sign in to comment.