Adding scaling study documentation#2573
Merged
Merged
Conversation
Benchmarks shapeworks optimize runtime and CPU-core utilization vs number of subjects (N) and particles (P). Generates a synthetic cohort by replicating a base mesh with rigid + vertex-noise jitter, runs the optimizer with per-phase profiling (SW_TIME_PROFILE), and records wall-clock, serial-SVD vs parallel-sampling time, cores busy, and RSS. - scaling_study.py: cohort generation, project build, run, metrics -> CSV - scaling_plots.py: runtime/phase/utilization plots - run_scaling.sh: env wrapper for the local build
Expose iters_per_split (--iters-per-split / --init-schedule), multiscale, and multiscale_particles so the study can cover the initialization phase, not just optimization. Initialization runs in mean-energy mode (no SVD) and parallelizes well, so it scales very differently from the optimization phase. Adds per-phase wall attribution (init_ms = Optimize::Initialize, runopt_ms = Optimize::RunOptimize) to the CSV and log output.
scaling_phase_plots.py: initialization vs optimization wall time, optimization-fraction, and blended CPU utilization vs N.
Each chart now names the phase it measures (OPTIMIZATION phase / INITIALIZATION vs OPTIMIZATION), and the optimization-only charts note iterations_per_split=0, so it's unambiguous which phase a graph represents.
The cores-vs-subjects charts used a log2 axis that matplotlib labeled as 2^4, 2^6, etc. Set explicit integer ticks (8, 16, ... 4096) via ScalarFormatter for readability.
Extend the plain-integer log2 x-axis to the log-log runtime/phase charts too (via a shared _int_xaxis helper), removing only x minor ticks so the y-axis log minor gridlines are preserved.
Fold the per-phase CPU-utilization comparison (init-only vs opt-only isolated runs) into scaling_phase_plots.py instead of an ad-hoc inline script, reading --init-only-csv and --opt-only-csv at --compare-p.
f01675d to
5349d34
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a test harness and documentation on the optimization scaling with regards to number of particles and number of shapes.