I encountered this problem trying to run velociraptor on a swift snapshot where NumPart_ThisFile is stored as a 64 bit integer. The code reads attributes from the input HDF5 snapshot using H5Aread, which takes a parameter mem_type_id. This should be the type of the variable in memory but the code passes in the type of the data in the file instead. This causes a segfault if they don't match.
This PR modifies the code to find the data type in memory using the overloaded hdf5_type() function and pass that to H5Aread. If the memory and file types don't exactly match HDF5 will do the type conversion and everything should still work.
I encountered this problem trying to run velociraptor on a swift snapshot where NumPart_ThisFile is stored as a 64 bit integer. The code reads attributes from the input HDF5 snapshot using H5Aread, which takes a parameter mem_type_id. This should be the type of the variable in memory but the code passes in the type of the data in the file instead. This causes a segfault if they don't match.
This PR modifies the code to find the data type in memory using the overloaded hdf5_type() function and pass that to H5Aread. If the memory and file types don't exactly match HDF5 will do the type conversion and everything should still work.