-
Notifications
You must be signed in to change notification settings - Fork 262
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
Make netcdf-4 use the the stride > 1 facilities of hdf5 #908
Comments
FYI NCO long ago implemented a workaround that addresses this issue for the special case when the strided dimension is the first dimension and only one dimension is strided. The code flag is USE_NC4_SRD_WORKAROUND in nco_msa.c. Once the library fix for #908 is done then we can deprecate our workaround. Pinging @hmb1 so he is aware of this pending development. |
Thanks for the reminder. I am starting work on this just now. |
Ok, I think I have this working. It looks like it is going to make |
corresponding HDF5 operations. re: github issue #908 also in reference to pydata/xarray#2004 The netcdf-c library has implemented the nc_get_vars and nc_put_vars operations as element at a time. This has resulted in very slow operation. This pr attempts to improve the situation for netcdf-4/hdf5 files by using the slab operations provided by the hdf5 library. The new implementation passes the get/put vars stride information down to the hdf5 slab operations. The result appears to improve performance significantly. Some simple tests on large 2-D arrays shows speedups in excess of 150. Misc. other changes: 1. fix bug in ncgen/semantics.c; using a list's allocated length instead of actual length. 2. Added a temporary hook in the netcdf library plus a performance test case (tst_varsperf.c) to estimate the speedup. After users have had some experience with this, I will remove it, probably after the 4.7 release.
This is now solved by pull request #1001 |
Currently, netcdf-4 uses a very slow implementation of vars when stride > 1.
Convert to use the stride capabilities of the underlying hdf5.
The text was updated successfully, but these errors were encountered: