Skip to content

Add capability of threading over IntRange ranges, use in l2_norm_diff()#4446

Merged
roystgnr merged 2 commits intolibMesh:develfrom
roystgnr:int_range_threading
May 5, 2026
Merged

Add capability of threading over IntRange ranges, use in l2_norm_diff()#4446
roystgnr merged 2 commits intolibMesh:develfrom
roystgnr:int_range_threading

Conversation

@roystgnr
Copy link
Copy Markdown
Member

@roystgnr roystgnr commented May 4, 2026

This request turned out to be harder than it should have been, but if it works then there's a ton of other opportunities that ought to be much easier to make threaded now that IntRange has been fixed up to do that more easily.

roystgnr added 2 commits May 4, 2026 15:17
This request turned out to be harder than it should have been, but if it
works then there's a ton of other opportunities that ought to be much
easier to make threaded now that IntRange has been fixed up to do that
more easily.
@moosebuild
Copy link
Copy Markdown

Job Coverage, step Generate coverage on a0b7938 wanted to post the following:

Coverage

325622 #4446 a0b793
Total Total +/- New
Rate 65.47% 65.48% +0.01% 100.00%
Hits 78228 78256 +28 28
Misses 41258 41253 -5 0

Diff coverage report

Full coverage report

This comment will be updated on new commits.

@roystgnr
Copy link
Copy Markdown
Member Author

roystgnr commented May 5, 2026

@NamjaeChoi tested this and reports semidecent speedup (37.6s in serial, 8.0s on 8 threads). This is in NumericVector so the awful virtual operator() overhead dominates everything and a real optimization would probably be a PetscVector specialization, but at least we're confirming that it works and there aren't any massive weird thread contention issues, even with the tricky PetscVector::_get_array locking.

@roystgnr roystgnr merged commit f018ec3 into libMesh:devel May 5, 2026
25 checks passed
@roystgnr roystgnr deleted the int_range_threading branch May 5, 2026 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants