I have a problem when I tried to use the function H5.H5Dread() in the Java API to read a compound data set to a 2D array in memory. The input compound data set is a P x N matrix with each data cell containing two components “r” and “I”,
representing the real and imaginary parts of a complex number.
Right now I can successfully read each component (“r” or “I”) into a 2D array of P x N and then combine them together by putting “i” matrix to the right of “r” matrix, i.e. to form a final matrix of P x 2N. Here is an illustration:
I can verify each H5.H5Dread() call read the component correctly. However, when it tries to write the component into the memory area, the second H5.H5Dread() on “I” component will wipe out the result (i.e. “r” component) written by the
first H5.H5Dread() call. Here is an illustration: