I have tried this with downloading the executables provided and by compiling from source but it seems like when using the C++ and GPU binaries there is an issue in reading the h5 files.
Here is the error I get
./kspaceFirstOrder-CUDA -i /tmp/example_input.h5 -o /tmp/example_output.h5 --p_final --p_max --verbose 2
┌───────────────────────────────────────────────────────────────┐
│ kspaceFirstOrder-CUDA v1.3 │
├───────────────────────────────────────────────────────────────┤
│ Git hash: 468dc31c2842a7df5f2a07c3a13c16c9b0b2b770 │
├───────────────────────────────────────────────────────────────┤
│ Reading simulation configuration: Failed │
└───────────────────────────────────────────────────────────────┘
┌───────────────────────────────────────────────────────────────┐
│ !!! K-Wave experienced a fatal error !!! │
├───────────────────────────────────────────────────────────────┤
│ Error: Invalid format of the input file: iostream error │
├───────────────────────────────────────────────────────────────┤
│ Execution terminated │
└───────────────────────────────────────────────────────────────┘
My findings and process:
I am comiling from source using hdf5 v1.8.12 ( this seems to be the same version used by Matlab R2020a to write the file)
>> a = hdf5info('/tmp/example_input.h5')
a =
struct with fields:
Filename: 'example_input.h5'
LibVersion: '1.8.12'
Offset: 0
FileSize: 42880070
GroupHierarchy: [1×1 struct]
On digging deeper into and doing console logs in the Hdf5/Hdf5File.cpp library to see the values of attributes fetched, it looks like there is an issue when attempting to read it.
string Hdf5File::readStringAttribute
Added : std::cout << " ****** readStringAttr ******* " << attributeName.c_str() << " ::: " << string(value) << "\n";
Output : ****** readStringAttr ******* file_type ::: ��
Please let me know how to resolve this error and I can use the CUDA library for optimizing the simulations