43std::once_flag h5open_once_flag;
 
   54  std::call_once(h5open_once_flag, [](){ H5open(); });
 
   63#ifdef H5_HAVE_PARALLEL 
 
   76hid_t _H5Gopen(hid_t loc_id, 
const char *name)
 
   78  return H5Gopen2(loc_id,name,H5P_DEFAULT);
 
   81hid_t _H5Gcreate(hid_t loc_id, 
const char *name)
 
   83  return H5Gcreate2(loc_id, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
 
   90extern "C" ARCANE_HDF5_EXPORT herr_t
 
   91_ArcaneHdf5UtilsGroupIterateMe(hid_t g,
const char* mn,
void* ptr)
 
   95  return rw->iterateMe(mn);
 
  102splitString(
const String& str,Array<String>& str_array,
char c)
 
  104  const char* str_str = str.localstr();
 
  108    if (str_str[i]==c && i!=offset){
 
  109      str_array.add(std::string_view(str_str+offset,i-offset));
 
  114    str_array.add(std::string_view(str_str+offset,len-offset));
 
  121openTruncate(
const String& var)
 
  124  _setId(H5Fcreate(var.localstr(),H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT));
 
  126    ARCANE_THROW(ReaderWriterException,
"Can not open file '{0}'",var);
 
  130openAppend(
const String& var)
 
  133  _setId(H5Fopen(var.localstr(),H5F_ACC_RDWR,H5P_DEFAULT));
 
  135    ARCANE_THROW(ReaderWriterException,
"Can not open file '{0}'",var);
 
  139openRead(
const String& var)
 
  142  _setId(H5Fopen(var.localstr(),H5F_ACC_RDONLY,H5P_DEFAULT));
 
  144    ARCANE_THROW(ReaderWriterException,
"Can not open file '{0}'",var);
 
  148openTruncate(
const String& var,hid_t plist_id)
 
  151  _setId(H5Fcreate(var.localstr(),H5F_ACC_TRUNC,H5P_DEFAULT,plist_id));
 
  153    ARCANE_THROW(ReaderWriterException,
"Can not open file '{0}'",var);
 
  157openAppend(
const String& var,hid_t plist_id)
 
  160  _setId(H5Fopen(var.localstr(),H5F_ACC_RDWR,plist_id));
 
  162    ARCANE_THROW(ReaderWriterException,
"Can not open file '{0}'",var);
 
  166openRead(
const String& var,hid_t plist_id)
 
  169  _setId(H5Fopen(var.localstr(),H5F_ACC_RDONLY,plist_id));
 
  171    ARCANE_THROW(ReaderWriterException,
"Can not open file '{0}'",var);
 
  196    ARCANE_THROW(ReaderWriterException,
"Can not close file");
 
  203recursiveCreate(
const Hid& loc_id,
const String& var)
 
  205  UniqueArray<String> bufs;
 
  206  splitString(var,bufs,
'/');
 
  207  recursiveCreate(loc_id,bufs);
 
  211recursiveCreate(
const Hid& loc_id,
const Array<String>& bufs)
 
  214  hid_t last_hid = loc_id.id();
 
  215  Integer nb_create = bufs.size();
 
  216  UniqueArray<hid_t> ref_ids(nb_create);
 
  217  for( 
Integer i=0; i<nb_create; ++i ){
 
  218    last_hid = _checkOrCreate(last_hid,bufs[i]);
 
  219    ref_ids[i] = last_hid;
 
  222  for( 
Integer i=0; i<nb_create-1; ++i )
 
  223    H5Gclose(ref_ids[i]);
 
  231checkDelete(
const Hid& loc_id,
const String& var)
 
  233  UniqueArray<String> bufs;
 
  234  splitString(var,bufs,
'/');
 
  235  hid_t last_hid = loc_id.id();
 
  236  hid_t parent_hid = last_hid;
 
  239  for( ; i<size; ++i ){
 
  240    parent_hid = last_hid;
 
  241    last_hid = _checkExist(last_hid,bufs[i]);
 
  246  if (last_hid>0 && parent_hid>0 && i==size){
 
  248    H5Gunlink(parent_hid,bufs[size-1].localstr());
 
  256recursiveOpen(
const Hid& loc_id,
const String& var)
 
  259  UniqueArray<String> bufs;
 
  260  splitString(var,bufs,
'/');
 
  261  hid_t last_hid = loc_id.id();
 
  263  UniqueArray<hid_t> ref_ids(nb_open);
 
  264  for( 
Integer i=0; i<nb_open; ++i ){
 
  265    last_hid = _H5Gopen(last_hid,bufs[i].localstr());
 
  266    ref_ids[i] = last_hid;
 
  269  for( 
Integer i=0; i<nb_open-1; ++i )
 
  270    H5Gclose(ref_ids[i]);
 
  278openIfExists(
const Hid& loc_id,
const Array<String>& paths)
 
  281  hid_t last_hid = loc_id.id();
 
  282  bool is_valid = 
true;
 
  283  Integer nb_open = paths.size();
 
  284  UniqueArray<hid_t> ref_ids;
 
  285  ref_ids.reserve(nb_open);
 
  286  for( 
Integer i=0; i<nb_open; ++i ){
 
  287    if (HGroup::hasChildren(last_hid,paths[i].localstr())){
 
  288      last_hid = _H5Gopen(last_hid,paths[i].localstr());
 
  289      ref_ids.add(last_hid);
 
  299  for( 
Integer i=0; i<ref_ids.size(); ++i ){
 
  300    if (ref_ids[i]!=last_hid)
 
  301      H5Gclose(ref_ids[i]);
 
  309hasChildren(
const String& var)
 
  311  return hasChildren(
id(),var);
 
  318hasChildren(hid_t loc_id,
const String& var)
 
  320  HGroupSearch gs(var);
 
  321  herr_t v = H5Giterate(loc_id,
".",0,_ArcaneHdf5UtilsGroupIterateMe,&gs);
 
  322  bool has_children = v>0;
 
  331_checkOrCreate(hid_t loc_id,
const String& group_name)
 
  337  HGroupSearch gs(group_name);
 
  339  herr_t v = H5Giterate(loc_id,
".",0,_ArcaneHdf5UtilsGroupIterateMe,&gs);
 
  346    return _H5Gopen(loc_id,group_name.localstr());
 
  348  hid_t new_id = _H5Gcreate(loc_id,group_name.localstr());
 
  357create(
const Hid& loc_id, 
const String& group_name)
 
  359  _setId(H5Gcreate2(loc_id.id(), group_name.localstr(), H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT));
 
  366openOrCreate(
const Hid& loc_id, 
const String& group_name)
 
  368  hid_t 
id = _checkOrCreate(loc_id.id(),group_name);
 
  370    ARCANE_THROW(ReaderWriterException,
"Can not open or create group named '{0}'",group_name);
 
  378open(
const Hid& loc_id,
const String& var)
 
  380  hid_t 
id = _H5Gopen(loc_id.id(),var.localstr());
 
  382    ARCANE_THROW(ReaderWriterException,
"Can not find group named '{0}'",var);
 
  402_checkExist(hid_t loc_id,
const String& group_name)
 
  408  HGroupSearch gs(group_name);
 
  410  herr_t v = H5Giterate(loc_id,
".",0,_ArcaneHdf5UtilsGroupIterateMe,&gs);
 
  417    return _H5Gopen(loc_id,group_name.localstr());
 
  431createSimple(
int nb, hsize_t dims[])
 
  433  _setId(H5Screate_simple(nb, dims, 
nullptr));
 
  440createSimple(
int nb, hsize_t dims[], hsize_t max_dims[])
 
  442  _setId(H5Screate_simple(nb, dims, max_dims));
 
  451 return H5Sget_simple_extent_ndims(
id());
 
  458getDimensions(hsize_t dims[], hsize_t max_dims[])
 
  460  return H5Sget_simple_extent_dims(
id(), dims, max_dims);
 
  470create(
const Hid& loc_id,
const String& var,hid_t save_type,
 
  471       const HSpace& space_id,hid_t plist)
 
  473  hid_t hid = H5Dcreate2(loc_id.id(),var.localstr(),save_type,space_id.id(),
 
  474                        plist,H5P_DEFAULT,H5P_DEFAULT);
 
  483create(
const Hid& loc_id,
const String& var,hid_t save_type,
 
  487  hid_t hid = H5Dcreate2(loc_id.id(),var.localstr(),save_type,space_id.id(),
 
  488                         link_plist.id(),creation_plist.id(),access_plist.id());
 
  497write(hid_t native_type,
const void* array)
 
  500  return H5Dwrite(
id(),native_type,H5S_ALL,H5S_ALL,H5P_DEFAULT,array);
 
  507write(hid_t native_type,
const void* array,
const HSpace& memspace_id,
 
  508      const HSpace& filespace_id,hid_t plist)
 
  511  return H5Dwrite(
id(),native_type,memspace_id.id(),filespace_id.id(),plist,array);
 
  518write(hid_t native_type,
const void* array,
const HSpace& memspace_id,
 
  522  return H5Dwrite(
id(),native_type,memspace_id.id(),filespace_id.id(),plist.id(),array);
 
  529readWithException(hid_t native_type,
void* array)
 
  531  herr_t err = H5Dread(
id(),native_type,H5S_ALL,H5S_ALL,H5P_DEFAULT,array);
 
  542  return HSpace(H5Dget_space(
id()));
 
  549setExtent(
const hsize_t new_dims[])
 
  551  return H5Dset_extent(
id(),new_dims);
 
  558recursiveCreate(
const Hid& loc_id,
const String& var,hid_t save_type,
 
  559                const HSpace& space_id,hid_t plist)
 
  563  UniqueArray<String> paths;
 
  564  splitString(var,paths,
'/');
 
  565  Integer nb_path = paths.size();
 
  567    if (HGroup::hasChildren(loc_id.id(),var)){
 
  568      _remove(loc_id.id(),var);
 
  570    create(loc_id,var,save_type,space_id,plist);
 
  573  String last_name = paths[nb_path-1];
 
  574  paths.resize(nb_path-1);
 
  576  group.recursiveCreate(loc_id,paths);
 
  577  if (group.hasChildren(last_name)){
 
  578    _remove(group.id(),last_name);
 
  580  create(group.id(),last_name,save_type,space_id,plist);
 
  587_remove(hid_t hid,
const String& var)
 
  589  H5Gunlink(hid,var.localstr());
 
  596open(
const Hid& loc_id,
const String& var)
 
  598  _setId(H5Dopen2(loc_id.id(),var.localstr(),H5P_DEFAULT));
 
  600    ARCANE_THROW(IOException,
"Can not open dataset '{0}'",var);
 
  607openIfExists(
const Hid& loc_id,
const String& var)
 
  609  UniqueArray<String> paths;
 
  610  splitString(var,paths,
'/');
 
  611  Integer nb_path = paths.size();
 
  613  String last_name = var;
 
  615    last_name = paths[nb_path-1];
 
  616    paths.resize(nb_path-1);
 
  617    parent_group.openIfExists(loc_id,paths);
 
  620    parent_group.open(loc_id,
".");
 
  622  if (parent_group.isBad())
 
  624  if (parent_group.hasChildren(last_name))
 
  625    open(loc_id.id(),var.localstr());
 
  638  _setId(H5Pcreate(cls_id));
 
  647#ifdef H5_HAVE_PARALLEL 
  651  MPI_Comm mpi_comm = *((MPI_Comm*)arcane_comm);
 
  652  MPI_Info mpi_info = MPI_INFO_NULL;
 
  654  create(H5P_FILE_ACCESS);
 
  655  H5Pset_fapl_mpio(
id(), mpi_comm, mpi_info);
 
 
  668#ifdef H5_HAVE_PARALLEL 
  669  create(H5P_DATASET_XFER);
 
  670  H5Pset_dxpl_mpio(
id(), H5FD_MPIO_COLLECTIVE);
 
 
  705    hid_t type_id = H5Tcopy(H5T_NATIVE_CHAR);
 
  709    hid_t type_id = H5Tcopy(H5T_NATIVE_UCHAR);
 
  713    hid_t type_id = H5Tcopy(H5T_NATIVE_SCHAR);
 
  717    hid_t type_id = H5Tcopy(H5T_NATIVE_SHORT);
 
  718    H5Tset_precision(type_id,8*
sizeof(
short));
 
  719    H5Tset_order(type_id,H5T_ORDER_LE);
 
  723    hid_t type_id = H5Tcopy(H5T_NATIVE_INT);
 
  724    H5Tset_precision(type_id,8*
sizeof(
int));
 
  725    H5Tset_order(type_id,H5T_ORDER_LE);
 
  729    hid_t type_id = H5Tcopy(H5T_NATIVE_LONG);
 
  730    H5Tset_precision(type_id,8*
sizeof(
long));
 
  731    H5Tset_order(type_id,H5T_ORDER_LE);
 
  735    hid_t type_id = H5Tcopy(H5T_NATIVE_USHORT);
 
  736    H5Tset_precision(type_id,8*
sizeof(
unsigned short));
 
  737    H5Tset_order(type_id,H5T_ORDER_LE);
 
  741    hid_t type_id = H5Tcopy(H5T_NATIVE_UINT);
 
  742    H5Tset_precision(type_id,8*
sizeof(
unsigned int));
 
  743    H5Tset_order(type_id,H5T_ORDER_LE);
 
  747    hid_t type_id = H5Tcopy(H5T_NATIVE_ULONG);
 
  748    H5Tset_precision(type_id,8*
sizeof(
unsigned long));
 
  749    H5Tset_order(type_id,H5T_ORDER_LE);
 
  753    hid_t type_id = H5Tcopy(H5T_NATIVE_FLOAT);
 
  754    H5Tset_precision(type_id,8*
sizeof(
float));
 
  755    H5Tset_order(type_id,H5T_ORDER_LE);
 
  759    hid_t type_id = H5Tcopy(H5T_NATIVE_DOUBLE);
 
  760    H5Tset_precision(type_id,8*
sizeof(
double));
 
  761    H5Tset_order(type_id,H5T_ORDER_LE);
 
  765    hid_t type_id = H5Tcreate(H5T_COMPOUND,
sizeof(
Real2POD));
 
  766    _H5Tinsert(type_id,
"X",HOFFSET(
Real2POD,x),H5T_NATIVE_DOUBLE);
 
  767    _H5Tinsert(type_id,
"Y",HOFFSET(
Real2POD,y),H5T_NATIVE_DOUBLE);
 
  771    hid_t type_id = H5Tcreate(H5T_COMPOUND,
sizeof(
Real3POD));
 
  772    _H5Tinsert(type_id,
"X",HOFFSET(
Real3POD,x),H5T_NATIVE_DOUBLE);
 
  773    _H5Tinsert(type_id,
"Y",HOFFSET(
Real3POD,y),H5T_NATIVE_DOUBLE);
 
  774    _H5Tinsert(type_id,
"Z",HOFFSET(
Real3POD,z),H5T_NATIVE_DOUBLE);
 
  778    hid_t type_id = H5Tcreate(H5T_COMPOUND,
sizeof(
Real2x2POD));
 
  779    _H5Tinsert(type_id,
"XX",HOFFSET(
Real2x2POD,x.x),H5T_NATIVE_DOUBLE);
 
  780    _H5Tinsert(type_id,
"XY",HOFFSET(
Real2x2POD,x.y),H5T_NATIVE_DOUBLE);
 
  781    _H5Tinsert(type_id,
"YX",HOFFSET(
Real2x2POD,y.x),H5T_NATIVE_DOUBLE);
 
  782    _H5Tinsert(type_id,
"YY",HOFFSET(
Real2x2POD,y.y),H5T_NATIVE_DOUBLE);
 
  786    hid_t type_id = H5Tcreate(H5T_COMPOUND,
sizeof(
Real3x3POD));
 
  787    _H5Tinsert(type_id,
"XX",HOFFSET(
Real3x3POD,x.x),H5T_NATIVE_DOUBLE);
 
  788    _H5Tinsert(type_id,
"XY",HOFFSET(
Real3x3POD,x.y),H5T_NATIVE_DOUBLE);
 
  789    _H5Tinsert(type_id,
"XZ",HOFFSET(
Real3x3POD,x.z),H5T_NATIVE_DOUBLE);
 
  790    _H5Tinsert(type_id,
"YX",HOFFSET(
Real3x3POD,y.x),H5T_NATIVE_DOUBLE);
 
  791    _H5Tinsert(type_id,
"YY",HOFFSET(
Real3x3POD,y.y),H5T_NATIVE_DOUBLE);
 
  792    _H5Tinsert(type_id,
"YZ",HOFFSET(
Real3x3POD,y.z),H5T_NATIVE_DOUBLE);
 
  793    _H5Tinsert(type_id,
"ZX",HOFFSET(
Real3x3POD,z.x),H5T_NATIVE_DOUBLE);
 
  794    _H5Tinsert(type_id,
"ZY",HOFFSET(
Real3x3POD,z.y),H5T_NATIVE_DOUBLE);
 
  795    _H5Tinsert(type_id,
"ZZ",HOFFSET(
Real3x3POD,z.z),H5T_NATIVE_DOUBLE);
 
  805    hid_t type_id = H5Tcopy(H5T_NATIVE_B16);
 
  810    hid_t type_id = H5Tcopy(H5T_NATIVE_B16);
 
 
  829_H5Tinsert(hid_t type,
const char* name,
Integer offset,hid_t field_id)
 
  831  herr_t herr = H5Tinsert(type,name,offset,field_id);
 
  840#ifdef ARCANE_REAL_NOT_BUILTIN 
  842nativeType(
Real)
 const 
  854  case DT_Real2: 
return saveType(Real2());
 
  856  case DT_Real3: 
return saveType(Real3());
 
  866    throw ArgumentException(String::format(
"Bad type '{0}'",sd));
 
  879  case DT_Real2: 
return nativeType(Real2());
 
  880  case DT_Real2x2: 
return nativeType(Real2x2());
 
  881  case DT_Real3: 
return nativeType(Real3());
 
  882  case DT_Real3x3: 
return nativeType(Real3x3());
 
  891    throw ArgumentException(String::format(
"Bad type '{0}'",sd));
 
  902StandardArray(hid_t hfile,
const String& hpath)
 
  905, m_ids_hpath(hpath + 
"_Ids")
 
  919  m_hdataset.open(m_hfile,m_hpath);
 
  920  HSpace hspace(m_hdataset.getSpace());
 
  922    const int max_dim = 256; 
 
  923    hsize_t hdf_dims[max_dim];
 
  924    hsize_t max_dims[max_dim];
 
  925    int nb_dim = H5Sget_simple_extent_ndims(hspace.id());
 
  926    H5Sget_simple_extent_dims(hspace.id(),hdf_dims,max_dims);
 
  927    for( 
Integer i=0; i<nb_dim; ++i ){
 
  930      m_dimensions.add((
Int64)hdf_dims[i]);
 
  935  m_ids_dataset.openIfExists(m_hfile,m_ids_hpath);
 
  945  m_ids_hpath = ids_path;
 
 
  952_write(
const void* buffer,
Integer nb_element,hid_t save_type,hid_t native_type)
 
  956    dims[0] = nb_element;
 
  959    hspace.createSimple(1,dims);
 
  963    m_dimensions.
clear();
 
  964    m_dimensions.
add(nb_element);
 
  966    m_hdataset.recursiveCreate(m_hfile,m_hpath,save_type,hspace,H5P_DEFAULT);
 
  967    if (m_hdataset.isBad())
 
  973  m_hdataset.write(native_type,buffer);
 
  983  dataset.openIfExists(m_hfile,m_hpath);
 
  984  return dataset.id()>0;
 
 1002  m_hdataset.readWithException(st.nativeType(DataType()),buffer.
data());
 
 
 1012  buffer.
resize(m_dimensions[0]);
 
 
 1024  bool has_ids = 
false;
 
 1028    if (m_ids_dataset.id()>0){
 
 1030      m_ids_dataset.read(st.nativeType(
Int64()),unique_ids.
data());
 
 1033    infos[0] = buf_size;
 
 1034    infos[1] = has_ids ? 1 : 0;
 
 1036    pm->broadcast(iav,master_rank);
 
 1037    pm->broadcast(buffer,master_rank);
 
 1038    pm->broadcast(unique_ids,master_rank);
 
 1043    pm->broadcast(iav,master_rank);
 
 1045    has_ids = infos[1]!=0;
 
 1047    unique_ids.
resize(buf_size);
 
 1048    pm->broadcast(buffer,master_rank);
 
 1049    pm->broadcast(unique_ids,master_rank);
 
 1052    for( 
Integer i=0, is=unique_ids.
size(); i<is; ++i )
 
 1063  Integer nb_element = buffer.size();
 
 1064  _write(buffer.data(),nb_element,st.saveType(DataType()),st.nativeType(DataType()));
 
 1072                   ConstArrayView<DataType> buffer,
 
 1077  Integer total_size = buffer.size();
 
 1078  Integer nb_element = unique_ids.size();
 
 1080  if (nb_element != total_size){
 
 1081    if (nb_element == 0)
 
 1082      ARCANE_THROW(ArgumentException,
"unique_ids size is zero but not buffer size ({0})",
 
 1084    dim2_size = total_size / nb_element;
 
 1085    if (dim2_size*nb_element != total_size)
 
 1086      ARCANE_THROW(ArgumentException,
"buffer size ({0}) is not a multiple of unique_ids size ({1})",
 
 1087                   total_size,nb_element);
 
 1090  UniqueArray<ValueWithUid> values_to_sort(nb_element);
 
 1091  UniqueArray<DataType> out_buffer(total_size);
 
 1094  for( 
Integer i=0; i<nb_element; ++i ){
 
 1095    values_to_sort[i].m_uid = unique_ids[i];
 
 1096    values_to_sort[i].m_index = i;
 
 1100  std::sort(std::begin(values_to_sort),std::end(values_to_sort));
 
 1101  for( 
Integer i=0; i<nb_element; ++i ){
 
 1102    Integer old_index = values_to_sort[i].m_index;
 
 1103    for( 
Integer j=0; j<dim2_size; ++j ){
 
 1104      Integer pos = (i*dim2_size)+j;
 
 1105      out_buffer[pos] = buffer[(old_index*dim2_size)+j];
 
 1111  write(st,out_buffer);
 
 1130  bool is_parallel = pm->isParallel();
 
 1131  ITraceMng* tm = pm->traceMng();
 
 1134    _writeSortedValues(tm,st,buffer,unique_ids);
 
 1138  bool is_master = pm->isMasterIO();
 
 1139  Integer master_rank = pm->masterIORank();
 
 1140  Integer nb_rank = pm->commSize();
 
 1141  Integer buf_size = buffer.size();
 
 1142  Integer unique_id_size = unique_ids.size();
 
 1150    buf[1] = unique_id_size;
 
 1152    pm->allGather(iav,rank_sizes);
 
 1154    Integer buffer_total_size = 0;
 
 1155    Integer unique_id_total_size = 0;
 
 1159    for( 
Integer i=0; i<nb_rank; ++i ){
 
 1160      buffer_rank_index[i] = buffer_total_size;
 
 1161      buffer_total_size += rank_sizes[(i*2)];
 
 1162      unique_id_rank_index[i] = unique_id_total_size;
 
 1163      unique_id_total_size += rank_sizes[(i*2)+1];
 
 1166    UniqueArray<DataType> full_buffer(buffer_total_size);
 
 1169    for( 
Integer i=0; i<nb_rank; ++i ){
 
 1171      if (rank_sizes[(i*2)]==0)
 
 1173      ArrayView<DataType> local_buf(rank_sizes[(i*2)],&full_buffer[ buffer_rank_index[i] ]);
 
 1174      Int64ArrayView local_unique_ids(rank_sizes[(i*2)+1],&full_unique_ids[ unique_id_rank_index[i] ]);
 
 1175      if (i==master_rank){
 
 1176        local_buf.copy(buffer);
 
 1177        local_unique_ids.copy(unique_ids);
 
 1180        pm->recv(local_buf,i);
 
 1181        pm->recv(local_unique_ids,i);
 
 1184    tm->info(5) << 
"PARALLEL WRITE path=" << m_hpath << 
" total_size=" << full_buffer.size();
 
 1185    _writeSortedValues(tm,st,full_buffer,full_unique_ids);
 
 1190    buf[1] = unique_id_size;
 
 1192    pm->allGather(iav,rank_sizes);
 
 1194    if (buffer.size()>0){
 
 1195      pm->send(buffer,master_rank);
 
 1196      pm->send(unique_ids,master_rank);
 
 1224template<
typename DataType> DataType
 
 1229  m_hdataset.open(m_hfile,m_hpath);
 
 1232    const int max_dim = 256; 
 
 1233    hsize_t hdf_dims[max_dim];
 
 1234    hsize_t max_dims[max_dim];
 
 1235    int nb_dim = H5Sget_simple_extent_ndims(hspace.id());
 
 1236    H5Sget_simple_extent_dims(hspace.id(),hdf_dims,max_dims);
 
 1238    if (nb_dim!=1 || hdf_dims[0]!=1)
 
 1243  m_hdataset.read(st.nativeType(DataType()),&dummy);
 
 
 1257  m_hdataset.open(m_hfile,m_hpath);
 
 1260    const int max_dim = 256; 
 
 1261    hsize_t hdf_dims[max_dim];
 
 1262    hsize_t max_dims[max_dim];
 
 1263    int nb_dim = H5Sget_simple_extent_ndims(hspace.id());
 
 1264    H5Sget_simple_extent_dims(hspace.id(),hdf_dims,max_dims);
 
 1268    utf8_bytes.
resize(hdf_dims[0]);
 
 1271  m_hdataset.read(st.nativeType(
Byte()),utf8_bytes.
data());
 
 1272  return String(utf8_bytes);
 
 1277template<
typename DataType> 
void 
 1281  hsize_t dims[1] = { 1 };
 
 1283  hspace.createSimple(1,dims);
 
 1288  m_hdataset.recursiveCreate(m_hfile,m_hpath,st.saveType(DataType()),hspace,H5P_DEFAULT);
 
 1289  if (m_hdataset.isBad())
 
 1292  herr_t herr = m_hdataset.write(st.nativeType(DataType()),&t);
 
 
 1306  dims[0] = utf8_bytes.
size() + 1;
 
 1309  hspace.createSimple(1,dims);
 
 1314  m_hdataset.recursiveCreate(m_hfile,m_hpath,st.saveType(
Byte()),hspace,H5P_DEFAULT);
 
 1315  if (m_hdataset.isBad())
 
 1318  herr_t herr = m_hdataset.write(st.nativeType(
Byte()),utf8_bytes.
data());