armi.physics.executers module¶
Executors are useful for having a standard way to run physics calculations.
They may involve external codes (with inputs/execution/output) or in-memory data pathways.
-
class
armi.physics.executers.
ExecutionOptions
(label=None)[source]¶ Bases:
object
A data structure representing all options needed for a physics kernel.
-
extraInputFiles
¶ (sourceName, destName) pairs of file names that will be brought from the working dir into the runDir. Allows renames while in transit.
- Type
list of tuples
-
extraOutputFiles
¶ (sourceName, destName) pairs of file names that will be extracted from the runDir to the working dir
- Type
list of tuples
-
runDir
¶ Path on running system where the run will take place. This is often used to ensure external codes that use hard-drive disk space run on a local disk rather than a shared network drive
- Type
-
workingDir
¶ Path on system where results will be placed after the run. This is often a shared network location. Auto-applied during execution by default.
- Type
-
applyResultsToReactor
¶ Update the in-memory reactor model with results upon completion. Set to False when information from a run is needed for auxiliary purposes rather than progressing the reactor model.
- Type
-
-
class
armi.physics.executers.
Executer
(options, reactor)[source]¶ Bases:
object
Short-lived object that coordinates a calculation step and updates a reactor.
Notes
This is deliberately not a
MpiAction
. Thus, Executers can run as potentially multiple steps in a parent (parallelizable ) MpiAction or in other flexible ways. This is intended to maximize reusability.
-
class
armi.physics.executers.
DefaultExecuter
(options, reactor)[source]¶ Bases:
armi.physics.executers.Executer
An Executer that uses a common run sequence.
This sequence has been found to be relatively common in many externally-executed physics codes. It is here for convenience but is not required. The sequence look like:
Choose modeling options (either from the global run settings input or dictated programmatically)
Apply geometry transformations to the ARMI Reactor as needed
Build run-specific working directory
Write input file(s)
Put specific input files and libs in run directory
Run the analysis (external execution, or not)
Process output while still in run directory
Check error conditions
Move desired output files back to main working directory
Clean up run directory
Un-apply geometry transformations as needed
Update ARMI data model as desired
-
run
()[source]¶ Run the executer steps.
Warning
If a calculation requires anything different from what this method does, do not update this method with new complexity! Instead, simply make your own run sequence and/or class. This pattern is useful only in that it is fairly simple. By all means, do use
DirectoryChanger
andExecuterOptions
and other utilities.