run(particles=None, threads=None, geometry_debug=False, restart_file=None, tracks=False, output=True, cwd='.', openmc_exec='openmc', mpi_args=None, event_based=False)¶
Run an OpenMC simulation.
- particles (int, optional) – Number of particles to simulate per generation.
- threads (int, optional) – Number of OpenMP threads. If OpenMC is compiled with OpenMP threading
enabled, the default is implementation-dependent but is usually equal to
the number of hardware threads available (or a value set by the
- geometry_debug (bool, optional) – Turn on geometry debugging during simulation. Defaults to False.
- restart_file (str, optional) – Path to restart file to use
- tracks (bool, optional) – Write tracks for all particles. Defaults to False.
- output (bool) – Capture OpenMC output from standard out
- cwd (str, optional) – Path to working directory to run in. Defaults to the current working directory.
- openmc_exec (str, optional) – Path to OpenMC executable. Defaults to ‘openmc’.
- mpi_args (list of str, optional) – MPI execute command and any additional MPI arguments to pass, e.g. [‘mpiexec’, ‘-n’, ‘8’].
- event_based (bool, optional) –
Turns on event-based parallelism, instead of default history-based
New in version 0.12.
RuntimeError– If the openmc executable returns a non-zero status