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

Simulation refactor #57

Draft
wants to merge 24 commits into
base: master
Choose a base branch
from
Draft

Simulation refactor #57

wants to merge 24 commits into from

Conversation

brenjohn
Copy link
Member

@brenjohn brenjohn commented Feb 4, 2022

Summary

The design using global and sub communicators to iterate over open and sliced bonds respectively has been replaced with a design outlined below:

  • A simulation is considered as a set of contraction jobs parameterised by bitstring-slice pairs.
  • Contraction jobs are divided amongst MPI processes evenly
  • Each process spawns a local julia cluster using the Distributed package consisting of a master process and 1 worker process for each gpu device available to the cluster. The master process starts a job queue from which worker processes take contraction jobs. Sliced amplitudes are collected on the master process via an ampltude queue.
  • All results are collected and written to memory on the root MPI process at the end of a simulation.

Rationale

Changes allow multiple GPU devices on a single node to be used and simplifies work distribution.

Implementation Details

Additional notes


Check before merging:

  • All discussions are resolved
  • New code is covered by appropriate tests
  • Tests are passing locally and on CI
  • The documentation is consistent with changes
  • Any code that was copied from other sources has the paper/url in a comment and is compatible with the MIT licence
  • Notebooks/examples not covered by unittests have been tested and updated as required
  • The feature branch is up-to-date with the master branch (rebase if behind)
  • Incremented the version string in Project.toml file

@brenjohn brenjohn self-assigned this Feb 4, 2022
@brenjohn brenjohn marked this pull request as draft February 4, 2022 19:59
@codecov-commenter
Copy link

codecov-commenter commented Feb 7, 2022

Codecov Report

Merging #57 (d416892) into master (d3d0fa0) will increase coverage by 5.32%.
The diff coverage is 81.47%.

@@            Coverage Diff             @@
##           master      #57      +/-   ##
==========================================
+ Coverage   75.79%   81.12%   +5.32%     
==========================================
  Files          14       14              
  Lines         537      625      +88     
==========================================
+ Hits          407      507     +100     
+ Misses        130      118      -12     
Impacted Files Coverage Δ
src/compute_graph/tree.jl 90.62% <ø> (ø)
src/compute_graph/tree_stats.jl 2.27% <0.00%> (-2.73%) ⬇️
src/sysimage/precompile.jl 0.00% <0.00%> (ø)
src/utils.jl 76.66% <76.66%> (ø)
src/simulation_contexts/amplitude_channel.jl 84.00% <84.00%> (ø)
src/contexts/base.jl 85.57% <88.88%> (-11.54%) ⬇️
src/logger.jl 88.88% <91.52%> (+19.12%) ⬆️
src/simulation_contexts/simulation_contexts.jl 91.83% <91.83%> (ø)
src/compute_graph/dsl.jl 77.27% <100.00%> (+0.71%) ⬆️
src/simulation_contexts/amplitude_simulation.jl 100.00% <100.00%> (ø)
... and 2 more

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 d3d0fa0...d416892. Read the comment docs.

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