Open Ferruck opened 8 years ago
On my system libSplash can't even open the file, even though it works with ifstream
:
terminate called after throwing an instance of 'splash::DCException'
what(): Exception for [SDCHelper] Failed to open reference file ../examples/testData/imresh_0_0_0.h5
The error message isn't very informative either. The error message should be thrown if the file wasn't found, but I can open the file with ifstream, so I'm not sure about this.
Opening the file works like a charm for me.
The problem seems to be in libSplash/src/SDCHelper.cpp
// open the file to get reference data from
hid_t reference_file = H5Fopen(filename, H5F_ACC_RDONLY, H5P_FILE_ACCESS_DEFAULT);
if (reference_file < 0)
throw DCException(getExceptionString(std::string("Failed to open reference file ") +
std::string(filename)));
H5Fopen
seems to be a call to libhdf5 (although there is no direct include in that file only in the header). I get the feeling this could be related to #25 ...
I guess the issue is in the second call to
where the
void*
buffer is already initialized (afloat*
with the dimension's scalar size as the size in this case). The first call seems to work as the scalar size is 40000 (200 * 200) which is the correct size.