Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve ICE balancing #93

Merged
merged 3 commits into from
Dec 22, 2023
Merged

Improve ICE balancing #93

merged 3 commits into from
Dec 22, 2023

Conversation

robomics
Copy link
Contributor

@robomics robomics commented Dec 22, 2023

Make result of interaction balancing independent from the number of balancing threads

This is achieved by using fixed-precision arithmetic when computing the marginals using multiple threads.
Explicit synchronization is no longer necessary, as we can now use atomic ints instead of double + mutex.

The downside to this approach is that results are no longer identical to those of cooler.
However, practically speaking, hictk's and cooler's results are equivalent, as balancing tests show that the relative error is below 1.0e-5.

Switching to atomic operations also improved performance.
This is especially noticeable when balancing using --in-memory (~2.5x perf improvement).

…alancing threads

This is achieved by using fixed-precision arithmetic when computing the
marginals using multiple threads.
Explicit synchronization is no longer necessary, as we can now use
atomic ints instead of double + mutex.
Copy link

codecov bot commented Dec 22, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (904e71d) 84.75% compared to head (9164a59) 84.77%.
Report is 2 commits behind head on main.

Files Patch % Lines
...nclude/hictk/balancing/impl/sparse_matrix_impl.hpp 96.15% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #93      +/-   ##
==========================================
+ Coverage   84.75%   84.77%   +0.02%     
==========================================
  Files         101      101              
  Lines        7319     7312       -7     
==========================================
- Hits         6203     6199       -4     
+ Misses       1116     1113       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@robomics robomics changed the title Improve balancing with ICE Improve ICE balancing Dec 22, 2023
@robomics robomics merged commit b3aaf1e into main Dec 22, 2023
50 checks passed
@robomics robomics deleted the improve/balancing branch December 22, 2023 16:32
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.

1 participant