mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-19 16:50:46 +08:00
[svn-r23740] HDFFV-8447: subsetting broke data output file option.
Reviewed in H5T-59, tested local linux
This commit is contained in:
parent
a6d8395557
commit
f0a9b781f3
2
MANIFEST
2
MANIFEST
@ -1511,6 +1511,8 @@
|
||||
./tools/testfiles/topaque.h5
|
||||
./tools/testfiles/trawdatafile.ddl
|
||||
./tools/testfiles/trawdatafile.exp
|
||||
./tools/testfiles/trawssetfile.ddl
|
||||
./tools/testfiles/trawssetfile.exp
|
||||
./tools/testfiles/tsaf.ddl
|
||||
./tools/testfiles/tsaf.h5
|
||||
./tools/testfiles/tscalarattrintsize.ddl
|
||||
|
@ -148,6 +148,7 @@ IF (BUILD_TESTING)
|
||||
${HDF5_TOOLS_SRC_DIR}/testfiles/tno-subset.ddl
|
||||
${HDF5_TOOLS_SRC_DIR}/testfiles/tnullspace.ddl
|
||||
${HDF5_TOOLS_SRC_DIR}/testfiles/trawdatafile.ddl
|
||||
${HDF5_TOOLS_SRC_DIR}/testfiles/trawssetfile.ddl
|
||||
${HDF5_TOOLS_SRC_DIR}/testfiles/zerodim.ddl
|
||||
${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr1.ddl
|
||||
${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr2.ddl
|
||||
@ -199,6 +200,7 @@ IF (BUILD_TESTING)
|
||||
tall-6.exp
|
||||
tnoddlfile.exp
|
||||
trawdatafile.exp
|
||||
trawssetfile.exp
|
||||
tstr2bin2.exp
|
||||
tstr2bin6.exp
|
||||
twithddl.exp
|
||||
@ -1254,6 +1256,9 @@ IF (BUILD_TESTING)
|
||||
trawdatafile.out
|
||||
trawdatafile.out.err
|
||||
trawdatafile.txt
|
||||
trawssetfile.out
|
||||
trawssetfile.out.err
|
||||
trawssetfile.txt
|
||||
tno-subset.out
|
||||
tno-subset.out.err
|
||||
tnullspace.out
|
||||
@ -1369,7 +1374,8 @@ IF (BUILD_TESTING)
|
||||
ADD_H5_TEST (tnoattrdata 0 --enable-error-stack -A -o tattr.h5)
|
||||
ADD_H5_TEST_EXPORT (trawdatafile packedbits.h5 0 --enable-error-stack -y -o)
|
||||
ADD_H5_TEST_EXPORT (tnoddlfile packedbits.h5 0 --enable-error-stack -O -y -o)
|
||||
|
||||
ADD_H5_TEST_EXPORT (trawssetfile tdset.h5 0 --enable-error-stack -d "/dset1[1,1;;;]" -y -o)
|
||||
|
||||
ADD_H5_TEST_EXPORT_DDL (twithddlfile packedbits.h5 0 twithddl --enable-error-stack --ddl=twithddl.txt -y -o)
|
||||
|
||||
# test for maximum display datasets
|
||||
|
@ -276,6 +276,8 @@ $SRC_H5DUMP_TESTFILES/tno-subset.ddl
|
||||
$SRC_H5DUMP_TESTFILES/tnullspace.ddl
|
||||
$SRC_H5DUMP_TESTFILES/trawdatafile.ddl
|
||||
$SRC_H5DUMP_TESTFILES/trawdatafile.exp
|
||||
$SRC_H5DUMP_TESTFILES/trawssetfile.ddl
|
||||
$SRC_H5DUMP_TESTFILES/trawssetfile.exp
|
||||
$SRC_H5DUMP_TESTFILES/zerodim.ddl
|
||||
$SRC_H5DUMP_TESTFILES/tordergr1.ddl
|
||||
$SRC_H5DUMP_TESTFILES/tordergr2.ddl
|
||||
@ -875,6 +877,7 @@ TOOLTEST tnoattrdata.ddl --enable-error-stack -A -o tattr.h5
|
||||
TOOLTEST2 trawdatafile.exp --enable-error-stack -y -o trawdatafile.txt packedbits.h5
|
||||
TOOLTEST2 tnoddlfile.exp --enable-error-stack -O -y -o tnoddlfile.txt packedbits.h5
|
||||
TOOLTEST2A twithddlfile.exp twithddl.exp --enable-error-stack --ddl=twithddl.txt -y -o twithddlfile.txt packedbits.h5
|
||||
TOOLTEST2 trawssetfile.exp --enable-error-stack -d "/dset1[1,1;;;]" -y -o trawssetfile.txt tdset.h5
|
||||
|
||||
# test for maximum display datasets
|
||||
TOOLTEST twidedisplay.ddl --enable-error-stack -w0 packedbits.h5
|
||||
|
@ -314,13 +314,13 @@ h5tools_dump_simple_data(FILE *stream, const h5tool_format_t *info, hid_t contai
|
||||
if (region_space >= 0) {
|
||||
if (h5tools_is_zero(memref, H5Tget_size(type))) {
|
||||
ctx->need_prefix = TRUE;
|
||||
h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
|
||||
h5tools_simple_prefix(rawoutstream, info, ctx, curr_pos, 0);
|
||||
|
||||
/* Render the region element begin */
|
||||
h5tools_str_reset(&buffer);
|
||||
h5tools_str_append(&buffer, "NULL");
|
||||
|
||||
dimension_break = h5tools_render_element(stream, info,
|
||||
dimension_break = h5tools_render_element(rawoutstream, info,
|
||||
ctx, &buffer, &curr_pos, ncols, i, elmt_counter);
|
||||
}
|
||||
else {
|
||||
@ -328,25 +328,25 @@ h5tools_dump_simple_data(FILE *stream, const h5tool_format_t *info, hid_t contai
|
||||
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Rget_name failed");
|
||||
|
||||
ctx->need_prefix = TRUE;
|
||||
h5tools_simple_prefix(stream, info, ctx, curr_pos+i, 0);
|
||||
h5tools_simple_prefix(rawoutstream, info, ctx, curr_pos+i, 0);
|
||||
|
||||
/* Render the region element begin */
|
||||
h5tools_str_reset(&buffer);
|
||||
h5tools_str_append(&buffer, info->dset_format, ref_name);
|
||||
|
||||
dimension_break = h5tools_render_element(stream, info,
|
||||
dimension_break = h5tools_render_element(rawoutstream, info,
|
||||
ctx, &buffer, &curr_pos, ncols, i, elmt_counter);
|
||||
|
||||
region_type = H5Sget_select_type(region_space);
|
||||
if(region_type == H5S_SEL_POINTS)
|
||||
/* Print point information */
|
||||
dimension_break = h5tools_dump_region_data_points(
|
||||
region_space, region_id, stream, info, ctx,
|
||||
region_space, region_id, rawoutstream, info, ctx,
|
||||
&buffer, &curr_pos, ncols, i, elmt_counter);
|
||||
else if(region_type == H5S_SEL_HYPERSLABS)
|
||||
/* Print block information */
|
||||
dimension_break = h5tools_dump_region_data_blocks(
|
||||
region_space, region_id, stream, info, ctx,
|
||||
region_space, region_id, rawoutstream, info, ctx,
|
||||
&buffer, &curr_pos, ncols, i, elmt_counter);
|
||||
else
|
||||
HERROR(H5E_tools_g, H5E_tools_min_id_g, "invalid region type");
|
||||
@ -1790,7 +1790,7 @@ h5tools_dump_dset(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
|
||||
if(!sset)
|
||||
status = h5tools_dump_simple_dset(rawdatastream, info, ctx, dset, p_type);
|
||||
else
|
||||
status = h5tools_dump_simple_subset(stream, info, ctx, dset, p_type, sset);
|
||||
status = h5tools_dump_simple_subset(rawdatastream, info, ctx, dset, p_type, sset);
|
||||
}
|
||||
else
|
||||
/* space is H5S_NULL */
|
||||
|
14
tools/testfiles/trawssetfile.ddl
Normal file
14
tools/testfiles/trawssetfile.ddl
Normal file
@ -0,0 +1,14 @@
|
||||
HDF5 "tdset.h5" {
|
||||
DATASET "/dset1" {
|
||||
DATATYPE H5T_STD_I32BE
|
||||
DATASPACE SIMPLE { ( 10, 20 ) / ( 10, 20 ) }
|
||||
SUBSET {
|
||||
START ( 1, 1 );
|
||||
STRIDE ( 1, 1 );
|
||||
COUNT ( 1, 1 );
|
||||
BLOCK ( 1, 1 );
|
||||
DATA {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
2
tools/testfiles/trawssetfile.exp
Normal file
2
tools/testfiles/trawssetfile.exp
Normal file
@ -0,0 +1,2 @@
|
||||
|
||||
2
|
Loading…
x
Reference in New Issue
Block a user