Issues when using Collision_Track with Photon Transport Enabled

I am encountering a reproducible segmentation fault when enabling collision_track together with photon transport in OpenMC, even for a very small and simple problem. The minimal example (see below in the next comment) consists of a single water‑filled spherical cell with a fixed photon source and low particle/batch counts; the simulation runs correctly if either collision_track is disabled or photon_transport is set to Falseand source.particle is set to ‘neutron’, but segfaults when both are enabled. The crash occurs despite tight collision_track filtering (max_collisions=100, restricted to a single cell) Reducing the number of particles to ~5 sometimes avoids the crash, while increasing to ≥100 particles reliably triggers it. I am using OpenMC 0.15.3 on Linux in an HPC environment with a parallel HDF5 build, running serially (no MPI launch). My questions are:

  • Is collision_track expected to support photon transport?

  • Is this a known limitation or bug when using collision_track with parallel HDF5?

  • Is collision_track intended primarily as a low‑statistics debugging feature rather than for detector‑like photon problems?

  • Are there recommended alternatives for identifying photon interaction types or counting energy‑depositing events in photon transport simulations?

import openmc

# -----------------------------

# 1. MATERIAL

# -----------------------------

mat = openmc.Material(name=“water”)

mat.add_element(“H”, 2.0)

mat.add_element(“O”, 1.0)

mat.set_density(“g/cm3”, 1.0)

materials = openmc.Materials([mat])

materials.export_to_xml()

# -----------------------------

# 2. GEOMETRY (sphere)

# -----------------------------

sphere = openmc.Sphere(r=10.0, boundary_type=‘vacuum’)

cell = openmc.Cell(fill=mat, region=-sphere)

geom = openmc.Geometry([cell])

geom.export_to_xml()

# -----------------------------

# 3. SOURCE

# -----------------------------

source = openmc.IndependentSource()

source.space = openmc.stats.Point((0.0, 0.0, 0.0))

source.energy = openmc.stats.Discrete([1e6], [1.0]) # 1 MeV neutron

source.particle = ‘photon’

# -----------------------------

# 4. SETTINGS

# -----------------------------

settings = openmc.Settings()

settings.run_mode = “fixed source”

settings.source = source

settings.photon_transport = True

settings.particles = 1000

settings.batches = 5

# collision_track

settings.collision_track = {

"max_collisions": 100,       # very small -> stable

"cell_ids": \[cell.id\]        # restrict tracking

}

settings.export_to_xml()

# -----------------------------

# 5. RUN

# -----------------------------

openmc.run()

Should be reproduced with ENDF/B VIII.0 data

Quick update:

I have a fix for this, but I’m finding other issues with this feature as I go. I’m going to submit a PR to improve a reasonable set of these things and add some tests. I’ll post it here once it’s open.