Skip to content

Commit

Permalink
Fix bug in ordering of HDF5 group close and access unlock
Browse files Browse the repository at this point in the history
HDF5 access was unlocked before the group close, leading to possible thread conflicts (and resulting segfaults) in the HDF5 library.
  • Loading branch information
abensonca committed Jul 27, 2021
1 parent 2a047ab commit 8a4cba7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/merger_trees.operators.output_structure.F90
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ subroutine outputStructureOperatePreEvolution(self,tree)
countPropertiesDouble = 0
countPropertiesInteger = 0
select type (extractor_ => self%nodePropertyExtractor_)
type is (nodePropertyExtractorNull)
type is (nodePropertyExtractorNull )
! Null extractor - pointless.
call Galacticus_Error_Report('null extractor is pointless'//{introspection:location})
class is (nodePropertyExtractorScalar )
Expand Down Expand Up @@ -283,8 +283,8 @@ subroutine outputStructureOperatePreEvolution(self,tree)
call dataset %writeAttribute(unitsInSIInteger ( i),'unitsInSI' )
call dataset %close ( )
end do
call treeGroup %close()
!$ call hdf5Access%unset()
call treeGroup%close()
! Free workspace.
deallocate(propertiesDouble )
deallocate(propertiesInteger )
Expand Down

0 comments on commit 8a4cba7

Please sign in to comment.