I am working with IllustrisTNG HDF5 snapshots (specifically TNG100-2) using a Fortran HDF5 interface, and I am encountering a read error when processing full snapshots.
My reader works propely for mini snapshots and I am able to read all the quantities I am interested without any visible issue. However, when applying the same code to full snapshots (e.g., snap_099), I encounter an HDF5 read failure followed by a segmentation fault when i try to read the coordinates or any other variable (for gas).
Error message includes:
Reading iteration file: 99 ./simu_TNG100_2/snap_099.0.hdf5
HDF5-DIAG: Error detected in HDF5 (1.10.7) thread 1:
#000: ../../../src/H5Dio.c line 198 in H5Dread(): can't read data
major: Dataset
minor: Read failed
#001: ../../../src/H5Dio.c line 599 in H5Dread(): can't read data
major: Dataset
minor: Read failed
#002: ../../../src/H5Dcontig.c line 622 in H5Dcontig_read(): contiguous read failed
major: Dataset
minor: Read failed
#003: ../../../src/H5Dselect.c line 290 in H5Dselect_read(): read error
major: Dataspace
minor: Read failed
#004: ../../../src/H5Dselect.c line 223 in H5Dselect_io(): read error
major: Dataspace
minor: Read failed
#005: ../../../src/H5Dcontig.c line 957 in H5Dcontig_readvv(): can't perform vectorized sieve buffer read
major: Dataset
minor: Can't operate on object
#006: ../../../src/H5VM.c line 1464 in H5VM_opvv(): can't perform operation
major: Internal error (too specific to document in detail)
minor: Can't operate on object
#007: ../../../src/H5Dcontig.c line 754 in H5Dcontig_readvv_sieve_cb(): block read failed
major: Dataset
minor: Read failed
#008: ../../../src/H5Fio.c line 116 in H5F_block_read(): read through page buffer failed
major: Low-level I/O
minor: Read failed
#009: ../../../src/H5PB.c line 736 in H5PB_read(): read through metadata accumulator failed
major: Page Buffering
minor: Read failed
#010: ../../../src/H5Faccum.c line 260 in H5Faccum_read(): driver read request failed
major: Low-level I/O
minor: Read failed
#011: ../../../src/H5FDint.c line 198 in H5FD_read(): driver read request failed
major: Virtual File Layer
minor: Read failed
#012: ../../../src/H5FDsec2.c line 753 in H5FDsec2_read(): file read failed: time = Thu Mar 26 10:34:49 2026
, filename = './simu_TNG100_2/snap_099.0.hdf5', file descriptor = 3, errno = 14, error message = 'Bad address', buf = 0x1465aaa84000, total read size = 147669392, bytes this sub-read = 147669392, bytes actually read = 18446744073709551615, offset = 0
major: Low-level I/O
minor: Read failed
I am using H5Dget_type_f to retrieve the dataset datatype and passing the corresponding native type (H5T_NATIVE_REAL or H5T_NATIVE_DOUBLE) to H5Dread but seems to be an issue elsewhere.
Are there known differences between mini and full snapshots (e.g., chunking, compression, dataset layout) that could affect HDF5 reading in Fortran?
Any guidance or examples for robust reading of full snapshots in Fortran would be greatly appreciated.
Hello,
I am working with IllustrisTNG HDF5 snapshots (specifically TNG100-2) using a Fortran HDF5 interface, and I am encountering a read error when processing full snapshots.
My reader works propely for mini snapshots and I am able to read all the quantities I am interested without any visible issue. However, when applying the same code to full snapshots (e.g., snap_099), I encounter an HDF5 read failure followed by a segmentation fault when i try to read the coordinates or any other variable (for gas).
Reading iteration file: 99 ./simu_TNG100_2/snap_099.0.hdf5
HDF5-DIAG: Error detected in HDF5 (1.10.7) thread 1:
#000: ../../../src/H5Dio.c line 198 in H5Dread(): can't read data
major: Dataset
minor: Read failed
#001: ../../../src/H5Dio.c line 599 in H5Dread(): can't read data
major: Dataset
minor: Read failed
#002: ../../../src/H5Dcontig.c line 622 in H5Dcontig_read(): contiguous read failed
major: Dataset
minor: Read failed
#003: ../../../src/H5Dselect.c line 290 in H5Dselect_read(): read error
major: Dataspace
minor: Read failed
#004: ../../../src/H5Dselect.c line 223 in H5Dselect_io(): read error
major: Dataspace
minor: Read failed
#005: ../../../src/H5Dcontig.c line 957 in H5Dcontig_readvv(): can't perform vectorized sieve buffer read
major: Dataset
minor: Can't operate on object
#006: ../../../src/H5VM.c line 1464 in H5VM_opvv(): can't perform operation
major: Internal error (too specific to document in detail)
minor: Can't operate on object
#007: ../../../src/H5Dcontig.c line 754 in H5Dcontig_readvv_sieve_cb(): block read failed
major: Dataset
minor: Read failed
#008: ../../../src/H5Fio.c line 116 in H5F_block_read(): read through page buffer failed
major: Low-level I/O
minor: Read failed
#009: ../../../src/H5PB.c line 736 in H5PB_read(): read through metadata accumulator failed
major: Page Buffering
minor: Read failed
#010: ../../../src/H5Faccum.c line 260 in H5Faccum_read(): driver read request failed
major: Low-level I/O
minor: Read failed
#011: ../../../src/H5FDint.c line 198 in H5FD_read(): driver read request failed
major: Virtual File Layer
minor: Read failed
#012: ../../../src/H5FDsec2.c line 753 in H5FDsec2_read(): file read failed: time = Thu Mar 26 10:34:49 2026
, filename = './simu_TNG100_2/snap_099.0.hdf5', file descriptor = 3, errno = 14, error message = 'Bad address', buf = 0x1465aaa84000, total read size = 147669392, bytes this sub-read = 147669392, bytes actually read = 18446744073709551615, offset = 0
major: Low-level I/O
minor: Read failed
I am using H5Dget_type_f to retrieve the dataset datatype and passing the corresponding native type (H5T_NATIVE_REAL or H5T_NATIVE_DOUBLE) to H5Dread but seems to be an issue elsewhere.
Are there known differences between mini and full snapshots (e.g., chunking, compression, dataset layout) that could affect HDF5 reading in Fortran?
Any guidance or examples for robust reading of full snapshots in Fortran would be greatly appreciated.
Thank you for your help.