Skip to content

Add memory-mapped quantum RNG support to ROSS - #214

Open
sanjaychari wants to merge 3 commits into
ROSS-org:masterfrom
sanjaychari:quantum_rng
Open

sanjaychari wants to merge 3 commits into
ROSS-org:masterfrom
sanjaychari:quantum_rng

Conversation

@sanjaychari

@sanjaychari sanjaychari commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor
  • Add optional QRNG backend while retaining CLCG4 as the default.
  • Use read-only mmap to access conditioned quantum random bits.
  • Partition the QRNG pool into non-overlapping blocks for LP RNG streams.
  • Assign blocks reproducibly using CLCG4-based Fisher-Yates shuffling.
  • Generate uniform random values from consecutive 53-bit segments.
  • Support optimistic rollback through reversible RNG cursors.
  • Add command-line configuration and debug output for block assignments.

Depends on #212

Cancel and wait on outstanding posted MPI receives before
finalizing MPI in tw_net_stop().

In multi-rank CODES runs, MPICH reported pending references
on MPI_COMM_WORLD at shutdown even though the simulation
completed correctly. The number of pending references scaled
with ROSS's read-buffer size, indicating that the preposted
MPI_Irecv requests were still active during MPI_Finalize().

Clean up those requests explicitly so conservative and
optimistic CODES runs exit without the MPICH communicator
reference warnings.
- Add optional QRNG backend while retaining CLCG4 as the default.
- Use read-only mmap to access conditioned quantum random bits.
- Partition the QRNG pool into non-overlapping blocks for LP RNG streams.
- Assign blocks reproducibly using CLCG4-based Fisher-Yates shuffling.
- Generate uniform random values from consecutive 53-bit segments.
- Support optimistic rollback through reversible RNG cursors.
- Add command-line configuration and debug output for block assignments.
@codecov

codecov Bot commented Nov 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 15.78947% with 96 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.99%. Comparing base (dc3a6a0) to head (1bcf055).

Files with missing lines Patch % Lines
core/rand-clcg4.c 9.70% 93 Missing ⚠️
core/network-mpi.c 75.00% 2 Missing ⚠️
core/tw-setup.c 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #214      +/-   ##
==========================================
- Coverage   48.75%   47.99%   -0.77%     
==========================================
  Files          41       41              
  Lines        4816     4930     +114     
  Branches      861      889      +28     
==========================================
+ Hits         2348     2366      +18     
- Misses       2463     2559      +96     
  Partials        5        5              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
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