Using NJOY2016 to generate the HDF5 library

Hi everyone,
I meet some problem when using the generate_jendl.py script to generate the HDF5 library for JENDL4.0.
The ENDF6 file processing code I used is NJOY2016, but when I try to Open the HDF5 file using the HDF5VIEW, Error message has occured; Also, when I try to simulate a test case, error occured in the loading HDF5 file process. So I can not understand this problem and how to deal with it. Some detailed images are in follows:

2

Sometimes there can be a problem if a newer version of HDF5 is used to produce a library but an older version is used for the OpenMC executable (or another package like HDFView). I would try rerunning the generate_jendl.py script using the --libver=earliest flag, which tells it to write out HDF5 files in a format that should be compatible with older versions of HDF5.

Hi paulro,
Thanks for the reply. I test the generate_jendl.py script using the --libver=earliest flag, and it works well, so the right HDF5 file can be generated. The HDF5 library I used is 1.8.16.
Besides, I also try to use the --libver=latest to generate the 3.0 ver of HDF file by modify the python function def process_neutron(path, output_dir, libver, temperatures=None): in utils.py file. I replace the line " data.export_to_hdf5(h5_file, ‘w’, libver=libver) " by " data.export_to_hdf5(h5_file)", the generate_jendl.py script can generate the righet HDF5 library,
So I guess the Hidden bugs is in the <export_to_hdf5> classmethod for openmc.data.IncidentNeutron.2020-12-19 20-15-02屏幕截图

By default, IncidentNeutron.export_to_hdf5 uses libver='earliest', so omitting the libver argument to that method is equivalent to specifying --libver=earliest. Normally if the HDF5 library you are using with OpenMC is the same as the HDF5 library that is used by the Python h5py module, it should work with both ‘earliest’ and ‘latest’, but ‘latest’ is recommended for performance reasons. However, when the version of HDF5 used with OpenMC is older (1.8 series), this is where you may need ‘earliest’ because the format written with ‘latest’ if using HDF5 1.10+ is not compatible. So, it’s not a bug with the code but just a subtlety with HDF5 versions and file formats.

1 Like

Thanks Paul, very helpful.