Repository navigation
Conversation
Given/when/then tests: the same seed reproduces configurations, configurations within a seeded run differ, different seeds differ, and runs without a seed differ. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
initialize_cell copied the random state from the caller but never handed it back, so every configuration in a run was drawn from the same state. Seeds were mapped via 1/seed, of which only the fractional part is used, so seeds 0 and 1 collided. Add an optional exact integer seed to the RNG init instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…column Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The serial-only check added with --seed also stopped --semirandom, which is MPI parallel and worked in parallel before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The parent module now uses lo_randomnumbers, so depend on lo_randomnumbers.o. Drop the cross .f90 dependencies between the module and its aux submodule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
flokno
force-pushed
the
fk_seed_canonical_configuration
branch
from
October 6, 2026 20:12
ccec69a to
f1f396a
Compare
flokno
marked this pull request as ready for review
October 6, 2026 20:13
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
--seedargument tocanonical_configurationfor being able to create supercells in a deterministic way.Changes
--seed N(N ≥ 0) seeds the random number generator, so the same seed gives the same configurations. Without--seed(default-1), the generator is seeded from the wall time as before.lo_mersennetwister%inittakes a new optional integerseedthat sets the state directly, so every integer seed is distinct. Existing callers are unaffected.initialize_celltakes an optional random number generator from the caller and hands the advanced state back, so consecutive configurations differ.--seedtogether with--semirandomstops with an error; seeding--semirandomis out of scope.canonical_configurationstops when run with more than one MPI rank, except with--semirandom, which is MPI parallel.--modes, the log prints the frequency (THz) of each displaced mode as an extra column.type_forceconstant_secondorderonlo_randomnumbers.--seedin the help text and indocs/program/canonical_configuration.md.Tests
New acceptance tests in
tests/canonical_configuration:The reference for the
--modeslog is updated for the new frequency column.🤖 Generated with Claude Code