Closed kks32 closed 4 years ago
This is just a duplicate of #676 as I couldn't get the CI to work
Alright, thanks @kks32! LGTM!
Merging #677 into develop will increase coverage by
0.00%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## develop #677 +/- ##
========================================
Coverage 96.62% 96.62%
========================================
Files 122 123 +1
Lines 25295 25318 +23
========================================
+ Hits 24440 24463 +23
Misses 855 855
Impacted Files | Coverage Δ | |
---|---|---|
include/node.h | 100.00% <ø> (ø) |
|
include/mesh.tcc | 83.33% <100.00%> (ø) |
|
include/mutex.h | 100.00% <100.00%> (ø) |
|
include/node.tcc | 95.98% <100.00%> (+0.18%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update b318d94...d8ddb3a. Read the comment docs.
Describe the PR Duplicate of #676 Mutex locks take a significant amount of time in OpenMP parallel versions of the code. This update is to reduce the lock by trying a spinlock and reduce the wait times across threads.
Enable setting the chunk size in OpenMP schedule using
This allows for a finer control without having to recompile for different chunk sizes when running different problems. If the variable is not set, the code will still run.
Additional context Spinlocks vs mutexes are a computational bottleneck. However, we cannot use std::atomic, so this is a good workaround the lack of std::atomic support for Eigen and Vector containers. The speed is improved by about 4 - 5 % for the 3D hydrostatic column.