Skip to content
johnny powell edited this page Mar 15, 2024 · 4 revisions

This wiki is johnny's extension of the wonderful ChaNGa wiki on the N-body Shop GitHub page. The intention is to supply some more extensive information on various aspects of ChaNGa.

First is an entry on the meaning of the columns in a ChaNGa timings file from Copilot. Apologies for some TeX; I have removed a lot but there's much more work to do.

GitHub Copilot

Let's break down the structure of the .timings file you've provided.

This file contains timing information for each step of a ChaNGa simulation. Each step corresponds to a time step in the simulation, and the timings are broken down by "rung". In the context of ChaNGa, a {\color{red}rung} is a level in the \underline{time stepping hierarchy} used to integrate the system forward in time. {\color{blue}Particles in higher rungs} are \underline{evolved} with {\color{red}smaller} time steps.

Here's a breakdown of the columns:

Rung: The rung number. Particles in \underline{higher} rungs are evolved with \underline{smaller time steps}.

annotation: rungs with higher numbers versus ``higher rungs''.

Count: The number of particles in this rung.

Grav: The time spent calculating gravitational forces for particles in this rung.

annotation: It hardly matters to my assessment of timing information what the units of time are here, because it is the relative values that presumably are important in performance evaluation -- especially when the simulation will not complete.

uDot: The time spent calculating other forces (e.g., hydrodynamic forces for gas particles) for particles in this rung.

annotation: presumably the uDot value should then be zero for a DM only simulation, ehh?

DD: The time spent in the \underline{domain decomposition}, which is the process of dividing the simulation volume among the available processors.

annotation: This information is very helpful, because I thought of DD very differently, i. e. having little to do with processors!

LoadB: The time spent in the load balancing phase, which is the process of redistributing particles among processors to ensure an even workload.

TBuild: The time spent building the tree data structure used for the gravity calculation.

annotation: T for tree

Adjust: The time spent in the {\color{blue}time step adjustment} phase, where \underline{the rung assignments for particles are updated based on their dynamical state.}

annotation: Exactly what is the algorithm? Higher rung number is shorter integration time, so faster particles need to be integrated more often, right?

EAdjust: The time spent in {\color{blue}energy} adjustment.

Kick: The time spent in the "kick" phase of the leapfrog integrator, where the velocities of the particles are updated.

Drift: The time spent in the "drift" phase of the leapfrog integrator, where the positions of the particles are updated.

Cache: The time spent in cache operations.

The SF/Feedback line provides timing information for star formation and feedback processes:

annotation: This value should be zero for all AGORA calibrations except the last one, right?

StarForm: The time spent in the star formation process.

annotation: This value should be zero for all AGORA calibrations except the penultimate one, right?

FeedB: The time spent in the feedback process, where energy and momentum are returned to the gas by stars.

annotation:

DistFeedB: The time spent distributing feedback energy and momentum to neighboring gas particles.

annotation: This value should be zero for all AGORA calibrations except the last one, right?

DD: The time spent in the {\color{blue}domain decomposition} phase \underline{during the star formation and feedback} processes.

annotation:

LoadB: The time spent in the load balancing phase \underline{during the star formation and feedback} processes.

TBuild: The time spent {\color{blue}building the tree} during the \underline{star formation and feedback processes.}

The Totals line provides the total time spent in each phase for all rungs.

This file provides a detailed breakdown of where time is being spent in a ChaNGa simulation, which can be useful for performance tuning and understanding the computational requirements of different parts of the simulation.

Clone this wiki locally