Skip to content
Draft
Show file tree
Hide file tree
Changes from 123 commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
96062e1
Ported Mesh_3 benchmarks. Modified benchmarks for the tetrahedral rem…
IasonManolas May 27, 2025
d2b6dfa
Converted the .sh script to a python script to ease debugging
IasonManolas May 28, 2025
f312425
New benchmark python pipeline
Jun 6, 2025
7428ccc
Revert "New benchmark python pipeline"
Jun 7, 2025
b315353
main file to benchmark adaptive remeshing
IasonManolas Jun 7, 2025
3a3ecdc
Added main file to benchmark uniform remeshing
IasonManolas Jun 7, 2025
563f12d
Remove deprecated benchmark files for tetrahedral remeshing, includin…
IasonManolas Jun 7, 2025
9b1ee28
Enhance CMake configuration for tetrahedral remeshing benchmarks by a…
IasonManolas Jun 7, 2025
a0749b7
Refactor quality metrics generation in mesh_quality.h to use JSON for…
IasonManolas Jun 7, 2025
4c3282f
Add common utilities and typedefs for tetrahedral remeshing benchmarks
IasonManolas Jun 7, 2025
b621c16
Add benchmark creation scripts and configuration for tetrahedral reme…
IasonManolas Jun 7, 2025
de5b888
Add benchmark comparison scripts and configuration for tetrahedral re…
IasonManolas Jun 7, 2025
38b623d
Remove obsolete benchmark configuration files for tetrahedral remeshi…
IasonManolas Jun 7, 2025
4b3f1ea
Add README for benchmarking pipeline with features, quickstart, and d…
IasonManolas Jun 7, 2025
0f200cb
Add detailed README files for the benchmarking pipeline
IasonManolas Jun 7, 2025
3eba2b8
Added new file to benchmark the refactored tetrahedral remeshing that…
IasonManolas Jun 13, 2025
5a216ba
Edited to add the new executable for benchmarking my generic tetrahed…
IasonManolas Jun 13, 2025
dbbf985
Added interface for the atomic operations and the execution of atomic…
IasonManolas Jun 13, 2025
22b7704
injected code that calls my refactored atomic operations using a prep…
IasonManolas Jun 13, 2025
cac5b81
Renamed benchmark_atomic_tetrahedral_remeshing to benchmark_refactore…
IasonManolas Jun 16, 2025
0e1f6ee
Renamed "atomic" to "elementary"
IasonManolas Jun 18, 2025
b534982
Merge remote-tracking branch 'jane_cgal_origin/Tet_remeshing-determin…
IasonManolas Jun 20, 2025
4982970
- Creating the absolute path of the results json
IasonManolas Jun 24, 2025
2a62abb
Moved the switch for the refactored split version into the split() fu…
IasonManolas Jun 24, 2025
f5e122c
First working refactored elementary operation. It produces the same r…
IasonManolas Jun 24, 2025
24de54c
Revised elementary operations interface and execution classes
IasonManolas Jun 24, 2025
b191aa2
Added an additional template parameter to ElementaryOperation to allo…
IasonManolas Jun 25, 2025
3c5293a
Fix crash in benchmark_refactored_tetrahedral_remeshing.cpp
IasonManolas Jun 25, 2025
fab9e09
Revert "Fix crash in benchmark_refactored_tetrahedral_remeshing.cpp"
IasonManolas Jun 25, 2025
1fe1e7f
updated benchmark creation and comparison scripts and config files. a…
IasonManolas Jun 25, 2025
ab5041b
Reduced the number of template parameters of the ElementaryOperation …
IasonManolas Jun 26, 2025
e26216a
Implemented LockManager and hardcoded the execution policy of interna…
IasonManolas Jul 1, 2025
d83b856
Refactored
IasonManolas Jul 1, 2025
0918c80
Fixed compilation issues
IasonManolas Jul 1, 2025
603f816
fixed compilation issues
IasonManolas Jul 1, 2025
755b53e
added missing code
IasonManolas Jul 1, 2025
243b612
- Added preproccessor macro for using the threadsafe variant of the i…
IasonManolas Jul 8, 2025
e7872b1
Removed dangling "}"
IasonManolas Jul 8, 2025
8f0c633
- dumping info for debugging purposes
IasonManolas Jul 8, 2025
10bb7ff
-added dump edge function
IasonManolas Jul 8, 2025
f6e3cbe
-using the parallel tag in the Remeshing_triangulation structure
IasonManolas Jul 8, 2025
a4d4ec6
- added some preprocessor macros for
IasonManolas Jul 8, 2025
d88e1ba
Fix trailing whitespace
MaelRL Jul 8, 2025
7254859
Fix static thread local variable definitions
MaelRL Jul 8, 2025
c705ba9
Fix taking reference to temporary object
MaelRL Jul 8, 2025
41a8778
- The execution policy of the internal flip operation depends on whet…
IasonManolas Jul 8, 2025
68d95d7
Enable some macros
MaelRL Jul 9, 2025
3623b14
Try to get a superset of the lock zone for edge flips
MaelRL Jul 9, 2025
41dec1a
Change batch size to 5
MaelRL Jul 9, 2025
830ed3f
Fix trailing whitespace
MaelRL Jul 9, 2025
789b099
Added debug functions
IasonManolas Jul 10, 2025
6e6f140
Refactor locking mechanism in edge flip operations. Working version
IasonManolas Jul 10, 2025
32bc09b
Implemented parallel boundary edge flipping operation. Quality metric…
IasonManolas Jul 10, 2025
e793a75
Small Refactoring
IasonManolas Jul 11, 2025
92f8eb7
Added comment for thread-safety of updating the valence maps during f…
IasonManolas Jul 15, 2025
c5a2b0a
Added an additional command line parameter
IasonManolas Jul 17, 2025
53b2b16
Refactor elementary operations to use a unified ElementSource type
IasonManolas Jul 17, 2025
03301ca
Refactor tetrahedral remeshing operations for improved configurability
IasonManolas Jul 17, 2025
e36a869
Add preprocessor macros configuration and enhance benchmark scripts
IasonManolas Jul 18, 2025
6f9ceaa
Update benchmark configuration and documentation for preprocessor macros
IasonManolas Jul 18, 2025
cc38302
Enhance vertex smoothing operations with new context and surface hand…
IasonManolas Jul 18, 2025
9ca1601
Refactor vertex smoothing operations and enhance context management
IasonManolas Jul 21, 2025
3de21b9
Refactor vertex smoothing operations and enhance context management
IasonManolas Jul 24, 2025
17a89fc
- Modified the smooth() function to incorporate a new preprocessor ma…
IasonManolas Jul 24, 2025
14c8f80
added missing #endif
IasonManolas Jul 24, 2025
39e7d15
- Changed the boost::bimap to a vector for testing purposes
IasonManolas Jul 24, 2025
2acb2e6
small fix
IasonManolas Jul 24, 2025
a6f6cdd
Fixed const correctness for the edge parameter
IasonManolas Aug 1, 2025
6c400d0
- Removed redundant methods
IasonManolas Aug 1, 2025
31efdfc
Add thread-safe logging and edge pair dumping functionality
IasonManolas Aug 1, 2025
696bd52
Reset to original
IasonManolas Aug 1, 2025
9f06945
First correct parallel collapse and paralle remeshing in general.
IasonManolas Aug 13, 2025
1967525
- Updated benchmark files to utilize the C3t3 type for computing the …
IasonManolas Aug 29, 2025
e881b42
fix compilation and trailing whitespaces
janetournois Sep 2, 2025
e82acfb
- Refactor adaptive tetrahedral remeshing benchmark to utilize C3t3 s…
IasonManolas Sep 4, 2025
56e054d
Merge branch 'gsoc2025-Tetra_remeshing_parallel-imanolas' of https://…
IasonManolas Sep 4, 2025
c011fee
Merge branch 'CGAL:master' into gsoc2025-Tetra_remeshing_parallel-ima…
IasonManolas Sep 4, 2025
314f47c
Merge branch 'gsoc2025-Tetra_remeshing_parallel-imanolas' of https://…
IasonManolas Sep 4, 2025
e8344c0
fix compilation
janetournois Sep 4, 2025
421dc84
fix compilation (and remove a few trailing whitespaces)
janetournois Sep 4, 2025
ee33f57
Merge branch 'gsoc2025-Tetra_remeshing_parallel-imanolas' of github.c…
janetournois Sep 4, 2025
a708ffc
fix tabs and indentation
janetournois Sep 5, 2025
6e0352f
add concurrent remeshing to examples
janetournois Sep 5, 2025
1802252
fix license issues, trailing whitespaces, and compilation without tbb
janetournois Sep 5, 2025
6aaa0d5
more compilation fixes
janetournois Sep 5, 2025
361d7f4
add missing mutable
janetournois Sep 5, 2025
f5fdca6
add missing template parameter for CI
janetournois Sep 8, 2025
c6b7a95
start using parallel code in tests
janetournois Sep 8, 2025
29fcd3d
more tests and compilation fixes
janetournois Sep 9, 2025
87d3e66
replace tabs
janetournois Sep 9, 2025
8f9efe3
remove CMakeLists.txt that does not fit the package template
janetournois Sep 9, 2025
c5c77bd
remaining tabs
janetournois Sep 9, 2025
54484a6
fix compilation with g++
janetournois Sep 9, 2025
7d5fdf6
trailing whitespaces and removed extra files
janetournois Sep 9, 2025
44df91c
missing dependencies
janetournois Sep 9, 2025
91cfbfa
Writing lock stats when CGAL_TETRAHEDRAL_REMESHING_WRITE_LOCK_STATS i…
IasonManolas Sep 11, 2025
ae316c6
Dedicated macro for flip debug logs, saving incident cells if locking…
IasonManolas Sep 11, 2025
bb0fd7a
dedicated macro for debug logs for the split operation
IasonManolas Sep 11, 2025
5b00d88
Removed tabs
IasonManolas Sep 11, 2025
3660ac6
deleted trailing whitespaces
IasonManolas Sep 11, 2025
0b76568
fix compilation when using a T3 with Sequential_tag and CGAL_LINKED_W…
janetournois Sep 11, 2025
f9e8374
add more parallel tests
janetournois Sep 11, 2025
06cf5c4
these assertions are wrong
janetournois Sep 11, 2025
0391f33
fix verbose macros
janetournois Sep 11, 2025
34adfe4
initialize m_moves, not a temporary vector
janetournois Sep 11, 2025
c9fc73f
fix execution policy
janetournois Sep 11, 2025
beb282f
shorten a few lines
janetournois Sep 11, 2025
4fb13a9
cosmetic (typedefs, loops, indentation)
janetournois Sep 12, 2025
7764fd5
indentation
janetournois Sep 12, 2025
bbeac00
remove useless code
janetournois Sep 12, 2025
9f1c116
fix warnings + compilation error
sloriot Sep 15, 2025
4bfccec
fix warnings
sloriot Sep 15, 2025
343640c
avoid possible infinite loop
janetournois Sep 15, 2025
53416d0
add cout
janetournois Sep 18, 2025
33c0b59
refactored vertex smoothing operations to use shared context. Resolve…
IasonManolas Sep 18, 2025
a1af565
Merge branch 'gsoc2025-Tetra_remeshing_parallel-imanolas' of https://…
janetournois Sep 18, 2025
5f6cba7
add stuff in the test
janetournois Sep 18, 2025
d4fe1a6
Tetrahedral_remeshing: add parallel execution framework (GSoC 2025)
IasonManolas Jun 2, 2026
9ac7560
remove static functions
janetournois Sep 18, 2025
4eea9d0
PR review cleanup: remove debug artifacts, consolidate benchmarks, fi…
IasonManolas Jun 10, 2026
8bae552
restructure: merge operation classes into their original CGAL headers
IasonManolas Jun 10, 2026
516b5a5
restructure: sync collapse and smooth with upstream bc96ef7 baseline
IasonManolas Jun 10, 2026
ee29a0b
benchmarks: remove commented-out code
IasonManolas Jun 10, 2026
f4c7290
fix compilation on windows
janetournois Jun 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,230 @@
# Benchmark Comparison Tool

This tool compares benchmark results across multiple benchmark runs, providing statistical analysis and visualization of performance metrics, quality measurements, and resource usage data.

## Features

- **Flexible Comparison Modes**: Compare within same executable or across different implementations
- **Statistical Analysis**: Automatic outlier detection and variance analysis
- **Interactive Charts**: Plotly-based charts with hover information and filtering
- **Comprehensive Reports**: HTML reports with detailed metric comparisons
- **Resource Usage Tracking**: Memory and CPU usage analysis (when available)

## Configuration Options

### Comparison Modes

The tool supports two distinct comparison scenarios controlled by the `group_by_executable` setting:

#### 1. Cross-Executable Comparison (`group_by_executable: false`)
**Use Case**: Compare different implementations that perform the same operation
- Compares `benchmark_tetrahedral_remeshing.exe` vs `benchmark_refactored_tetrahedral_remeshing.exe`
- Groups results by input arguments only (ignoring executable metadata)
- Perfect for comparing current vs refactored implementations
- Shows performance differences between algorithm variants

**Example**: Compare the current CGAL implementation against your refactored elementary operations framework

#### 2. Same-Executable Comparison (`group_by_executable: true`)
**Use Case**: Fine-tune and analyze variations within a single implementation
- Compares only runs from the same executable
- Groups results by input arguments AND executable metadata
- Perfect for performance tuning and consistency analysis
- Shows performance variations across different runs of the same code

**Example**: Analyze performance consistency of the refactored implementation across multiple runs

#### 3. Ignoring Specific Arguments (`exclude_from_grouping`)
**Use Case**: Compare runs that differ only in one argument that should not affect grouping — for example, comparing a sequential run (`threads=1`) against a parallel run (`threads=8`) of the same algorithm variant.

By default, two runs are placed in the same comparison row only when **all** input arguments match. Adding argument keys to `exclude_from_grouping` strips those keys before matching, so runs that differ only on those arguments are treated as the same configuration.

```yaml
analysis:
group_by_executable: false
exclude_from_grouping: [threads] # sequential and parallel land in the same row
```

### Basic Configuration

```yaml
results_root: /path/to/Benchmark_results # Root directory containing benchmark runs
include_reports: [] # Specific subdirs to include (empty = all)

analysis:
significant_change_threshold: 0.0 # Show metrics with >X% change (0 = all)
outlier_threshold: 2.0 # Highlight outliers >X std deviations
group_by_executable: false # false = cross-executable, true = same-executable
exclude_from_grouping: [] # Input argument keys to ignore when matching runs.
# e.g. [threads] to compare sequential (threads=1)
# vs parallel (threads=8) in the same table row.

report:
chart_grid_cols: 2 # Chart grid layout columns

charts:
- kind: line
y: metrics.Performance.Total_Time.Value
x: run_metadata.input_arguments.target_edge_factor
title: "Performance vs Edge Factor"
style: "o-"
```

## Usage Examples

### Comparing Current vs Refactored Implementation

1. **Run both benchmarks with identical parameters**:
```yaml
# In Benchmark_creation/config.yaml
benchmarks:
- name: current
exec: benchmark_tetrahedral_remeshing.exe
sweep:
input_mesh: [elephant.mesh]
num_iterations: [50]
target_edge_factor: [0.25, 0.5, 1.0, 2.0]
threads: [1]
- name: refactored
exec: benchmark_refactored_tetrahedral_remeshing.exe
sweep:
input_mesh: [elephant.mesh]
num_iterations: [50]
target_edge_factor: [0.25, 0.5, 1.0, 2.0]
threads: [1]
```

2. **Configure comparison for cross-executable analysis**:
```yaml
# In Benchmark_comparison/config.yaml
analysis:
group_by_executable: false # Enable cross-executable comparison

charts:
- kind: line
y: metrics.Performance.Total_Time.Value
x: run_metadata.input_arguments.target_edge_factor
title: "Current vs Refactored: Performance by Edge Factor"
style: "o-"
```

3. **Run comparison**:
```bash
python compare_benchmark_results.py --config config.yaml
```

### Fine-Tuning Single Implementation

1. **Configure for same-executable analysis**:
```yaml
analysis:
group_by_executable: true # Compare only within same executable
outlier_threshold: 1.0 # Sensitive outlier detection for consistency analysis
```

2. **Run multiple times with same parameters** to analyze consistency
3. **Analyze variance and outliers** in the generated report

## Chart Types and Filtering

### Time-Series Charts
```yaml
- kind: line
y: metrics.Performance.Total_Time.Value
title: "Performance Over Time"
# No x specified = uses timestamp
```

### Parameter-Based Charts
```yaml
- kind: line
y: metrics.Performance.Total_Time.Value
x: run_metadata.input_arguments.threads
title: "Performance vs Thread Count"
```

### Filtered Charts
```yaml
- kind: line
y: metrics.Performance.Total_Time.Value
x: run_metadata.input_arguments.target_edge_factor
title: "Performance for Large Meshes Only"
filter:
run_metadata.run_info.Mesh.Name: elephant
```

## Understanding Results

### Metric Comparison Tables
- **Green cells**: Low variance (CV < 5%)
- **Yellow cells**: Medium variance (5% ≤ CV ≤ 20%)
- **Red cells**: Outliers (beyond threshold standard deviations)
- **Hover tooltips**: Detailed statistics (mean, std dev, percentiles)

### Interactive Charts
- **Series**: Automatically grouped by benchmark + input parameters
- **Hover information**: Shows benchmark name, input arguments, and metric values
- **Legend**: Distinguishes between different implementations or parameter sets
- **Responsive**: Adapts to different screen sizes

### Statistical Analysis
- **Coefficient of Variation (CV%)**: Relative variability measure
- **Outlier Detection**: Z-score based identification
- **Percentile Analysis**: Min, Q1, Median, Q3, Max values
- **Cross-Implementation Comparison**: When enabled, shows both implementations in same tables

## File Structure

```
Benchmark_results/
├── 2024-01-15_10-30-00/ # Timestamp-based run directories
│ └── pipeline_results.json
├── 2024-01-15_11-45-00/
│ └── pipeline_results.json
└── benchmark_comparison_report.html # Generated report
```

## Troubleshooting

### No Comparison Data Available
**Problem**: Report shows "No comparison data available"
**Solutions**:
- Ensure both executables use identical input parameters
- Check that `group_by_executable` setting matches your comparison intent
- Verify that `pipeline_results.json` files contain both implementations

### Charts Not Showing Expected Comparisons
**Problem**: Charts don't show both implementations
**Solutions**:
- Set `group_by_executable: false` for cross-executable comparison
- Ensure both executables have runs with identical input arguments
- Check chart filters aren't excluding one implementation

### High Variance Warnings
**Problem**: Many metrics marked as high variance
**Solutions**:
- Run more iterations to reduce natural variance
- Check for system interference during benchmarking
- Consider if differences are due to algorithmic improvements vs measurement noise

## Advanced Features

### Custom Grouping
The tool automatically handles different executable metadata when `group_by_executable: false`, allowing meaningful comparison between:
- Different compilation flags
- Different algorithm implementations
- Different versions of the same code

### Resource Usage Integration
When resource monitoring is enabled, the tool automatically includes:
- Peak memory usage
- Average CPU utilization
- Memory allocation patterns
- All integrated into the same comparison framework

### Extensible Chart System
Charts support various customizations:
- Multiple metric types (performance, quality, resource usage)
- Flexible filtering by any result field
- Multiple chart types (line, scatter, etc.)
- Custom styling and layout options
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
results_root: C:/Users/iason.manolas/Documents/learning/gsoc2025-Tetra_remeshing_parallel-imanolas/Tetrahedral_remeshing/build_debug_tetrahedral_remeshing/BenchmarkResults # Folder containing multiple benchmark run folders
include_reports: [] # Optional: list of subfolders to include, or leave empty for all
# metrics:
# - metrics.Performance.Total_Time.Value
# - metrics.Quality.Edge_Length.Mean
group_by: [] # (Unused, now auto-detected)
significant_change_threshold: 0.0 # Only show metrics with >1% change (set to 0 to show all)
outlier_threshold: 3.0 # Highlight changes >3x stddev as outliers

# Chart grid configuration
report_chart_grid_cols: 2 # Number of columns in the chart grid (charts will be scaled accordingly)

charts:
- kind: line
y: Performance.Total_Time.Value
title: "Total Time across versions"
save_as: "total_time_timeseries.png"
style: "o-"
- kind: line
y: Performance.Memory.Value
title: "Memory across versions"
save_as: "memory_timeseries.png"
style: "o-"
Loading
Loading