Jeff Whitaker
Jeff Whitaker
That's what it sounds like, but it happens for me even when OMP_NUM_THREADS=1. I may try recompiling hdf5 without threading enabled and see if that makes a difference.
The segfault occurs even when hdf5 is compiled with the "threadsafe" option.
Also occurs if "with nogil" wrapper around netcdf library calls is removed. So, it does not look to be a thread related issue.
Confirmed. Looks like the error occurs only if close and re-open the file before the rename. Will need to try to reproduce this with a simple C program to see...
Minimal python example ```python from netCDF4 import Dataset filename = 'test_rename_variable.nc' nc_file = Dataset(filename, 'w') nc_file.createDimension('bands',60) bandgrp=nc_file.createGroup('sensor_band_parameters') wave=bandgrp.createVariable ('waves','f4',('bands')) nc_file.close() nc_file = Dataset(filename, 'a') ngid = nc_file.groups['sensor_band_parameters'] ngid.renameVariable('waves','wavelength') nc_file.close() ```
Here's a minimal C example: ```c #include #include #include #define DIM1_NAME "lon" #define GRP1_NAME "grp" #define VAR1_NAME "lon" #define VAR2_NAME "longitude" #define DIM1_LEN 1 #define NDIM1 1 #define ERR(e) {printf("Error:...
Not suggesting that as a workaround. Hopefully the netcdf-c dev team will come up with a fix soon.
I'm open to suggestions on how to better interpret errors coming from the HDF5 c library.
This may not be a good idea in general. I don't think it will work unless `mpicc` is a wrapper for the same c compiler used to build python, since...
i'll leave it open for now in case someone more knowledgable about distutils wants to chime in.