Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use 'earliest' libver with h5py for backwards-compatibility #945

Merged
merged 3 commits into from Dec 18, 2017

Conversation

smharper
Copy link
Contributor

Fixes #940. This PR asks h5py to output HDF5 files in the most backwards-compatible format possible. Twice we've had new users unable to get going from a fresh install of OpenMC because Anaconda3 uses a higher version for HDF5 than the Ubuntu defaults. Plus, it's easy to get your HDF5 versions out-of-sync when you use many different machines.

I tested this on the NNDC U-235 data and it only increases file size from 4.3 MB to 4.7 MB---a price well worth paying in my opinion.

@smharper smharper added the Data label Dec 17, 2017
Copy link
Contributor

@paulromano paulromano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree this would ease some user pain. However, I'd like to retain an option to generate libraries using the latest format because there are some important performance improvements in the 1.10 format specifically for HPC (outlined here). What I would suggest is to add a libver keyword argument to IncidentNeutron.export_to_hdf5 and ThermalScattering.export_to_hdf5 that defaults to 'earliest'. I'm not sure it's important for the other classes, so I'll leave it up to you whether you want to include it for the others.

@@ -28,6 +28,9 @@ parser.add_argument('-d', '--destination', default='mcnp_endfb71',
help='Directory to create new library in')
parser.add_argument('-f', '--fission_energy_release',
help='HDF5 file containing fission energy release data')
parser.add_argument('--latest_hdf5', help='Use latest HDF5 format for '
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about:

parser.add_argument('--libver', choices={'earliest', 'latest'}, default='earliest', ...)

@paulromano paulromano merged commit 2c9b210 into openmc-dev:develop Dec 18, 2017
@smharper smharper deleted the h5py_compatibility branch January 19, 2018 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants