Skip to content

Commit

Permalink
fixes a termination problem in the HDF%popall() routine
Browse files Browse the repository at this point in the history
  • Loading branch information
marcdegraef committed Dec 12, 2024
1 parent 195df61 commit 1710e47
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Source/EMsoftOOLib/mod_HDFsupport.f90
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,9 @@ recursive subroutine popall_(self, origin)
call error_check_(self, trim(origin)//'pop_:unable to close requested level for object type '//self%head%next%objectType, &
error,.TRUE.)

! if we just closed the file then we are done.
if (self%head%next%objectType.eq.'f') EXIT

! and re-point the stack head
tmp => self%head%next
self%head%next => self%head%next%next
Expand Down
3 changes: 2 additions & 1 deletion Source/EMsoftOOLib/program_mods/mod_DIfiles.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1242,6 +1242,7 @@ recursive subroutine readDotProductFile_(self, EMsoft, HDF, HDFnames, dpfile, hd
call Message%printError('readDotProductFile','This is not a proper HDF5 file')
end if


! open the dot product file
readonly = .TRUE.
hdferr = HDF%openFile(dpfile, readonly)
Expand Down Expand Up @@ -1674,7 +1675,7 @@ recursive subroutine readDotProductFile_(self, EMsoft, HDF, HDFnames, dpfile, hd
end if

! and close the HDF5 dot product file
!call HDF%popall()
call HDF%popall()

end associate

Expand Down

0 comments on commit 1710e47

Please sign in to comment.