Skip to content

Error thrown when wrirting large output files: Number of elements in chunk must be < 4GB #228

@prerakgarg07

Description

@prerakgarg07

I am trying to run binned images on 5000 wavelength points and the code throws an error when writing out the image file.

The error is thrown because the maximum chunk size of HDF5 is 4GB. Is there a way to set a lower chunk size?

The full error traceback is as follows:

 [main] exiting raytracing iteration
 [image_write] writing out images
HDF5-DIAG: Error detected in HDF5 (1.10.1) thread 0:
  #000: H5Pdcpl.c line 2019 in H5Pset_chunk(): number of elements in chunk must be < 4GB
    major: Invalid arguments to routine
    minor: Out of range
HDF5-DIAG: Error detected in HDF5 (1.10.1) thread 0:
  #000: H5D.c line 145 in H5Dcreate2(): unable to create dataset
    major: Dataset
    minor: Unable to initialize object
  #001: H5Dint.c line 490 in H5D__create_named(): unable to create and link to dataset
    major: Dataset
    minor: Unable to initialize object
  #002: H5L.c line 1695 in H5L_link_object(): unable to create new link to object
    major: Links
    minor: Unable to initialize object
  #003: H5L.c line 1939 in H5L_create_real(): can't insert link
    major: Symbol table
    minor: Unable to insert object
  #004: H5Gtraverse.c line 867 in H5G_traverse(): internal path traversal failed
    major: Symbol table
    minor: Object not found
  #005: H5Gtraverse.c line 639 in H5G_traverse_real(): traversal operator failed
    major: Symbol table
    minor: Callback failed
  #006: H5L.c line 1742 in H5L_link_cb(): unable to create object
    major: Object header
    minor: Unable to initialize object
  #007: H5O.c line 3178 in H5O_obj_create(): unable to open object
    major: Object header
    minor: Can't open object
  #008: H5Doh.c line 291 in H5O__dset_create(): unable to create dataset
    major: Dataset
    minor: Unable to initialize object
  #009: H5Dint.c line 1202 in H5D__create(): filters can only be used with chunked layout
    major: Dataset
    minor: Bad value
HDF5-DIAG: Error detected in HDF5 (1.10.1) thread 0:
  #000: H5Dio.c line 226 in H5Dwrite(): not a dataset
    major: Invalid arguments to routine
    minor: Inappropriate type
HDF5-DIAG: Error detected in HDF5 (1.10.1) thread 0:
  #000: H5D.c line 332 in H5Dclose(): not a dataset
    major: Invalid arguments to routine
    minor: Inappropriate type
 -------------------------------------------------------------------------------
  HDF5 returned an error in hdf5_write_k_h5t_ieee_f64le [2]
  See above for traceback

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions