Skip to content

Connectivity benchmarks: gate larger files#1550

Open
cmdupuis3 wants to merge 4 commits into
UXARRAY:mainfrom
cmdupuis3:cmdupuis3/connectivity_benchmarks
Open

Connectivity benchmarks: gate larger files#1550
cmdupuis3 wants to merge 4 commits into
UXARRAY:mainfrom
cmdupuis3:cmdupuis3/connectivity_benchmarks

Conversation

@cmdupuis3

@cmdupuis3 cmdupuis3 commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

This PR is to fix an issue with the connectivity benchmarks. The current github runner doesn't seem to have access to the larger dyamond files, so those benchmarks fail and spam up the benchmark logs.

Continuation of #1549.

Overview

I naively copied the file paths from the dyamond benchmarks without the gate, not realizing that the github runner wouldn't have access to them. The gate there basically pings for file access, which will fail for github's runner, but would succeed for someone running somewhere with transparent access to the data on Glade.

PR Checklist

General

  • An issue is linked created and linked
  • Add appropriate labels
  • Filled out Overview and Expected Usage (if applicable) sections

Testing

  • [N/A] Adequate tests are created if there is new functionality
  • [N/A] Tests cover all possible logical paths in your function
  • [N/A] Tests are not too basic (such as simply calling a function and nothing else)

Documentation

  • Docstrings have been added to all new functions
  • Docstrings have updated with any function changes
  • Internal functions have a preceding underscore (_) and have been added to docs/internal_api/index.rst
  • User functions have been added to docs/user_api/index.rst

Examples

  • Any new notebook examples added to docs/examples/ folder
  • Clear the output of all cells before committing
  • New notebook files added to docs/examples.rst toctree
  • New notebook files added to new entry in docs/gallery.yml with appropriate thumbnail photo in docs/_static/thumbnails/

@cmdupuis3 cmdupuis3 added benchmarking Related to benchmarks, memory usage, and/or time profiling run-benchmark Run ASV benchmark workflow labels Jul 7, 2026
@cmdupuis3 cmdupuis3 requested a review from rajeeja July 7, 2026 18:22
@cmdupuis3 cmdupuis3 marked this pull request as draft July 7, 2026 19:21
@cmdupuis3 cmdupuis3 marked this pull request as ready for review July 7, 2026 20:24
@Sevans711

Copy link
Copy Markdown
Collaborator

Note, looks like benchmarks seem to be "failing" here for the reason discussed in issue #1547 (also affecting PR #1541).

@rajeeja rajeeja moved this to 👀 In review in UXarray Development Jul 8, 2026
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

ASV Benchmarking

Benchmark Comparison Results

Benchmarks that have improved:

Change Before [7c9b487] After [b85be3a] Ratio Benchmark (Parameter)
- 630M 441M 0.7 face_bounds.FaceBounds.peakmem_face_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/ugrid/geoflow-small/grid.nc'))
- 751M 440M 0.59 face_bounds.FaceBounds.peakmem_face_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/ugrid/quad-hexagon/grid.nc'))
- 550M 433M 0.79 mpas_ocean.Gradient.peakmem_gradient('480km')

Benchmarks that have stayed the same:

Change Before [7c9b487] After [b85be3a] Ratio Benchmark (Parameter)
10.8±0.07μs 10.7±0.3μs 0.99 bench_connectivity.Connectivity.time_edge_face('120km')
11.0±0.2μs 11.1±0.1μs 1.01 bench_connectivity.Connectivity.time_edge_face('480km')
10.7±0.2μs 10.8±0.06μs 1.01 bench_connectivity.Connectivity.time_edge_node('120km')
11.0±0.09μs 11.0±0.1μs 1.00 bench_connectivity.Connectivity.time_edge_node('480km')
10.7±0.05μs 11.0±0.1μs 1.03 bench_connectivity.Connectivity.time_face_edge('120km')
11.0±0.1μs 11.0±0.04μs 1.00 bench_connectivity.Connectivity.time_face_edge('480km')
10.8±0.1μs 11.0±0.1μs 1.02 bench_connectivity.Connectivity.time_face_face('120km')
11.2±0.1μs 10.9±0.1μs 0.97 bench_connectivity.Connectivity.time_face_face('480km')
22.0±0.7μs 21.8±0.3μs 0.99 bench_connectivity.Connectivity.time_face_node('120km')
22.2±0.3μs 22.0±0.1μs 0.99 bench_connectivity.Connectivity.time_face_node('480km')
11.0±0.07μs 10.6±0.2μs 0.96 bench_connectivity.Connectivity.time_node_edge('120km')
11.0±0.1μs 10.9±0.2μs 0.99 bench_connectivity.Connectivity.time_node_edge('480km')
10.8±0.3μs 10.7±0.07μs 0.99 bench_connectivity.Connectivity.time_node_face('120km')
11.0±0.2μs 11.2±0.08μs 1.02 bench_connectivity.Connectivity.time_node_face('480km')
439M 439M 1.00 face_bounds.FaceBounds.peakmem_face_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/mpas/QU/oQU480.231010.nc'))
469M 469M 1.00 face_bounds.FaceBounds.peakmem_face_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/scrip/outCSne8/outCSne8.nc'))
14.8±0.07ms 15.1±0.1ms 1.02 face_bounds.FaceBounds.time_face_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/mpas/QU/oQU480.231010.nc'))
3.76±0.04ms 3.76±0.05ms 1.00 face_bounds.FaceBounds.time_face_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/scrip/outCSne8/outCSne8.nc'))
19.1±0.3ms 19.0±0.04ms 1.00 face_bounds.FaceBounds.time_face_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/ugrid/geoflow-small/grid.nc'))
2.21±0.02ms 2.21±0.05ms 1.00 face_bounds.FaceBounds.time_face_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/ugrid/quad-hexagon/grid.nc'))
4.85±0.01s 4.98±0.02s 1.03 import.Imports.timeraw_import_uxarray
943±9ns 960±5ns 1.02 mpas_ocean.CheckNorm.time_check_norm('120km')
907±5ns 893±4ns 0.98 mpas_ocean.CheckNorm.time_check_norm('480km')
839±3ms 872±20ms 1.04 mpas_ocean.ConnectivityConstruction.time_face_face_connectivity('120km')
53.7±0.8ms 55.1±0.5ms 1.03 mpas_ocean.ConnectivityConstruction.time_face_face_connectivity('480km')
703±10μs 679±7μs 0.97 mpas_ocean.ConnectivityConstruction.time_n_nodes_per_face('120km')
605±10μs 641±10μs 1.06 mpas_ocean.ConnectivityConstruction.time_n_nodes_per_face('480km')
5.43±0.02ms 5.46±0.02ms 1.01 mpas_ocean.ConstructFaceLatLon.time_cartesian_averaging('120km')
3.94±0.02ms 4.01±0.05ms 1.02 mpas_ocean.ConstructFaceLatLon.time_cartesian_averaging('480km')
3.42±0.01s 3.44±0.01s 1.01 mpas_ocean.ConstructFaceLatLon.time_welzl('120km')
225±0.5ms 224±0.6ms 0.99 mpas_ocean.ConstructFaceLatLon.time_welzl('480km')
18.2±0.04ms 18.2±0.03ms 1.00 mpas_ocean.ConstructTreeStructures.time_ball_tree('120km')
1.04±0.02ms 1.07±0.02ms 1.03 mpas_ocean.ConstructTreeStructures.time_ball_tree('480km')
10.6±0.03ms 10.7±0.04ms 1.02 mpas_ocean.ConstructTreeStructures.time_kd_tree('120km')
690±4ms 733±4ms 1.06 mpas_ocean.CrossSections.time_const_lat('120km', 1)
351±0.9ms 371±4ms 1.06 mpas_ocean.CrossSections.time_const_lat('120km', 2)
184±0.3ms 191±3ms 1.04 mpas_ocean.CrossSections.time_const_lat('120km', 4)
543±5ms 564±4ms 1.04 mpas_ocean.CrossSections.time_const_lat('480km', 1)
275±2ms 286±2ms 1.04 mpas_ocean.CrossSections.time_const_lat('480km', 2)
142±0.7ms 146±2ms 1.02 mpas_ocean.CrossSections.time_const_lat('480km', 4)
24.5±0.1ms 25.1±0.2ms 1.02 mpas_ocean.DualMesh.time_dual_mesh_construction('120km')
3.42±0.07ms 3.37±0.07ms 0.99 mpas_ocean.DualMesh.time_dual_mesh_construction('480km')
954±6ms 963±8ms 1.01 mpas_ocean.GeoDataFrame.time_to_geodataframe('120km', False)
50.4±0.8ms 54.8±0.8ms 1.09 mpas_ocean.GeoDataFrame.time_to_geodataframe('120km', True)
83.5±0.7ms 84.9±0.4ms 1.02 mpas_ocean.GeoDataFrame.time_to_geodataframe('480km', False)
5.41±0.1ms 5.92±0.1ms 1.09 mpas_ocean.GeoDataFrame.time_to_geodataframe('480km', True)
454M 454M 1.00 mpas_ocean.Gradient.peakmem_gradient('120km')
173±0.6ms 177±1ms 1.02 mpas_ocean.Gradient.time_gradient('120km')
12.6±0.08ms 12.5±0.1ms 0.99 mpas_ocean.Gradient.time_gradient('480km')
224±0.6μs 225±2μs 1.01 mpas_ocean.HoleEdgeIndices.time_construct_hole_edge_indices('120km')
132±0.3μs 133±0.6μs 1.01 mpas_ocean.HoleEdgeIndices.time_construct_hole_edge_indices('480km')
403M 403M 1.00 mpas_ocean.Integrate.peakmem_integrate('120km')
382M 383M 1.00 mpas_ocean.Integrate.peakmem_integrate('480km')
214±2μs 218±2μs 1.02 mpas_ocean.Integrate.time_integrate('120km')
197±2μs 202±2μs 1.02 mpas_ocean.Integrate.time_integrate('480km')
132±1ms 135±0.8ms 1.02 mpas_ocean.MatplotlibConversion.time_dataarray_to_polycollection('120km', 'exclude')
127±1ms 132±2ms 1.05 mpas_ocean.MatplotlibConversion.time_dataarray_to_polycollection('120km', 'include')
129±1ms 131±1ms 1.01 mpas_ocean.MatplotlibConversion.time_dataarray_to_polycollection('120km', 'split')
10.2±0.2ms 11.1±0.6ms 1.09 mpas_ocean.MatplotlibConversion.time_dataarray_to_polycollection('480km', 'exclude')
10.2±0.1ms 10.6±0.1ms 1.04 mpas_ocean.MatplotlibConversion.time_dataarray_to_polycollection('480km', 'include')
10.1±0.2ms 10.6±0.1ms 1.06 mpas_ocean.MatplotlibConversion.time_dataarray_to_polycollection('480km', 'split')
351±1μs 355±1μs 1.01 mpas_ocean.PointInPolygon.time_face_search_lonlat('120km')
355±2μs 357±2μs 1.00 mpas_ocean.PointInPolygon.time_face_search_lonlat('480km')
334±1μs 336±2μs 1.01 mpas_ocean.PointInPolygon.time_face_search_xyz('120km')
338±1μs 341±2μs 1.01 mpas_ocean.PointInPolygon.time_face_search_xyz('480km')
240±1ms 248±0.8ms 1.03 mpas_ocean.RemapDownsample.time_bilinear_remapping
296±2ms 302±2ms 1.02 mpas_ocean.RemapDownsample.time_inverse_distance_weighted_remapping
4.74±0.03ms 4.94±0.2ms 1.04 mpas_ocean.RemapDownsample.time_nearest_neighbor_remapping
1.43±0s 1.45±0.01s 1.02 mpas_ocean.RemapUpsample.time_bilinear_remapping
36.1±0.5ms 37.7±0.5ms 1.05 mpas_ocean.RemapUpsample.time_inverse_distance_weighted_remapping
9.45±0.2ms 9.70±0.2ms 1.03 mpas_ocean.RemapUpsample.time_nearest_neighbor_remapping
29.3±0.5ms 29.9±1ms 1.02 mpas_ocean.ZonalAverage.time_zonal_average('120km')
6.51±0.02ms 7.10±0.2ms 1.09 mpas_ocean.ZonalAverage.time_zonal_average('480km')
379M 378M 1.00 quad_hexagon.QuadHexagon.peakmem_open_dataset
377M 377M 1.00 quad_hexagon.QuadHexagon.peakmem_open_grid
7.00±0.2ms 7.40±0.3ms 1.06 quad_hexagon.QuadHexagon.time_open_dataset
5.87±0.1ms 6.59±0.3ms ~1.12 quad_hexagon.QuadHexagon.time_open_grid

Benchmarks that have got worse:

Change Before [7c9b487] After [b85be3a] Ratio Benchmark (Parameter)
+ 703±20μs 817±40μs 1.16 mpas_ocean.ConstructTreeStructures.time_kd_tree('480km')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

benchmarking Related to benchmarks, memory usage, and/or time profiling run-benchmark Run ASV benchmark workflow

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

3 participants