juntyr / necsim-rust

Spatially explicit biodiversity simulations using a parallel library written in Rust
https://juntyr.github.io/necsim-rust-docs/
Apache License 2.0
2 stars 2 forks source link

Minimal support for threads partitioning #277

Closed juntyr closed 4 months ago

juntyr commented 5 months ago

Fixes #106

This PR finally implements multithreading-based partitioning by limiting the scope:

Still, this is an important step forward!

TODOs:

codecov-commenter commented 5 months ago

Codecov Report

Attention: Patch coverage is 0% with 1781 lines in your changes are missing coverage. Please review.

Project coverage is 15.59%. Comparing base (92d8ef1) to head (7ae8180).

Files Patch % Lines
necsim/partitioning/mpi/src/partition/common.rs 0.00% 203 Missing :warning:
necsim/partitioning/threads/src/lib.rs 0.00% 197 Missing :warning:
necsim/partitioning/threads/src/partition.rs 0.00% 194 Missing :warning:
...al_sampler/in_memory/packed_separable_alias/mod.rs 0.00% 137 Missing :warning:
necsim/impls/std/src/event_log/recorder.rs 0.00% 128 Missing :warning:
necsim/partitioning/threads/src/vote.rs 0.00% 105 Missing :warning:
...pler/in_memory/packed_separable_alias/dispersal.rs 0.00% 102 Missing :warning:
necsim/partitioning/mpi/src/lib.rs 0.00% 79 Missing :warning:
rustcoalescence/src/args/config/partitioning.rs 0.00% 45 Missing :warning:
necsim/partitioning/mpi/src/partition/root.rs 0.00% 38 Missing :warning:
... and 82 more

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #277 +/- ## ========================================== - Coverage 16.25% 15.59% -0.67% ========================================== Files 289 296 +7 Lines 20592 21469 +877 ========================================== Hits 3348 3348 - Misses 17244 18121 +877 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

juntyr commented 4 months ago

Madingley fg0size12 habitat with turnover map and 10^-3 sample percentage

==== speciation 0.1 (with seed 42) ====

new independent monolithic: 4192785 new independent threads: 4192785 new independent MPI: 4192785 new gillespie monolithic: 4192786 new skipping monolithic: 4192313

old skipping monolithic: 4193180 old gillespie monolithic: 4192921 old independent monolithic: 4192909 old independent MPI: 4192909

==== speciation 0.01 (all monolithic with entropy seeds) ==== old independent: 3995287, 3995788, 3995771, 3996757, 3996123 old skipping: 3995004, 3995460, 3995548, 3995990, 3994950, 3996074, 3995850, 3995151, 3996214, 3995426, 3996369, 3996164, 3995796, 3995925

new independent: 3996050, 3995425 new skipping: 3906695, 3905369, 3905860, 3905530, 3905530

juntyr commented 4 months ago

While MPI and threads clearly work, the separable dispersal sampler does NOT

juntyr commented 4 months ago

==== speciation 0.01 (all monolithic with entropy seeds) ====

new v2 independent: 3995604, 3995902, 3995285, 3996393, 3995210 new v2 skipping: 3995976, 3995564, 3996725, 3995754, 3995576, 3995929, 3995656, 3995466, 3995450, 3996128, 3995070, 3995100, 3995427, 3995644, 3996332, 3995801

juntyr commented 4 months ago

The new packed separable alias dispersal sampler should still be optimised further ... but it shall be good enough for now