On 01/21/2014 02:37 AM, Matthieu Dorier wrote:
Indeed that was the problem, one of the groups was not closed.

Sometimes it can be hard to figure out which HDF doodad is still open. I use this (c code) snippet to point to the culprit:


  norphans = H5Fget_obj_count(file->file_id, H5F_OBJ_ALL);
  if (norphans > 1) { /* expect 1 for the file we have not closed */
      int i;
      H5O_info_t info;
      char name[64];
      hid_t * objects = calloc(norphans, sizeof(hid_t));
      H5Fget_obj_ids(file->file_id, H5F_OBJ_ALL, -1, objects);
      for (i=0; i<norphans; i++) {
          H5Oget_info(objects[i], &info);
          H5Iget_name(objects[i], name, 64);
printf("%d of %zd things still open: %d with name %s of type %d", i, norphans, objects[i], name, info.type);
      }
  }

==rob

--
Rob Latham
Mathematics and Computer Science Division
Argonne National Lab, IL USA

_______________________________________________
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