openmc.run¶
-
openmc.
run
(particles=None, threads=None, geometry_debug=False, restart_file=None, tracks=False, output=True, cwd='.', openmc_exec='openmc', mpi_args=None)[source]¶ Run an OpenMC simulation.
Parameters: - 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
OMP_NUM_THREADS
environment variable). - 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’].
Raises: subprocess.CalledProcessError
– If the openmc executable returns a non-zero status