summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/h5repack.c
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2004-08-17 19:54:42 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2004-08-17 19:54:42 (GMT)
commit8c0f8b1a959993a1f4b87e61c4b4e57b8f2b11e7 (patch)
treeb5e9b4fecec9b22663c8521103b2f827912038ec /tools/h5repack/h5repack.c
parentad655bf083814ff768849a994c834b2010d67bda (diff)
downloadhdf5-8c0f8b1a959993a1f4b87e61c4b4e57b8f2b11e7.zip
hdf5-8c0f8b1a959993a1f4b87e61c4b4e57b8f2b11e7.tar.gz
hdf5-8c0f8b1a959993a1f4b87e61c4b4e57b8f2b11e7.tar.bz2
[svn-r9106] Purpose:
bug fix Description: the option CHUNK:NONE (remove chunking ) was not setting the layout to contiguous Solution: Platforms tested: linux solaris AIX Misc. update:
Diffstat (limited to 'tools/h5repack/h5repack.c')
-rw-r--r--tools/h5repack/h5repack.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/tools/h5repack/h5repack.c b/tools/h5repack/h5repack.c
index f9cb295..c0cc918 100644
--- a/tools/h5repack/h5repack.c
+++ b/tools/h5repack/h5repack.c
@@ -198,11 +198,21 @@ int h5repack_addlayout(const char* str,
if (options->all_layout==1 )
{
options->layout_g=pack.layout;
- if (pack.layout==H5D_CHUNKED) {
- /* if we are chunking all set the global chunking type */
- options->chunk_g.rank=pack.chunk.rank;
- for (j = 0; j < pack.chunk.rank; j++)
- options->chunk_g.chunk_lengths[j] = pack.chunk.chunk_lengths[j];
+ if (pack.layout==H5D_CHUNKED)
+ {
+ /* -2 means the NONE option, remove chunking
+ and set the global layout to contiguous */
+ if (pack.chunk.rank==-2)
+ {
+ options->layout_g = H5D_CONTIGUOUS;
+ }
+ /* otherwise set the global chunking type */
+ else
+ {
+ options->chunk_g.rank=pack.chunk.rank;
+ for (j = 0; j < pack.chunk.rank; j++)
+ options->chunk_g.chunk_lengths[j] = pack.chunk.chunk_lengths[j];
+ }
}
}
@@ -269,7 +279,7 @@ static int check_options(pack_opt_t *options)
else if (options->op_tbl->objs[i].chunk.rank==-2)
{
if (options->verbose)
- printf(" <%s> %s\n",name,"NONE");
+ printf(" <%s> %s\n",name,"NONE (contigous)");
has_ck=1;
}
}