Closed JunCEEE closed 4 years ago
@ejcjason, can you also fix the tests? see https://travis-ci.org/eucall-software/simex_platform/jobs/648439779 for details (scroll down to the bottom).
From the FAIL information, it's the problem of PhotonBeamParametersTest.PhotonBeamParametersTest
"""
testSerialize (SimExTest.Parameters.PhotonBeamParametersTest.PhotonBeamParametersTest)
Test the serialization of a PhotonBeamParameters instance. ... FAIL
testSerializeToFile (SimExTest.Parameters.PhotonBeamParametersTest.PhotonBeamParametersTest)
Test the serialization of a PhotonBeamParameters instance to file. ... FAIL
testSerializeToFileName (SimExTest.Parameters.PhotonBeamParametersTest.PhotonBeamParametersTest)
Test the serialization of a PhotonBeamParameters instance to file given the filename. ... FAIL
"""
When I tried to run the test with python PhotonBeamParametersTest.py
on Maxwell, I got error
======================================================================
ERROR: testPropToBeamParameters (__main__.PhotonBeamParametersTest)
Test the utility function to construct a PhotonBeamParameters instance from prop output (wavefront file).
----------------------------------------------------------------------
Traceback (most recent call last):
File "PhotonBeamParametersTest.py", line 206, in testPropToBeamParameters
beam_parameters = propToBeamParameters(TestUtilities.generateTestFilePath("prop_out_0000001.h5"))
File "/gpfs/exfel/data/user/juncheng/panoscProject/src/simex_platform/Sources/python/SimEx/Parameters/PhotonBeamParameters.py", line 183, in propToBeamParameters
wavefront.load_hdf5( prop_output_path )
File "/gpfs/exfel/data/user/juncheng/panoscProject/src/simex_platform/lib/python3.6/wpg/wavefront.py", line 184, in load_hdf5
self._update_from_dict(utils.load_dict_slash_hdf5(file_name))
File "/gpfs/exfel/data/user/juncheng/panoscProject/src/simex_platform/lib/python3.6/wpg/utils.py", line 93, in load_dict_slash_hdf5
with h5py.File(hdf5_file_name, 'r') as h5_file:
File "/home/juncheng/.conda/envs/simex-dev/lib/python3.6/site-packages/h5py/_hl/files.py", line 408, in __init__
swmr=swmr)
File "/home/juncheng/.conda/envs/simex-dev/lib/python3.6/site-packages/h5py/_hl/files.py", line 173, in make_fid
fid = h5f.open(name, flags, fapl=fapl)
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py/h5f.pyx", line 88, in h5py.h5f.open
OSError: Unable to open file (file signature not found)
The data is src/simex_platform/Tests/python/unittest/TestFiles/prop_out_0000001.h5
, but I cannot read it by h5ls
and h5dump
:
prop_out_0000001.h5: unable to open file
It seems the hdf5 is corrupted or not compatible to newer version of hdf5. Do you think is this directly related to the problem?