C “如何修复”;HDF5-DIAG:错误无法打开文件";?

C “如何修复”;HDF5-DIAG:错误无法打开文件";?,c,hdf5,meep,C,Hdf5,Meep,尝试运行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 fil

尝试运行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
有人能告诉我如何纠正这个错误吗


提前感谢

免责声明:我从未与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\u sec2\u open()
的文件名似乎是
*.h5
,这很可能是一个无效的文件名。我希望您希望将诸如
foo.h5
relative/path/to/foo.h5
/absolute/path/to/foo.h5
之类的内容传递给
H5FD\u sec2\u open()
函数

通配符通常不由这类函数处理/解释。这是一个更高级别的概念,需要“更多的文件系统访问”才能使用它做任何有用的事情,因为任何接收到该通配符的人都必须获得一个文件和目录列表,并找出哪些文件系统条目与该通配符匹配

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