Trouble using FENDL 3.2 hdf5 files in photon simulations

I am trying to calculate heating for various fusion blanket materials. I downloaded the FENDL 3.2 cross section library from Other Data Libraries | OpenMC, but when I run my simulation (attached) with photon transport on to get the heating from both neutrons and secondary photons, I run into the readout in the terminal shown below.

I am using the develop branch, which I pulled on September 7, 2023.

I also tried using the ‘heating-local’ score with photon transport off, and I got tally results of 0. I realized that the FENDL 3.2 library found on the OpenMC website does not include the MT=901 reaction, but when I installed the FENDL 3.2 ENDF files from the IAEA website, and used the OpenMC Python API to run NJOY and create a cross section library, the MT=901 reaction was included, and I was able to run with the ‘heating-local’ score. But I still can’t use the ‘heating’ score with photon transport on, without seeing the message below.

Reading Li from /home/cdunn314/fendl3.2_2_hdf5/photon/Li.h5
HDF5-DIAG: Error detected in HDF5 (1.12.2) MPI-process 0:
  #000: H5A.c line 454 in H5Aopen(): unable to open attribute: 'binding_energy'
    major: Attribute
    minor: Can't open object
  #001: H5VLcallback.c line 1091 in H5VL_attr_open(): attribute open failed
    major: Virtual Object Layer
    minor: Can't open object
  #002: H5VLcallback.c line 1058 in H5VL__attr_open(): attribute open failed
    major: Virtual Object Layer
    minor: Can't open object
  #003: H5VLnative_attr.c line 124 in H5VL__native_attr_open(): unable to open attribute: 'binding_energy'
    major: Attribute
    minor: Can't open object
  #004: H5Aint.c line 422 in H5A__open(): unable to load attribute info from object header for attribute: 'binding_energy'
    major: Attribute
    minor: Can't open object
  #005: H5Oattribute.c line 494 in H5O__attr_open_by_name(): can't locate attribute: 'binding_energy'
    major: Attribute
    minor: Object not found
HDF5-DIAG: Error detected in HDF5 (1.12.2) MPI-process 0:
  #000: H5A.c line 698 in H5Aread(): not an attribute
    major: Invalid arguments to routine
    minor: Inappropriate type
HDF5-DIAG: Error detected in HDF5 (1.12.2) MPI-process 0:
  #000: H5A.c line 1626 in H5Aclose(): not an attribute
    major: Invalid arguments to routine
    minor: Inappropriate type
HDF5-DIAG: Error detected in HDF5 (1.12.2) MPI-process 0:
  #000: H5A.c line 454 in H5Aopen(): unable to open attribute: 'num_electrons'
    major: Attribute
    minor: Can't open object
  #001: H5VLcallback.c line 1091 in H5VL_attr_open(): attribute open failed
    major: Virtual Object Layer
    minor: Can't open object
  #002: H5VLcallback.c line 1058 in H5VL__attr_open(): attribute open failed
    major: Virtual Object Layer
    minor: Can't open object
  #003: H5VLnative_attr.c line 124 in H5VL__native_attr_open(): unable to open attribute: 'num_electrons'
    major: Attribute
    minor: Can't open object
  #004: H5Aint.c line 422 in H5A__open(): unable to load attribute info from object header for attribute: 'num_electrons'
    major: Attribute
    minor: Can't open object
  #005: H5Oattribute.c line 494 in H5O__attr_open_by_name(): can't locate attribute: 'num_electrons'
    major: Attribute
    minor: Object not found
HDF5-DIAG: Error detected in HDF5 (1.12.2) MPI-process 0:
  #000: H5A.c line 698 in H5Aread(): not an attribute
    major: Invalid arguments to routine
    minor: Inappropriate type
HDF5-DIAG: Error detected in HDF5 (1.12.2) MPI-process 0:
  #000: H5A.c line 1626 in H5Aclose(): not an attribute
    major: Invalid arguments to routine
    minor: Inappropriate type
HDF5-DIAG: Error detected in HDF5 (1.12.2) MPI-process 0:
  #000: H5A.c line 454 in H5Aopen(): unable to open attribute: 'binding_energy'
    major: Attribute
    minor: Can't open object
  #001: H5VLcallback.c line 1091 in H5VL_attr_open(): attribute open failed
    major: Virtual Object Layer
    minor: Can't open object
  #002: H5VLcallback.c line 1058 in H5VL__attr_open(): attribute open failed
    major: Virtual Object Layer
    minor: Can't open object
  #003: H5VLnative_attr.c line 124 in H5VL__native_attr_open(): unable to open attribute: 'binding_energy'
    major: Attribute
    minor: Can't open object
  #004: H5Aint.c line 422 in H5A__open(): unable to load attribute info from object header for attribute: 'binding_energy'
    major: Attribute
    minor: Can't open object
  #005: H5Oattribute.c line 494 in H5O__attr_open_by_name(): can't locate attribute: 'binding_energy'
    major: Attribute
    minor: Object not found
HDF5-DIAG: Error detected in HDF5 (1.12.2) MPI-process 0:
  #000: H5A.c line 698 in H5Aread(): not an attribute
    major: Invalid arguments to routine
    minor: Inappropriate type
HDF5-DIAG: Error detected in HDF5 (1.12.2) MPI-process 0:
  #000: H5A.c line 1626 in H5Aclose(): not an attribute
    major: Invalid arguments to routine
    minor: Inappropriate type
HDF5-DIAG: Error detected in HDF5 (1.12.2) MPI-process 0:
  #000: H5A.c line 454 in H5Aopen(): unable to open attribute: 'num_electrons'
    major: Attribute
    minor: Can't open object
  #001: H5VLcallback.c line 1091 in H5VL_attr_open(): attribute open failed
    major: Virtual Object Layer
    minor: Can't open object
  #002: H5VLcallback.c line 1058 in H5VL__attr_open(): attribute open failed
    major: Virtual Object Layer
    minor: Can't open object
  #003: H5VLnative_attr.c line 124 in H5VL__native_attr_open(): unable to open attribute: 'num_electrons'
    major: Attribute
    minor: Can't open object
  #004: H5Aint.c line 422 in H5A__open(): unable to load attribute info from object header for attribute: 'num_electrons'
    major: Attribute
    minor: Can't open object
  #005: H5Oattribute.c line 494 in H5O__attr_open_by_name(): can't locate attribute: 'num_electrons'
    major: Attribute
    minor: Object not found
HDF5-DIAG: Error detected in HDF5 (1.12.2) MPI-process 0:
  #000: H5A.c line 698 in H5Aread(): not an attribute
    major: Invalid arguments to routine
    minor: Inappropriate type
HDF5-DIAG: Error detected in HDF5 (1.12.2) MPI-process 0:
  #000: H5A.c line 1626 in H5Aclose(): not an attribute
    major: Invalid arguments to routine
    minor: Inappropriate type

I wasn’t able to attach my input file to create this message, so here it is:

import openmc
import os


breeder_thickness = 200

# File path to cross_sections.xml for FENDL 3.2
cross_section_dir = '/home/cdunn314/fendl3.2_2_hdf5/cross_sections.xml'



######### Materials #################

# Pure natural lithium
lithium_nat = openmc.Material(name='lithium_nat')
lithium_nat.add_element('Li', 1.0, 'ao')
lithium_nat.set_density('g/cm3', 0.534)

materials = openmc.Materials([lithium_nat])
materials.cross_sections = cross_section_dir
materials.export_to_xml()

############### Geometry ####################

inner_sphere = openmc.Sphere(r=300)
breeder_sphere = openmc.Sphere(r=inner_sphere.r+breeder_thickness)
kill_sphere = openmc.Sphere(r=breeder_sphere.r+50, boundary_type='vacuum')

plasma_reg = -inner_sphere
breeder_reg = -breeder_sphere & +inner_sphere
void_reg = -kill_sphere & +breeder_sphere

plasma_cell = openmc.Cell(fill=None, region=plasma_reg, name='Plasma')
breeder_cell = openmc.Cell(fill=lithium_nat, region=breeder_reg, 
                        name='Breeder')
void_cell = openmc.Cell(fill=None, region=void_reg, name='Void Cell')

cells = [plasma_cell, breeder_cell, void_cell]

universe = openmc.Universe(cells=cells)
geometry = openmc.Geometry(universe)
geometry.remove_redundant_surfaces()
geometry.export_to_xml()

############# Settings ###################

my_source = openmc.Source()
point = openmc.stats.Point((0,0,0))
my_source.space = point
### Energy distribution of source is monoenergetic 14.1 MeV n
my_source.energy = openmc.stats.Discrete([14.1E6], [1.0])
## Set source strength to 1
my_source.strength = 1.0

settings = openmc.Settings()
settings.run_mode = 'fixed source'
settings.source = my_source
settings.batches = 100
settings.inactive = 0
settings.particles = int(1e5)
settings.photon_transport = True

settings.export_to_xml()

############# Tallies ####################
heating_tally = openmc.Tally(name='heating_tally')
breeder_filter = openmc.CellFilter(breeder_cell)
heating_tally.filters.append(breeder_filter)
heating_tally.scores = ['heating']

tallies = openmc.Tallies([heating_tally])
tallies.export_to_xml()

########## Run Simulation #############
openmc.run()

It appears we were able to find a solution to this. I believe what was happening was openmc was pulling files from my hdf5 installation from anaconda/bin instead of the system installation. After opening my ~/.bashrc file and commenting out the export PATH="path/to/anaconda/bin:$PATH" line, I ran the following in a newly opened terminal:

sudo apt install libhdf5-dev
sudo apt install libhdf5-openmpi-dev

Then, I reinstalled openmc from source, then I uncommented the export PATH="path/to/anaconda/bin:$PATH" line, closed and reopened my Ubuntu terminal, moved to the openmc directory, and executed pip install -e .. This solved the HDF5 errors and allowed me to run the input file posted with the ‘heating’ score and photon transport enabled.

Looks like you solved this one already.

I just wanted to mention that there is a repo that helps dowload and convert the ace/endf files for Fendl and others

And also as a package if you prefer