Merger Tree Evolver Profiler¶
Class providing profilers for merger tree evolution—diagnostic objects that record timing and performance information for each ODE integration step. For each differential evolution step, a profiler receives the node being evolved, the time range, the number of function evaluations, the property values and rates, and the wall-clock CPU time. This information can be written to log files to identify bottlenecks in the galaxy formation physics or in the ODE integrator configuration.
Default implementation: mergerTreeEvolveProfilerNull
Methods¶
stepDescriptor→voidProvide a descriptor of the current step.
type (varying_string), intent(in ) :: descriptor
profile→voidProfile a differential evolution step.
type (treeNode ), intent(in ) :: nodedouble precision , intent(in ) :: time , timeStart , timeEnd , timeStepinteger (c_size_t ), intent(in ) :: countEvaluationslogical , intent(in ) :: interruptedinteger (c_size_t ), intent(in ) :: propertyIndextype (varying_string), intent(in ) :: propertyNamedouble precision , intent(in ), dimension(:) :: propertyValue , propertyRate, propertyScale, propertyErrordouble precision , intent(in ) :: timeCPU
mergerTreeEvolveProfilerNull¶
A merger tree evolve profiler that does nothing.
(Default implementation)
mergerTreeEvolveProfilerSimple¶
A merger tree evolve profiler that collects simple data. Each step taken by the ODE evolver is then analyzed. First, a record of the size of the time step taken is recorded. Second, the property which is currently limiting the time step size (i.e. that which has the largest error over the step as judged using the same heuristics as the ODE solver uses to determine step size) is determined and a record of this is kept.
At the end of a run the accumulated data is written to the Galacticus output file, into a group named metaData/evolverProfiler. A histogram of time step sizes is written to timeStepCount with bins specified in timeStep—these bins can be adjusted using [timeStepMinimum], [timeStepMaximum] and [timeStepPointsPerDecade]. A histogram of which properties limited step size is written to propertyHitCount with the associated property names written to [propertyNames].
Methods
calculationReset— Reset memoized calculations.
Parameters
[timeStepMinimum](real; default1.0d-6) — The smallest timestep to use in profiling ODE solver steps.[timeStepMaximum](real; default1.0d+1) — The largest timestep to use in profiling ODE solver steps.[timeStepPointsPerDecade](integer; default3) — The number of bins per decade of timestep to use when profiling ODE solver steps.
mergerTreeEvolveProfilerTinySteps¶
A merger tree evolve profiler that monitors timestep sizes during galaxy evolution and issues warnings when steps fall below a threshold, helping to diagnose stiff ODE systems or convergence problems. The warning threshold is set by [timeStepTiny] and the minimum recorded step size is tracked via [timeStepMinimum].
Parameters
[timeStepTiny](real; default1.0d-9) — The time step below which warnings will be issued.