1

尝试运行 MEEP 模拟时出现以下错误:

HDF5-DIAG: Error detected in HDF5 (1.10.5) thread 0:
  #000: H5F.c line 509 in H5Fopen(): unable to open file
    major: File accessibilty
    minor: Unable to open file
  #001: H5Fint.c line 1498 in H5F_open(): unable to open file: time = Fri Nov 15 16:56:54 2019
, name = '*.h5', tent_flags = 0
    major: File accessibilty
    minor: Unable to open file
  #002: H5FD.c line 734 in H5FD_open(): open failed
    major: Virtual File Layer
    minor: Unable to initialize object
  #003: H5FDsec2.c line 346 in H5FD_sec2_open(): unable to open file: name = '*.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0
    major: File accessibilty
    minor: Unable to open file
h5topng error: error opening HD5 file
rm: *.h5: No such file or directory

有人可以告诉我如何解决这个/理解错误吗?

提前致谢

4

1 回答 1

1

免责声明:我从未与 MEEP 合作过。

该错误似乎表明该文件不存在:

#003: H5FDsec2.c line 346 in H5FD_sec2_open(): unable to open file: name = '*.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0

所以这似乎是核心问题。进一步深入兔子洞,似乎传递给的文件名H5FD_sec2_open()*.h5可能是无效的文件名。我希望您想将诸如foo.h5orrelative/path/to/foo.h5之类的东西传递/absolute/path/to/foo.h5H5FD_sec2_open()函数。

通配符通常不被这些函数处理/解释。这是一个更高级别的概念,需要“更多的文件系统访问权限”才能对其进行任何有用的操作,因为接收该通配符的人必须获取文件和目录列表并找出哪些文件系统条目与该通配符匹配。

因此,我的回答是:确保将有效的文件路径传递给相应的文件打开函数。此外,您可能希望扩展您的程序,以便在将其传递给相应的 MEEP 函数之前检查它是否是有效文件,这使您可以更好地控制错误和用户反馈。

于 2019-11-15T16:42:34.940 回答