[petsc-users] Question about HDF5 viewer groups
Ellen M. Price
ellen.price at cfa.harvard.edu
Wed Sep 12 20:55:49 CDT 2018
Hi there,
I'm running a complex PETSc program that outputs a LOT of data to an
HDF5 file. As such, I'd like to separate my output into groups to make
it easier to traverse in the analysis phase.
I'm either confused about the nomenclature or the usage of
PetscViewerHDF5PushGroup/PetscViewerHDF5PopGroup. From a quick skim of
the source, it looks like the PushGroup function builds up a linked list
of group names? Also, just the name suggests that there should be a
"stack" of group names stored somewhere.
So I would expect, after calling PetscViewerHDF5PushGroup twice, say,
PetscViewerHDF5PushGroup(h5viewer, "group1");
PetscViewerHDF5PushGroup(h5viewer, "group2");
VecView(x, h5viewer);
that I would get my vector output in /group1/group2/x. This is obviously
not what's actually happening. If I run
http://www.mcs.anl.gov/petsc/petsc-current/src/vec/vec/examples/tutorials/ex19.c,
for example, I get, from h5dump:
HDF5 "ex19.h5" {
FILE_CONTENTS {
group /
dataset /TestVec
group /testBlockSize
dataset /testBlockSize/TestVec2
group /testTimestep
dataset /testTimestep/TestVec2
}
}
even though multiple groups are "pushed" in sequence.
My question is, have I misunderstood the connotation of pushing/popping
groups? How can I properly create a group and then a subgroup? Every
attempt at doing this:
PetscViewerHDF5PushGroup(h5viewer, "/group1");
PetscViewerHDF5PushGroup(h5viewer, "/group1/group2");
VecView(x, h5viewer);
leads to a long string of HDF5 library errors, like:
HDF5-DIAG: Error detected in HDF5 (1.8.16) MPI-process 0:
#000: ../../../src/H5L.c line 824 in H5Lexists(): unable to get link info
major: Symbol table
minor: Object not found
#001: ../../../src/H5L.c line 2765 in H5L_exists(): path doesn't exist
major: Symbol table
minor: Object already exists
#002: ../../../src/H5Gtraverse.c line 861 in H5G_traverse(): internal
path traversal failed
major: Symbol table
minor: Object not found
#003: ../../../src/H5Gtraverse.c line 755 in H5G_traverse_real():
component not found
major: Symbol table
minor: Object not found
HDF5-DIAG: Error detected in HDF5 (1.8.16) MPI-process 0:
#000: ../../../src/H5G.c line 314 in H5Gcreate2(): unable to create group
major: Symbol table
minor: Unable to initialize object
#001: ../../../src/H5Gint.c line 194 in H5G__create_named(): unable to
create and link to group
major: Symbol table
minor: Unable to initialize object
#002: ../../../src/H5L.c line 1638 in H5L_link_object(): unable to
create new link to object
major: Links
minor: Unable to initialize object
#003: ../../../src/H5L.c line 1882 in H5L_create_real(): can't insert link
major: Symbol table
minor: Unable to insert object
#004: ../../../src/H5Gtraverse.c line 861 in H5G_traverse(): internal
path traversal failed
major: Symbol table
minor: Object not found
#005: ../../../src/H5Gtraverse.c line 755 in H5G_traverse_real():
component not found
major: Symbol table
minor: Object not found
Thanks in advance,
Ellen Price
More information about the petsc-users
mailing list