|
| template<int dim> |
| unsigned int | estimate_dofs (int n_refinements, int degree) |
| | Calculate expected DoFs for given refinement level.
|
| template<int dim> |
| int | calculate_min_refinements (int n_processes, int degree, unsigned int min_dofs_per_proc=MIN_DOFS_PER_PROCESS) |
| | Calculate minimum refinement level for given process count.
|
| template<int dim> |
| TimingResults | run_matrix_based_single (const ProblemInterface< dim > &problem, int n_refinements, int degree, MPI_Comm comm) |
| | Run matrix-based solver and collect timing.
|
| template<int dim, int fe_degree> |
| TimingResults | run_matrix_free_single (const ProblemInterface< dim > &problem, int n_refinements, MPI_Comm comm) |
| | Run matrix-free solver and collect timing.
|
| template<int dim> |
| ScalingResult | run_benchmark_with_trials (const ProblemInterface< dim > &problem, const std::string &solver_type, const std::string &test_type, int n_refinements, int degree, int n_warmup, int n_trials, MPI_Comm comm) |
| | Run multiple trials and compute statistics.
|
| template<int dim> |
| std::pair< double, double > | run_strong_scaling_test (std::vector< ScalingResult > &results, int n_refinements, int degree, int n_warmup, int n_trials, double baseline_solve_mb, double baseline_solve_mf, double baseline_total_mb, double baseline_total_mf, MPI_Comm comm) |
| | Strong scaling test with proper problem sizing.
|
| template<int dim> |
| void | run_weak_scaling_test (std::vector< ScalingResult > &results, int base_refinements, int degree, int n_warmup, int n_trials, double baseline_solve_mb, double baseline_solve_mf, MPI_Comm comm) |
| | Weak scaling test with proper problem scaling.
|
| void | write_results_csv (const std::vector< ScalingResult > &results, const std::string &filename, MPI_Comm comm) |
| | Write results to CSV file.
|
| void | print_summary (const std::vector< ScalingResult > &results, MPI_Comm comm) |
| | Print summary table.
|
| void | print_usage (const char *program_name) |
| int | main (int argc, char *argv[]) |
Comprehensive strong and weak scaling benchmark for the Hybrid ADR Solver.
This benchmark measures:
- Strong Scaling: Fixed problem size, varying core count
- Speedup: S(p) = T(1) / T(p)
- Efficiency: E(p) = S(p) / p = T(1) / (p * T(p))
- Weak Scaling: Problem size scales with core count (constant work per core)
- Efficiency: E(p) = T(1) / T(p) (ideal = 1.0)
Usage: mpirun -np <N> ./scaling_benchmark [options]
Options: –strong Run strong scaling test only –weak Run weak scaling test only –min-ref <n> Minimum refinements (default: 3) –max-ref <n> Maximum refinements (default: 7) –degree <n> Polynomial degree (default: 2) –output <file> Output CSV file prefix (default: scaling_results) –threads <n> Threads per MPI process (default: auto) –trials <n> Number of trials for averaging (default: 3) –warmup <n> Number of warmup runs (default: 1) –dim <n> Dimension 2 or 3 (default: 2)