mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Use 'earliest' libver in h5py for backwards-compat
This commit is contained in:
parent
75c7d41022
commit
f754357aea
6 changed files with 7 additions and 7 deletions
|
|
@ -107,7 +107,7 @@ def write_compact_458_library(endf_files, output_name='fission_Q_data.h5',
|
|||
|
||||
"""
|
||||
# Open the output file.
|
||||
out = h5py.File(output_name, 'w', libver='latest')
|
||||
out = h5py.File(output_name, 'w', libver='earliest')
|
||||
|
||||
# Write comments, if given. This commented out comment is the one used for
|
||||
# the library distributed with OpenMC.
|
||||
|
|
|
|||
|
|
@ -496,7 +496,7 @@ class IncidentNeutron(EqualityMixin):
|
|||
'originated from an ENDF file.')
|
||||
|
||||
# Open file and write version
|
||||
f = h5py.File(path, mode, libver='latest')
|
||||
f = h5py.File(path, mode, libver='earliest')
|
||||
f.attrs['version'] = np.array(HDF5_VERSION)
|
||||
|
||||
# Write basic data
|
||||
|
|
|
|||
|
|
@ -258,7 +258,7 @@ class ThermalScattering(EqualityMixin):
|
|||
|
||||
"""
|
||||
# Open file and write version
|
||||
f = h5py.File(path, mode, libver='latest')
|
||||
f = h5py.File(path, mode, libver='earliest')
|
||||
f.attrs['version'] = np.array(HDF5_VERSION)
|
||||
|
||||
# Write basic data
|
||||
|
|
|
|||
|
|
@ -823,7 +823,7 @@ class Library(object):
|
|||
# Add an attribute for the number of energy groups to the HDF5 file
|
||||
full_filename = os.path.join(directory, filename)
|
||||
full_filename = full_filename.replace(' ', '-')
|
||||
f = h5py.File(full_filename, 'w')
|
||||
f = h5py.File(full_filename, 'w', libver='earliest')
|
||||
f.attrs['# groups'] = self.num_groups
|
||||
f.close()
|
||||
|
||||
|
|
|
|||
|
|
@ -1693,9 +1693,9 @@ class MGXS(object):
|
|||
filename = filename.replace(' ', '-')
|
||||
|
||||
if append and os.path.isfile(filename):
|
||||
xs_results = h5py.File(filename, 'a')
|
||||
xs_results = h5py.File(filename, 'a', libver='earliest')
|
||||
else:
|
||||
xs_results = h5py.File(filename, 'w')
|
||||
xs_results = h5py.File(filename, 'w', libver='earliest')
|
||||
|
||||
# Construct a collection of the subdomains to report
|
||||
if not isinstance(subdomains, string_types):
|
||||
|
|
|
|||
|
|
@ -2517,7 +2517,7 @@ class MGXSLibrary(object):
|
|||
check_type('filename', filename, string_types)
|
||||
|
||||
# Create and write to the HDF5 file
|
||||
file = h5py.File(filename, "w")
|
||||
file = h5py.File(filename, "w", libver='earliest')
|
||||
file.attrs['filetype'] = np.string_(_FILETYPE_MGXS_LIBRARY)
|
||||
file.attrs['version'] = [_VERSION_MGXS_LIBRARY, 0]
|
||||
file.attrs['energy_groups'] = self.energy_groups.num_groups
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue