Concatenate a large number of HDF5 files

后端 未结 3 1038
迷失自我
迷失自我 2020-12-09 13:01

I have about 500 HDF5 files each of about 1.5 GB.

Each of the files has the same exact structure, which is 7 compound (int,double,double) datasets and variable numbe

3条回答
  •  遥遥无期
    2020-12-09 13:28

    I found that most of the time was spent in resizing the file, as I was resizing at each step, so I am now first going trough all my files and get their length (it is variable).

    Then I create the global h5file setting the total length to the sum of all the files.

    Only after this phase I fill the h5file with the data from all the small files.

    now it takes about 10 seconds for each file, so it should take less than 2 hours, while before it was taking much more.

提交回复
热议问题