Hello,
I am reading TNG group files with the H5 library in C++. In particular, I created a simple routine that opend fofFiles files -> Subhalo Group -> SubhaloLenType dataset.
It perfectly works on some snapshots, and fails on other snapshot. The error is that it apparently can't find the SubhaloLenType dataset in some fof_files.
Could it be that the files are damaged? But if I erase them, and dowload them again, it gives me the same error. What do you think about it? Thanks for helping me.
Here I write the output of my code , when the erorr raises:
Starting to read TNG
/Desktop/TNG100-1/output/groups_051/fof_subhalo_tab_051.0.hdf5
/Desktop/TNG100-1/output/groups_051/fof_subhalo_tab_051.1.hdf5
HDF5-DIAG: Error detected in HDF5 (1.10.7) thread 0:
#000: H5D.c line 298 in H5Dopen2(): unable to open dataset
major: Dataset
minor: Can't open object
#001: H5Dint.c line 1429 in H5D__open_name(): not found
major: Dataset
minor: Object not found
#002: H5Gloc.c line 420 in H5G_loc_find(): can't find object
major: Symbol table
minor: Object not found
#003: H5Gtraverse.c line 848 in H5G_traverse(): internal path traversal failed
major: Symbol table
minor: Object not found
#004: H5Gtraverse.c line 624 in H5G__traverse_real(): traversal operator failed
major: Symbol table
minor: Callback failed
#005: H5Gloc.c line 376 in H5G__loc_find_cb(): object 'SubhaloLenType' doesn't exist
major: Symbol table
minor: Object not found
terminate called after throwing an instance of 'H5::GroupIException'
Dylan Nelson
28 Jun '21
There are no groups or subhalos in that file, as indicated by the header fields, so you shouldn't try to read such a dataset.
(If you re-implement the read routines in C++ you will have to handle such details, and can refer to the python groupcat.py as a reference).
in the groupcat.py file, it only raises an exception when group/subahlos don't exist; I think I will use continue statement in the loop I use to read fofgroup files - does it make sense in order to use this function, where I need SubhaloLenType ? Thanks again.
Hello,
I am reading TNG group files with the H5 library in C++. In particular, I created a simple routine that opend
fofFiles
files ->Subhalo
Group ->SubhaloLenType
dataset.It perfectly works on some snapshots, and fails on other snapshot. The error is that it apparently can't find the
SubhaloLenType
dataset in some fof_files.Could it be that the files are damaged? But if I erase them, and dowload them again, it gives me the same error. What do you think about it? Thanks for helping me.
Here I write the output of my code , when the erorr raises:
There are no groups or subhalos in that file, as indicated by the header fields, so you shouldn't try to read such a dataset.
(If you re-implement the read routines in C++ you will have to handle such details, and can refer to the python
groupcat.py
as a reference).in the
groupcat.py
file, it only raises an exception when group/subahlos don't exist; I think I will usecontinue
statement in the loop I use to readfof
group files - does it make sense in order to use this function, where I needSubhaloLenType
? Thanks again.The skip for this case occurs here on line 69.