Skip to content

Commit

Permalink
Merge pull request #655 from galacticusorg/fixTreeReadScaleSet
Browse files Browse the repository at this point in the history
Avoid thread conflicts when setting dark matter profile scales read from merger tree files
  • Loading branch information
abensonca authored Jul 27, 2024
2 parents d38fdea + b240c4c commit 2126b13
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions source/merger_trees.construct.read.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2056,7 +2056,7 @@ subroutine readAssignScaleRadii(self,nodes,nodeList)
& useFallbackScaleMethod
type (rootFinder ) , save :: finder
logical , save :: finderConstructed =.false.
!$omp threadprivate(finder)
!$omp threadprivate(finder,finderConstructed)
type (varying_string ) :: message
character (len=16 ) :: label

Expand Down Expand Up @@ -2161,11 +2161,11 @@ subroutine readAssignScaleRadii(self,nodes,nodeList)
! The node mass is below the reliability threshold, or no scale information is available. Set the scale radius using
! the fallback method.
node_ => nodeList(iIsolatedNode)%node
radiusScale=max( &
& min( &
radiusScale=max( &
& min( &
& self%darkMatterProfileScaleRadius_%radius (node_) , &
& self%darkMatterHaloScale_ %radiusVirial(node_)/self%presetScaleRadiiConcentrationMinimum &
& ) , &
& ) , &
& self%darkMatterHaloScale_ %radiusVirial(node_)/self%presetScaleRadiiConcentrationMaximum &
& )
call darkMatterProfile%scaleSet(radiusScale)
Expand Down

0 comments on commit 2126b13

Please sign in to comment.