Issue with surf_source_write and DAGMC geometry

Hello everyone!

I am experiencing an issue with the surface source write functionality when using DAGMC geometry. Essentially OpenMC will run, but the resulting surface_source.h5 file will be empty. This is using v0.13.3. In version 0.14.1 the simulation runs, and again the empty surface_source.h5 file is written, additionally there is some error output:

Simulating batch 1
 Creating state point statepoint.1.h5...
HDF5-DIAG: Error detected in HDF5 (1.10.6) MPI-process 0:
  #000: ../../../src/H5Dio.c line 336 in H5Dwrite(): can't write data
    major: Dataset
    minor: Write failed
  #001: ../../../src/H5Dio.c line 820 in H5D__write(): can't write data
    major: Dataset
    minor: Write failed
  #002: ../../../src/H5Dmpio.c line 735 in H5D__contig_collective_write(): couldn't finish shared collective MPI-IO
    major: Low-level I/O
    minor: Write failed
  #003: ../../../src/H5Dmpio.c line 2081 in H5D__inter_collective_io(): couldn't finish collective MPI-IO
    major: Low-level I/O
    minor: Can't get value
  #004: ../../../src/H5Dmpio.c line 2125 in H5D__final_collective_io(): optimized write failed
    major: Dataset
    minor: Write failed
  #005: ../../../src/H5Dmpio.c line 490 in H5D__mpio_select_write(): can't finish collective parallel write
    major: Low-level I/O
    minor: Write failed
  #006: ../../../src/H5Fio.c line 165 in H5F_block_write(): write through page buffer failed
    major: Low-level I/O
    minor: Write failed
  #007: ../../../src/H5PB.c line 1028 in H5PB_write(): write through metadata accumulator failed
    major: Page Buffering
    minor: Write failed
  #008: ../../../src/H5Faccum.c line 826 in H5F__accum_write(): file write failed
    major: Low-level I/O
    minor: Write failed
  #009: ../../../src/H5FDint.c line 253 in H5FD_write(): addr overflow, addr = 18446744073709551615, size=0, eoa=4096
    major: Invalid arguments to routine
    minor: Address overflowed

The dagmc.h5m file matches the CSG geometry in the testCSG.py script, which works as expected. Additionally, if use the 0.12.1 docker image the DAGMC geometry, it works as expected. Unfortunately I would like to use the meshSpatial feature for my source which was not implemented until 0.13.3 I believe. Attached are the scripts for each method, if anyone would like the dagmc file I can provide it as well, but it looks like it can’t be attached to the post. Thanks!

testDagmc.py (828 Bytes)
testCSG.py (1.0 KB)

Fixed in the develop branch https://github.com/openmc-dev/openmc/pull/2857 by @pshriwise