Hi all,
I’m using OpenMC 0.15.3 (installed with conda-forge) and I think I’ve hit a small inconsistency between plot mode and the IFP validator.
My settings are valid for an eigenvalue run:
settings.batches = 100
settings.inactive = 20
settings.ifp_n_generation = 5
openmc.run() works correctly. But when I call openmc.plot_geometry() against the same settings.xml, OpenMC aborts with:
ERROR: ‘ifp_n_generation’ must be lower than or equal to the number of inactive cycles.
As far as I can tell, this is because plot mode has no batches, so the inactive count is effectively 0, and the validator compares ifp_n_generation against 0 instead of against my actual inactive=20. The check is meaningful for an eigenvalue run but not for plot mode, where IFP is never used anyway.
My current workaround is to temporarily remove ifp_n_generation from the settings before calling plot_geometry() and put it back afterwards, but it would be nicer if plot mode just skipped IFP-related validation (or ignored those settings entirely).
Thanks!
Sample code to check it out:
import openmc print(openmc.__version__) mat = openmc.Material() mat.add_nuclide('U235', 1.0) mat.set_density('g/cm3', 10) sph = openmc.Sphere(r=10, boundary_type='vacuum') cell = openmc.Cell(fill=mat, region=-sph) model = openmc.Model(geometry=openmc.Geometry([cell]), materials=openmc.Materials([mat])) model.settings.batches = 20 model.settings.inactive = 10 model.settings.particles = 100 model.settings.ifp_n_generation = 5 model.export_to_xml() openmc.plot_geometry()