title: Read from dataset in HDF5 file with datatype detection
body: <p>I currently try to read some data from a hdf5 dataset in C which looks like this.</p>
  
  <pre><code>dataset = H5Dopen(ic_group, 'vx', H5P_DEFAULT);
  status = H5Dread(dataset, H5T_NATIVE_FLOAT, memspace,H5S_ALL,
                            H5P_DEFAULT, vx_ptr);
  
  status = H5Dclose(dataset);
  </code></pre>
  
  <p>Here <code>ic_group</code> is a group containing the dataset <code>vx</code>, memspace is a hyperslab in memory and vx_ptr the data in memory. This approach works good, however since I want to work with different datatypes later, I want to read the type directly from the dataset:</p>
  
  <pre><code>hid_t datatype;
  datatype = H5Dget_type(dataset);
  status = H5Dread(dataset, datatype, memspace,H5S_ALL,
                            H5P_DEFAULT, vx_ptr);
  </code></pre>
  
  <p>Unfortunately this approach leads to a segfault in the function <code>H5Dread</code> .
  Maybe I am missing something? Thank you for any suggestions. </p>
  
  <p>EDIT: I don't know if this is usefull but the backtrace of gdb goes down to
  <code>0x00007ffff5adbd1e in __memcpy_ssse3_back () from /lib64/libc.so.6</code> . </p>