Hi
I am reading string data from my h5 file sequentially. But some how it fails on 
the second reading.Error message is:

HDF5-DIAG: Error detected in HDF5 (1.8.5-patch1) thread 0:
  #000: ../../src/H5Dio.c line 174 in H5Dread(): can't read data
    major: Dataset
    minor: Read failed
  #001: ../../src/H5Dio.c line 324 in H5D_read(): unable to set up type info
    major: Dataset
    minor: Unable to initialize object
  #002: ../../src/H5Dio.c line 738 in H5D_typeinfo_init(): unable to convert 
between src and dest datatype
    major: Dataset
    minor: Feature is unsupported
  #003: ../../src/H5T.c line 4449 in H5T_path_find(): no appropriate function 
for conversion path
    major: Datatype
    minor: Unable to initialize object

I can read the string , which failed, individually. But when I try read them 
sequentially from same object I got the error when I read the second string.
Thank you. 


Reader::Reader( std::string lib_name )
{
 _hdf5_strtype = H5Tcopy( H5T_C_S1 );
 
 _hdf5_status = H5Tset_size( _hdf5_strtype, 1300 );
 
 _hdf5_file_id = H5Fopen( lib_name.c_str(), H5F_ACC_RDWR, H5P_DEFAULT );
 
 if ( _hdf5_file_id < 0 )
 {
  cout << "Cannot open template library HDF5 file" << endl;
  exit(EXIT_FAILURE);
 }
}

int Reader::SetFasta( std::string tpl_name )
{
 char dset[1300] = "";
  
 if ( H5Lexists( _hdf5_file_id, tpl_name.c_str(), H5P_DEFAULT ) )
 {
  _hdf5_group_id = H5Gopen2( _hdf5_file_id, tpl_name.c_str(), H5P_DEFAULT );
  
  _hdf5_dataset_id = H5Dopen2( _hdf5_group_id,"Fasta_seq", H5P_DEFAULT );

    
  _hdf5_status = H5Dread( _hdf5_dataset_id, _hdf5_strtype, H5S_ALL, H5S_ALL, 
H5P_DEFAULT, dset );
  
  _hdf5_fasta = dset;  
   
  return _hdf5_group_id; 
}
_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org

Reply via email to