Skip to content

Handle Possible HDF5 Reading Errors #32

Description

@ranocha

We should check possible errors while reading (and writing) HDF5 files and print appropriate error messages. For example, if settings/kernel_settings is missing, I get the cryptic output

Available devices: 1
Intel(R) Core(TM) i5-4590S CPU @ 3.00GHz
OpenCL version: OpenCL 2.1 (Build 0)
Memory limit: 8279801856
WG limit: 8192

Reading kernel from file: copy_kernel_py2.cl... 
HDF5-DIAG: Error detected in HDF5 (1.10.0-patch1) thread 140244994254656:
  #000: ../../../src/H5D.c line 296 in H5Dopen2(): unable to open dataset
    major: Dataset
    minor: Can't open object
  #001: ../../../src/H5Dint.c line 1463 in H5D__open_name(): not found
    major: Dataset
    minor: Object not found
  #002: ../../../src/H5Gloc.c line 430 in H5G_loc_find(): can't find object
    major: Symbol table
    minor: Object not found
  #003: ../../../src/H5Gtraverse.c line 869 in H5G_traverse(): internal path traversal failed
    major: Symbol table
    minor: Object not found
  #004: ../../../src/H5Gtraverse.c line 641 in H5G_traverse_real(): traversal operator failed
    major: Symbol table
    minor: Callback failed
  #005: ../../../src/H5Gloc.c line 385 in H5G_loc_find_cb(): object 'kernel_settings' doesn't exist
    major: Symbol table
    minor: Object not found
HDF5-DIAG: Error detected in HDF5 (1.10.0-patch1) thread 140244994254656:
  #000: ../../../src/H5D.c line 449 in H5Dget_type(): not a dataset
    major: Invalid arguments to routine
    minor: Inappropriate type
HDF5-DIAG: Error detected in HDF5 (1.10.0-patch1) thread 140244994254656:
  #000: ../../../src/H5T.c line 2045 in H5Tis_variable_str(): not a datatype
    major: Invalid arguments to routine
    minor: Inappropriate type
HDF5-DIAG: Error detected in HDF5 (1.10.0-patch1) thread 140244994254656:
  #000: ../../../src/H5D.c line 375 in H5Dget_space(): not a dataset
    major: Invalid arguments to routine
    minor: Inappropriate type
HDF5-DIAG: Error detected in HDF5 (1.10.0-patch1) thread 140244994254656:
  #000: ../../../src/H5S.c line 865 in H5Sget_simple_extent_ndims(): not a dataspace
    major: Invalid arguments to routine
    minor: Inappropriate type
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions