iQMC Batch Method
Description
The primary goals of this PR are to i) implement a randomized-QMC batching method for eigenvalue calculations ii) continue to increase the readability and maintainability of iQMC. Users can now specify an iQMC run mode with mode='fixed' or mode='batched' in the iQMC input settings, which toggles between the fixed seed and randomized-QMC batch methods. Additionally, the user can specify the sample_method and choose between either 'halton' or 'random'. Both sample methods can be used in either fixed seed or batched mode. halton refers to the halton sequence (standard and randomized) random refers to typical prng samples, which are currently generated with numpy.
The randomized-QMC batching method uses the randomized halton sequence to accumulate batch statistics in much the same way as batched Monte Carlo eigenvalue calculations. In fixed seed mode the change in the source strength every iteration comes only from convergence towards the solution. Whereas in batched mode the change in source strength is due to convergence towards the solution and some stochastic noise introduced from randomizing the samples. As a result, iQMC tallies now have a mean, sdev, and bin components like standard Monte Carlo tallies.
Additional Changes:
- Removed nested power iteration capabilities, the flattened power iteration is now the only iQMC eigenmode solver.
- Reorganization of
iqmc_kernel.pyandiqmc_loop.py, grouping functions by operation. - Renaming of a several variables which had shorthand names to longer and more detailed names to increase readability.
- Addition of a
iqmc_validate_inputs()function to validate the iQMC input settings. -
allreduce_array()function added tokernel.py - Moved
make_type_score()to be a global function intype_.pyto be accesses by both Monte Carlo and iQMC scores. - Updated iQMC regression test and examples input decks to reflect the new changes.
Planned Work
- [ ] Add batch method regression tests.
- [ ] Remove "iqmc_" prefix from
iqmc_kernel.pyfunctions. - [ ] Replace numpy prng sampling, used when
sample_method='random', with MCDC's rng functionality.
In fixed source mode the change in the source strength every iteration comes only from convergence towards the solution. Whereas in batched mode the change in source strength is due to convergence towards the solution and some stochastic noise introduced from randomizing the samples. As a result, iQMC tallies now have a
mean,sdev, andbincomponents like standard Monte Carlo tallies.
Do you mean "fixed seed mode", @spasmann?
Thank you @jpmorgan98 ! I've added the theory guide to my todo list.
Yes, fixed seed not fixed source. Thanks, @ilhamv.
All tests passing! @ilhamv