Skip to content

Better timing#20

Open
smartalecH wants to merge 1 commit intomainfrom
better_timing
Open

Better timing#20
smartalecH wants to merge 1 commit intomainfrom
better_timing

Conversation

@smartalecH
Copy link
Copy Markdown
Contributor

No description provided.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Feb 8, 2026

@info("Preparing simulation object...")
num_voxels = sim.Nx * sim.Ny * sim.Nz
@info("Preparing simulation object ($(sim.Nx)×$(sim.Ny)×$(sim.Nz) = $(num_voxels) voxels)...")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
@info("Preparing simulation object ($(sim.Nx)×$(sim.Ny)×$(sim.Nz) = $(num_voxels) voxels)...")
@info(
"Preparing simulation object ($(sim.Nx)×$(sim.Ny)×$(sim.Nz) = $(num_voxels) voxels)..."
)

Comment on lines +193 to +195
@info("Simulation complete: $(total_steps) steps in $(round(elapsed, digits=3))s " *
"($(round(mcells_per_s, digits=1)) MVoxels/s overall, " *
"$(round(steady_rate, digits=1)) MVoxels/s after warmup)")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
@info("Simulation complete: $(total_steps) steps in $(round(elapsed, digits=3))s " *
"($(round(mcells_per_s, digits=1)) MVoxels/s overall, " *
"$(round(steady_rate, digits=1)) MVoxels/s after warmup)")
@info(
"Simulation complete: $(total_steps) steps in $(round(elapsed, digits=3))s " *
"($(round(mcells_per_s, digits=1)) MVoxels/s overall, " *
"$(round(steady_rate, digits=1)) MVoxels/s after warmup)"
)

"($(round(mcells_per_s, digits=1)) MVoxels/s overall, " *
"$(round(steady_rate, digits=1)) MVoxels/s after warmup)")
else
@info("Simulation complete: $(total_steps) steps in $(round(elapsed, digits=3))s ($(round(mcells_per_s, digits=1)) MVoxels/s)")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
@info("Simulation complete: $(total_steps) steps in $(round(elapsed, digits=3))s ($(round(mcells_per_s, digits=1)) MVoxels/s)")
@info(
"Simulation complete: $(total_steps) steps in $(round(elapsed, digits=3))s ($(round(mcells_per_s, digits=1)) MVoxels/s)"
)

…amples

Add detailed timing to prepare_simulation! (per-phase: init_geometry,
init_boundaries, add_sources, init_fields, init_monitors) and to run()
(total steps, elapsed time, MVoxels/s overall and after 50-step warmup).

Augment all 6 example scripts to run twice with fresh simulation objects:
once cold (includes JIT compilation) and once warm, to separate algorithmic
cost from compilation overhead. Plotting is done only once at the end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant