Performance¶
This page lists what sets the run time of SIMPLE and how to reduce it. A run has two phases, both timed in the log: field setup (splines, canonical or Boozer transformation, start surface) and tracing. Setup dominates for a few hundred markers, tracing for thousands. Measured scaling and profile: Performance measurements.
Build and threads¶
Production:
make CONFIG=Fast(native CPU tuning). Use-DSIMPLE_DETERMINISTIC_FP=ON(no fast-math) only for regression comparisons.Markers are traced in parallel with OpenMP. Set
OMP_NUM_THREADSto the physical cores,OMP_PLACES=coresandOMP_PROC_BIND=spread. Tracing scales nearly linearly up to 16 threads; setup is mostly serial.One run uses one node. Spread large ensembles over independent jobs (equilibria, seeds, or
batch_sizebatches); cluster scripts are in Clusters.For many markers in Boozer coordinates without collisions, walls or classification, use the CUDA backend (GPU tracing).
Physics settings¶
Cost is proportional to
ntestpart×trace_timefor confined markers; lost markers stop early.contr_pp(default \(-1\)) counts strongly passing markers as confined without tracing. In Tutorial 1: Loss fraction from a VMEC equilibrium this skips 130 of 256 markers;contr_pp = -1d10traces them.fast_class = .true.withtcut > 0stops regular trapped orbits after classification (Orbit classification).macrostep_time_grid = 'log'resolves early losses in time without adding microsteps.
Numerical settings¶
npoiper2(default 256) sets the step size. Check the loss fraction for convergence by halving the step; symplecticity does not guarantee stability at large steps.Higher-order integrators (
integmode3 to 7, 15) cost more per step; symplectic Euler (integmode = 1) is usually fastest for loss fractions.multharm,ns_sandns_tpset the VMEC spline resolution; lower values (for examplemultharm = 3) speed up setup for scans.canonical_grid_nr,canonical_grid_ntheta,canonical_grid_nphiset the Meiss and Albert transformation grid; change one at a time in resolution studies.
Guidance per key: Numerical settings.