Commit 2ae76250 authored by gsell's avatar gsell

src/h5core/h5u_model.c: bug fixed in h5_set_view()

In h5_set_view() u->shape was created two times.
parent f1cb1c98
......@@ -286,6 +286,8 @@ h5u_set_view (
if (f->u->shape > 0) {
TRY (total = hdf5_get_npoints_of_dataspace (f->u->shape) );
} else {
// if iteration does not contain a dataset, next function
// returns -1
TRY (total = h5u_get_totalnum_particles_by_idx (fh, 0));
}
h5_debug ("Total = %lld", (long long) total);
......@@ -293,11 +295,8 @@ h5u_set_view (
/*
iteration does not contain a dataset yet!
*/
TRY (hdf5_close_dataspace (u->shape));
TRY (u->shape = hdf5_create_dataspace(1, &total, NULL) );
/*
:FIXME: Should 'total == 0' be considered valid or not?
:FIXME: why not gather total size?
*/
#if H5_HAVE_PARALLEL
TRY (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment