As a follow up, I tried manually iterating through the dataset:

--- hdf5_iterate.c ---
#include "hdf5.h"

herr_t file_info(hid_t loc_id, const char *name, void *opdata);

int
main(void)
{
  hid_t file;
  hid_t dataset;
  hid_t group;

  file = H5Fopen("hdf5_stress_test.h5", H5F_ACC_RDONLY, H5P_DEFAULT);

  H5Giterate(file, "/", NULL, file_info, NULL);

  H5Fclose(file);

  return 0;
}

herr_t file_info(hid_t loc_id, const char *name, void *opdata)
{
    H5G_stat_t statbuf;

    /*
     * Get type of the object and display its name and type.
     * The name of the object is passed to this function by
     * the Library. Some magic :-)
     */
    H5Gget_objinfo(loc_id, name, 0, &statbuf);
    switch (statbuf.type) {
    case H5G_GROUP:
         printf(" Object with name %s is a group \n", name);
         break;
    case H5G_DATASET:
         printf(" Object with name %s is a dataset \n", name);
         break;
    case H5G_TYPE:
         printf(" Object with name %s is a named datatype \n", name);
         break;
    default:
         printf(" Unable to identify an object ");
    }
    return 0;
 }
--- ---

This runs very slowly, taking ~1sec for each iteration (11 days to
iterate over the whole file!!!). I guess this isn't really a pytables
problem - which hdf5 mailing list would be appropriate?

James

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Pytables-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pytables-users

Reply via email to