简体   繁体   English

将(>)h5dump输出重定向到文本文件会导致数据丢失

[英]Redirecting(>) h5dump output to text file causes data loss

I have a bash script that runs the following command: 我有一个运行以下命令的bash脚本:

h5dump --noindex particle_pos.6400_acetone > tempPythonFile.txt h5dump --noindex particle_pos.6400_acetone> tempPythonFile.txt

The contents of the hdf5 file, particle_pos.6400_acetone, is a collection of x,y,z coordinates like a sample shown below. hdf5文件的内容particle_pos.6400_acetone是x,y,z坐标的集合,如下所示。

HDF5 "particle_pos.6400_acetone" { GROUP "/" {    DATASET "particle position" {
      DATATYPE  H5T_COMPOUND {
         H5T_IEEE_F64LE "x";
         H5T_IEEE_F64LE "y";
         H5T_IEEE_F64LE "z";
      }
      DATASPACE  SIMPLE { ( 7372815 ) / ( 7372815 ) }
      DATA {
         {
            0.0985972,
            0.0051215,
            0.000543894
         },
         {
            0.0986334,
            0.00520195,
            0.000408405
         },

The file should look like the text above all the way through, but when I go to the end of the text file I see the following. 该文件看起来应该像上面的文本一样,但是当我转到文本文件的末尾时,会看到以下内容。

},
         {
            ,
            -0.162017,

         },
         {
            ,
            ,

         },
         {
            ,
            ,

         },
         {
            ,
            ,

To me it looks like something is happening that is dropping data because there is occasionally a floating point number in the sea of blank entries. 在我看来,正在发生某些事情正在丢弃数据,因为在空白条目的海洋中偶尔会有一个浮点数。

I haven't had an issue with this command on smaller data sets, but I started seeing data missing from the tempPythonFile.txt file when my data set contained 7372815 elements. 对于较小的数据集,此命令没有任何问题,但是当我的数据集包含7372815个元素时,我开始看到tempPythonFile.txt文件中的数据丢失。

Is there a more accepted method for getting HDF5 data out to a text file? 是否存在将HDF5数据输出到文本文件的更可接受的方法? Is the redirect(>) command not suited for large amounts of data? redirect(>)命令是否不适合大量数据?

Thank you 谢谢

我确实收到了HDF5小组的回音,他们确实发现这与我使用的HDF5版本有关。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM