.hdf5 파일을 입력 (시뮬레이션에 의해 생성)으로 사용하는 코드를 실행하고 나서이를 분석하고 페도라 21 리눅스의 Konsole 셸에서 명령어 라인 (python3 Collector.py
)을 실행하여 통계 및 플롯을 생성합니다. 작업 디렉토리에 gizmo
과 utilities
이라는 두 개의 다른 폴더에 많은 .py
루틴이 있습니다. snapshot_index.hdf5
파일은 내 컴퓨터의 작업 디렉토리에있는 output
이라는 로컬 디렉토리에 시뮬레이션을 실행하는 다른 컴퓨터에서 별도로 (globus 소프트웨어를 사용하여) 전송됩니다. (0에서 600까지 실행되는 "index"에 해당하는 많은 파일이 있지만, 예를 들어 snapshot_396.hdf5 및 snapshot_600.hdf5와 같은 두 개의 색인 만 필요합니다. 시뮬레이션은 저해상도와 고해상도의 두 가지 모드로 실행됩니다.hdf5 디자이너가 .hdf5 파일을 여는 것과 관련된 손상 문제를 해결 했습니까?
kilo-bite 크기의 저해상도 .hdf5 파일이 part
표현의 입력 (위의 주요 파이썬 코드 내부) 인 경우 코드를 실행하고 결과를 생성 할 수 있지만 메가 바이트를 넣을 때 내가 오류의 의미를 이해하고 있지 않다
# in utilities.simulation.Snapshot():
read snapshot_times.txt
reading snapshot index = 600, redshift = 0.000
# in gizmo.gizmo_io.Read():
reading header from: ./output/snapshot_600.hdf5
Traceback (most recent call last):
File "Collector.py", line 12, in <module>
part=gizmo.io.Read.read_snapshots('all', 'index', 600, element_indices=None)
File "/home/username/Desktop/Projects/PaperMaterials/DM_Dominated_Objects/NewFolder2/covering_fractions/Simulations/gizmo/gizmo_io.py", line 314, in read_snapshots
'index', snapshot_index, simulation_directory, snapshot_directory, simulation_name)
File "/home/username/Desktop/Projects/PaperMaterials/DM_Dominated_Objects/NewFolder2/covering_fractions/Simulations/gizmo/gizmo_io.py", line 513, in read_header
file_in = h5py.File(file_name, 'r') # open hdf5 snapshot file
File "/usr/lib/python3.4/site-packages/h5py/_hl/files.py", line 222, in __init__
fid = make_fid(name, mode, userblock_size, fapl)
File "/usr/lib/python3.4/site-packages/h5py/_hl/files.py", line 79, in make_fid
fid = h5f.open(name, h5f.ACC_RDONLY, fapl=fapl)
File "h5f.pyx", line 71, in h5py.h5f.open (h5py/h5f.c:1809)
OSError: Unable to open file (Truncated file: eof = 933756928, sblock->base_addr = 0, stored_eoa = 1765865624)
: 크기 높은 해상도 .hdf5 파일은 part
표현의 입력으로, 나는 다음과 같은 오류 메시지가 표시됩니다. 그러나 주제에 대한 검색을 수행 할 때,이 경우에는 파일을 열 수없는 이유가 다른 경우를 제외하고는 .hdf5
개의 파일 (Corrupt files when creating HDF5 files without closing them (h5py))에 관한 새로운 문제가 아닌 것으로 나타났습니다. 내가 이해하는 바에 따르면 (정확히 맞는지 확실하지 않음) 파일이 너무 커서 잘리지 않습니다. 이 경우, 그 해결책은 무엇입니까? 그리고 내가 틀렸다면 그 쟁점은 무엇입니까? 도움을 주시면 대단히 감사하겠습니다.
파일에 적용된 세 가지 코드는 모두 "오류 : 파일을 열 수 없습니다."snapshot_index.hdf5 ""그렇습니다. 파일이 손상되었습니다. 방금 전국 실험실 슈퍼 컴퓨터에서 옮겼습니다. 그래서 그들이 추락했다면 나는 의심했다. – Allan