mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-07 16:37:56 +08:00
Merge pull request #289 in HDFFV/hdf5 from merge_page_buffering_01 to develop
* commit 'a28b65bb9e9c654840e7e73b460921dc6d1a5a47': Clean up whitespace
This commit is contained in:
commit
1c95d1cac5
@ -102,7 +102,7 @@ $Source = "";
|
||||
"H5A_operator2_t" => "x",
|
||||
"H5A_info_t" => "x",
|
||||
"H5AC_cache_config_t" => "x",
|
||||
"H5AC_cache_image_config_t" => "x",
|
||||
"H5AC_cache_image_config_t" => "x",
|
||||
"H5D_append_cb_t" => "x",
|
||||
"H5D_gather_func_t" => "x",
|
||||
"H5D_operator_t" => "x",
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -353,7 +353,7 @@ Java_hdf_hdf5lib_H5_H5Diterate
|
||||
* Method: H5Dflush
|
||||
* Signature: (J)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
JNIEXPORT void JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Dflush
|
||||
(JNIEnv*, jclass, jlong);
|
||||
|
||||
@ -362,7 +362,7 @@ Java_hdf_hdf5lib_H5_H5Dflush
|
||||
* Method: H5Drefresh
|
||||
* Signature: (J)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
JNIEXPORT void JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Drefresh
|
||||
(JNIEnv*, jclass, jlong);
|
||||
|
||||
|
@ -217,7 +217,7 @@ Java_hdf_hdf5lib_H5_H5Fclear_1elink_1file_1cache
|
||||
* Method: H5Fstart_swmr_write
|
||||
* Signature: (J)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
JNIEXPORT void JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Fstart_1swmr_1write
|
||||
(JNIEnv *, jclass, jlong);
|
||||
|
||||
@ -226,7 +226,7 @@ Java_hdf_hdf5lib_H5_H5Fstart_1swmr_1write
|
||||
* Method: H5Fstart_mdc_logging
|
||||
* Signature: (J)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
JNIEXPORT void JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Fstart_1mdc_1logging
|
||||
(JNIEnv *, jclass, jlong);
|
||||
|
||||
@ -235,7 +235,7 @@ Java_hdf_hdf5lib_H5_H5Fstart_1mdc_1logging
|
||||
* Method: H5Fstop_mdc_logging
|
||||
* Signature: (J)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
JNIEXPORT void JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Fstop_1mdc_1logging
|
||||
(JNIEnv *, jclass, jlong);
|
||||
|
||||
@ -244,7 +244,7 @@ Java_hdf_hdf5lib_H5_H5Fstop_1mdc_1logging
|
||||
* Method: H5Fget_mdc_logging_status
|
||||
* Signature: (J[Z)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
JNIEXPORT void JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Fget_1mdc_1logging_1status
|
||||
(JNIEnv *, jclass, jlong, jbooleanArray);
|
||||
|
||||
|
@ -102,7 +102,7 @@ Java_hdf_hdf5lib_H5_H5Gget_1info_1by_1idx
|
||||
* Method: H5Gflush
|
||||
* Signature: (J)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
JNIEXPORT void JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Gflush
|
||||
(JNIEnv*, jclass, jlong);
|
||||
|
||||
@ -111,7 +111,7 @@ Java_hdf_hdf5lib_H5_H5Gflush
|
||||
* Method: H5Grefresh
|
||||
* Signature: (J)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
JNIEXPORT void JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Grefresh
|
||||
(JNIEnv*, jclass, jlong);
|
||||
|
||||
|
@ -191,7 +191,7 @@ Java_hdf_hdf5lib_H5__1H5Oopen_1by_1idx
|
||||
* Method: H5Oflush
|
||||
* Signature: (J)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
JNIEXPORT void JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Oflush
|
||||
(JNIEnv*, jclass, jlong);
|
||||
|
||||
@ -200,7 +200,7 @@ Java_hdf_hdf5lib_H5_H5Oflush
|
||||
* Method: H5Orefresh
|
||||
* Signature: (J)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
JNIEXPORT void JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Orefresh
|
||||
(JNIEnv*, jclass, jlong);
|
||||
|
||||
|
@ -613,7 +613,7 @@ Java_hdf_hdf5lib_H5_H5Tconvert
|
||||
* Method: H5Tflush
|
||||
* Signature: (J)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
JNIEXPORT void JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Tflush
|
||||
(JNIEnv*, jclass, jlong);
|
||||
|
||||
@ -622,7 +622,7 @@ Java_hdf_hdf5lib_H5_H5Tflush
|
||||
* Method: H5Trefresh
|
||||
* Signature: (J)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
JNIEXPORT void JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Trefresh
|
||||
(JNIEnv*, jclass, jlong);
|
||||
|
||||
|
@ -77,27 +77,29 @@ int h5repack(const char* infile, const char* outfile, pack_opt_t *options) {
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
int h5repack_init(pack_opt_t *options, int verbose, hbool_t latest,
|
||||
H5F_file_space_type_t strategy, hsize_t threshold) {
|
||||
int k, n;
|
||||
int
|
||||
h5repack_init(pack_opt_t *options, int verbose, hbool_t latest,
|
||||
H5F_file_space_type_t strategy, hsize_t threshold)
|
||||
{
|
||||
int k, n;
|
||||
|
||||
HDmemset(options, 0, sizeof(pack_opt_t));
|
||||
options->min_comp = 0;
|
||||
options->verbose = verbose;
|
||||
options->latest = latest;
|
||||
options->layout_g = H5D_LAYOUT_ERROR;
|
||||
HDmemset(options, 0, sizeof(pack_opt_t));
|
||||
options->min_comp = 0;
|
||||
options->verbose = verbose;
|
||||
options->latest = latest;
|
||||
options->layout_g = H5D_LAYOUT_ERROR;
|
||||
|
||||
for (n = 0; n < H5_REPACK_MAX_NFILTERS; n++) {
|
||||
options->filter_g[n].filtn = -1;
|
||||
options->filter_g[n].cd_nelmts = 0;
|
||||
for (k = 0; k < CD_VALUES; k++)
|
||||
options->filter_g[n].cd_values[k] = 0;
|
||||
}
|
||||
for (n = 0; n < H5_REPACK_MAX_NFILTERS; n++) {
|
||||
options->filter_g[n].filtn = -1;
|
||||
options->filter_g[n].cd_nelmts = 0;
|
||||
for (k = 0; k < CD_VALUES; k++)
|
||||
options->filter_g[n].cd_values[k] = 0;
|
||||
}
|
||||
|
||||
options->fs_strategy = strategy;
|
||||
options->fs_threshold = threshold;
|
||||
|
||||
return (options_table_init(&(options->op_tbl)));
|
||||
return (options_table_init(&(options->op_tbl)));
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
|
@ -84,28 +84,18 @@ static herr_t walk_error_callback(H5_ATTR_UNUSED unsigned n, const H5E_error2_t
|
||||
*
|
||||
* Date: October, 23, 2003
|
||||
*
|
||||
* Modification:
|
||||
* Peter Cao, June 13, 2007
|
||||
* Add "-L, --latest" and other options to pack a file with the latest file format
|
||||
*
|
||||
* Peter Cao, September 25, 2007
|
||||
* Copy user block when repacking a file
|
||||
*
|
||||
* Pedro Vicente, August 20, 2008
|
||||
* Add a user block to file if requested
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
int copy_objects(const char* fnamein, const char* fnameout, pack_opt_t *options)
|
||||
{
|
||||
int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */
|
||||
hid_t fidin;
|
||||
hid_t fidout = -1;
|
||||
trav_table_t *travt = NULL;
|
||||
hsize_t ub_size = 0; /* size of user block */
|
||||
hid_t fcpl = H5P_DEFAULT; /* file creation property list ID */
|
||||
hid_t fapl = H5P_DEFAULT; /* file access property list ID */
|
||||
int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */
|
||||
hid_t fidin;
|
||||
hid_t fidout = -1;
|
||||
trav_table_t *travt = NULL;
|
||||
hsize_t ub_size = 0; /* size of user block */
|
||||
hid_t fcpl = H5P_DEFAULT; /* file creation property list ID */
|
||||
hid_t fapl = H5P_DEFAULT; /* file access property list ID */
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* open input file
|
||||
|
@ -52,8 +52,8 @@ static struct long_options l_opts[] = {
|
||||
{ "metadata_block_size", require_arg, 'M' },
|
||||
{ "threshold", require_arg, 't' },
|
||||
{ "alignment", require_arg, 'a' },
|
||||
{ "infile", require_arg, 'i' }, /* -i for backward compability */
|
||||
{ "outfile", require_arg, 'o' }, /* -o for backward compability */
|
||||
{ "infile", require_arg, 'i' }, /* -i for backward compability */
|
||||
{ "outfile", require_arg, 'o' }, /* -o for backward compability */
|
||||
{ "fs_strategy", require_arg, 'S' },
|
||||
{ "fs_threshold", require_arg, 'T' },
|
||||
{ "enable-error-stack", no_arg, 'E' },
|
||||
@ -208,13 +208,11 @@ static void usage(const char *prog) {
|
||||
* Programmer: Quincey Koziol
|
||||
* Saturday, 31. January 2004
|
||||
*
|
||||
* Modifications:
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static void leave(int ret) {
|
||||
static void leave(int ret)
|
||||
{
|
||||
h5tools_close();
|
||||
|
||||
HDexit(ret);
|
||||
}
|
||||
|
||||
@ -231,10 +229,9 @@ static void leave(int ret) {
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
static
|
||||
int read_info(const char *filename, pack_opt_t *options) {
|
||||
|
||||
int read_info(const char *filename, pack_opt_t *options)
|
||||
{
|
||||
char stype[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||
char comp_info[1024];
|
||||
FILE *fp = NULL;
|
||||
@ -368,10 +365,9 @@ done:
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
static
|
||||
int parse_command_line(int argc, const char **argv, pack_opt_t* options) {
|
||||
|
||||
int parse_command_line(int argc, const char **argv, pack_opt_t* options)
|
||||
{
|
||||
int opt;
|
||||
int ret_value = 0;
|
||||
|
||||
@ -379,185 +375,180 @@ int parse_command_line(int argc, const char **argv, pack_opt_t* options) {
|
||||
while ((opt = get_option(argc, argv, s_opts, l_opts)) != EOF) {
|
||||
switch ((char) opt) {
|
||||
|
||||
/* -i for backward compability */
|
||||
case 'i':
|
||||
infile = opt_arg;
|
||||
has_i_o = 1;
|
||||
break;
|
||||
/* -i for backward compability */
|
||||
case 'i':
|
||||
infile = opt_arg;
|
||||
has_i_o = 1;
|
||||
break;
|
||||
|
||||
/* -o for backward compability */
|
||||
case 'o':
|
||||
outfile = opt_arg;
|
||||
has_i_o = 1;
|
||||
break;
|
||||
/* -o for backward compability */
|
||||
case 'o':
|
||||
outfile = opt_arg;
|
||||
has_i_o = 1;
|
||||
break;
|
||||
|
||||
case 'h':
|
||||
usage(h5tools_getprogname());
|
||||
h5tools_setstatus(EXIT_SUCCESS);
|
||||
ret_value = -1;
|
||||
goto done;
|
||||
|
||||
case 'V':
|
||||
print_version(h5tools_getprogname());
|
||||
h5tools_setstatus(EXIT_SUCCESS);
|
||||
ret_value = -1;
|
||||
goto done;
|
||||
|
||||
case 'v':
|
||||
options->verbose = 1;
|
||||
break;
|
||||
|
||||
case 'f':
|
||||
/* parse the -f filter option */
|
||||
if (h5repack_addfilter(opt_arg, options) < 0) {
|
||||
error_msg("in parsing filter\n");
|
||||
h5tools_setstatus(EXIT_FAILURE);
|
||||
case 'h':
|
||||
usage(h5tools_getprogname());
|
||||
h5tools_setstatus(EXIT_SUCCESS);
|
||||
ret_value = -1;
|
||||
goto done;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'l':
|
||||
/* parse the -l layout option */
|
||||
if (h5repack_addlayout(opt_arg, options) < 0) {
|
||||
error_msg("in parsing layout\n");
|
||||
h5tools_setstatus(EXIT_FAILURE);
|
||||
case 'V':
|
||||
print_version(h5tools_getprogname());
|
||||
h5tools_setstatus(EXIT_SUCCESS);
|
||||
ret_value = -1;
|
||||
goto done;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'm':
|
||||
options->min_comp = HDstrtoull(opt_arg , NULL, 0);
|
||||
if ((int) options->min_comp <= 0) {
|
||||
error_msg("invalid minimum compress size <%s>\n", opt_arg);
|
||||
h5tools_setstatus(EXIT_FAILURE);
|
||||
ret_value = -1;
|
||||
goto done;
|
||||
}
|
||||
break;
|
||||
case 'v':
|
||||
options->verbose = 1;
|
||||
break;
|
||||
|
||||
case 'e':
|
||||
ret_value = read_info(opt_arg, options);
|
||||
if (ret_value < 0)
|
||||
goto done;
|
||||
break;
|
||||
|
||||
case 'n':
|
||||
options->use_native = 1;
|
||||
break;
|
||||
|
||||
case 'L':
|
||||
options->latest = TRUE;
|
||||
break;
|
||||
|
||||
case 'c':
|
||||
options->grp_compact = HDatoi( opt_arg );
|
||||
if (options->grp_compact > 0)
|
||||
options->latest = TRUE; /* must use latest format */
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
options->grp_indexed = HDatoi( opt_arg );
|
||||
if (options->grp_indexed > 0)
|
||||
options->latest = TRUE; /* must use latest format */
|
||||
break;
|
||||
|
||||
case 's':
|
||||
{
|
||||
int idx = 0;
|
||||
int ssize = 0;
|
||||
char *msgPtr = HDstrchr( opt_arg, ':');
|
||||
options->latest = TRUE; /* must use latest format */
|
||||
if (msgPtr == NULL) {
|
||||
ssize = HDatoi( opt_arg );
|
||||
for (idx = 0; idx < 5; idx++)
|
||||
options->msg_size[idx] = ssize;
|
||||
}
|
||||
else {
|
||||
char msgType[10];
|
||||
HDstrcpy(msgType, msgPtr + 1);
|
||||
msgPtr[0] = '\0';
|
||||
ssize = HDatoi( opt_arg );
|
||||
if (HDstrncmp(msgType, "dspace",6) == 0) {
|
||||
options->msg_size[0] = ssize;
|
||||
}
|
||||
else if (HDstrncmp(msgType, "dtype", 5) == 0) {
|
||||
options->msg_size[1] = ssize;
|
||||
}
|
||||
else if (HDstrncmp(msgType, "fill", 4) == 0) {
|
||||
options->msg_size[2] = ssize;
|
||||
}
|
||||
else if (HDstrncmp(msgType, "pline", 5) == 0) {
|
||||
options->msg_size[3] = ssize;
|
||||
}
|
||||
else if (HDstrncmp(msgType, "attr", 4) == 0) {
|
||||
options->msg_size[4] = ssize;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'u':
|
||||
options->ublock_filename = opt_arg;
|
||||
break;
|
||||
|
||||
case 'b':
|
||||
options->ublock_size = (hsize_t) HDatol( opt_arg );
|
||||
break;
|
||||
|
||||
case 'M':
|
||||
options->meta_block_size = (hsize_t) HDatol( opt_arg );
|
||||
break;
|
||||
|
||||
case 't':
|
||||
options->threshold = (hsize_t) HDatol( opt_arg );
|
||||
break;
|
||||
|
||||
case 'a':
|
||||
options->alignment = HDstrtoull(opt_arg , NULL, 0);
|
||||
if (options->alignment < 1) {
|
||||
error_msg("invalid alignment size\n", opt_arg);
|
||||
h5tools_setstatus(EXIT_FAILURE);
|
||||
ret_value = -1;
|
||||
goto done;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'S':
|
||||
{
|
||||
char strategy[MAX_NC_NAME];
|
||||
|
||||
HDstrcpy(strategy, opt_arg);
|
||||
if (!HDstrcmp(strategy, "ALL_PERSIST"))
|
||||
options->fs_strategy = H5F_FILE_SPACE_ALL_PERSIST;
|
||||
else if (!HDstrcmp(strategy, "ALL"))
|
||||
options->fs_strategy = H5F_FILE_SPACE_ALL;
|
||||
else if (!HDstrcmp(strategy, "AGGR_VFD"))
|
||||
options->fs_strategy = H5F_FILE_SPACE_AGGR_VFD;
|
||||
else if (!HDstrcmp(strategy, "VFD"))
|
||||
options->fs_strategy = H5F_FILE_SPACE_VFD;
|
||||
else {
|
||||
error_msg("invalid file space management strategy\n", opt_arg);
|
||||
case 'f':
|
||||
/* parse the -f filter option */
|
||||
if (h5repack_addfilter(opt_arg, options) < 0) {
|
||||
error_msg("in parsing filter\n");
|
||||
h5tools_setstatus(EXIT_FAILURE);
|
||||
ret_value = -1;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
break;
|
||||
break;
|
||||
|
||||
case 'T':
|
||||
options->fs_threshold = (hsize_t) HDatol( opt_arg );
|
||||
break;
|
||||
case 'l':
|
||||
/* parse the -l layout option */
|
||||
if (h5repack_addlayout(opt_arg, options) < 0) {
|
||||
error_msg("in parsing layout\n");
|
||||
h5tools_setstatus(EXIT_FAILURE);
|
||||
ret_value = -1;
|
||||
goto done;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'E':
|
||||
enable_error_stack = TRUE;
|
||||
break;
|
||||
case 'm':
|
||||
options->min_comp = HDstrtoull(opt_arg , NULL, 0);
|
||||
if ((int) options->min_comp <= 0) {
|
||||
error_msg("invalid minimum compress size <%s>\n", opt_arg);
|
||||
h5tools_setstatus(EXIT_FAILURE);
|
||||
ret_value = -1;
|
||||
goto done;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
case 'e':
|
||||
ret_value = read_info(opt_arg, options);
|
||||
if (ret_value < 0)
|
||||
goto done;
|
||||
break;
|
||||
|
||||
case 'n':
|
||||
options->use_native = 1;
|
||||
break;
|
||||
|
||||
case 'L':
|
||||
options->latest = TRUE;
|
||||
break;
|
||||
|
||||
case 'c':
|
||||
options->grp_compact = HDatoi( opt_arg );
|
||||
if (options->grp_compact > 0)
|
||||
options->latest = TRUE; /* must use latest format */
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
options->grp_indexed = HDatoi( opt_arg );
|
||||
if (options->grp_indexed > 0)
|
||||
options->latest = TRUE; /* must use latest format */
|
||||
break;
|
||||
|
||||
case 's':
|
||||
{
|
||||
int idx = 0;
|
||||
int ssize = 0;
|
||||
char *msgPtr = HDstrchr( opt_arg, ':');
|
||||
options->latest = TRUE; /* must use latest format */
|
||||
if (msgPtr == NULL) {
|
||||
ssize = HDatoi( opt_arg );
|
||||
for (idx = 0; idx < 5; idx++)
|
||||
options->msg_size[idx] = ssize;
|
||||
}
|
||||
else {
|
||||
char msgType[10];
|
||||
|
||||
HDstrcpy(msgType, msgPtr + 1);
|
||||
msgPtr[0] = '\0';
|
||||
ssize = HDatoi( opt_arg );
|
||||
if (HDstrncmp(msgType, "dspace",6) == 0)
|
||||
options->msg_size[0] = ssize;
|
||||
else if (HDstrncmp(msgType, "dtype", 5) == 0)
|
||||
options->msg_size[1] = ssize;
|
||||
else if (HDstrncmp(msgType, "fill", 4) == 0)
|
||||
options->msg_size[2] = ssize;
|
||||
else if (HDstrncmp(msgType, "pline", 5) == 0)
|
||||
options->msg_size[3] = ssize;
|
||||
else if (HDstrncmp(msgType, "attr", 4) == 0)
|
||||
options->msg_size[4] = ssize;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'u':
|
||||
options->ublock_filename = opt_arg;
|
||||
break;
|
||||
|
||||
case 'b':
|
||||
options->ublock_size = (hsize_t) HDatol( opt_arg );
|
||||
break;
|
||||
|
||||
case 'M':
|
||||
options->meta_block_size = (hsize_t) HDatol( opt_arg );
|
||||
break;
|
||||
|
||||
case 't':
|
||||
options->threshold = (hsize_t) HDatol( opt_arg );
|
||||
break;
|
||||
|
||||
case 'a':
|
||||
options->alignment = HDstrtoull(opt_arg , NULL, 0);
|
||||
if (options->alignment < 1) {
|
||||
error_msg("invalid alignment size\n", opt_arg);
|
||||
h5tools_setstatus(EXIT_FAILURE);
|
||||
ret_value = -1;
|
||||
goto done;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'S':
|
||||
{
|
||||
char strategy[MAX_NC_NAME];
|
||||
|
||||
HDstrcpy(strategy, opt_arg);
|
||||
if(!HDstrcmp(strategy, "ALL_PERSIST"))
|
||||
options->fs_strategy = H5F_FILE_SPACE_ALL_PERSIST;
|
||||
else if(!HDstrcmp(strategy, "ALL"))
|
||||
options->fs_strategy = H5F_FILE_SPACE_ALL;
|
||||
else if(!HDstrcmp(strategy, "AGGR_VFD"))
|
||||
options->fs_strategy = H5F_FILE_SPACE_AGGR_VFD;
|
||||
else if(!HDstrcmp(strategy, "VFD"))
|
||||
options->fs_strategy = H5F_FILE_SPACE_VFD;
|
||||
else {
|
||||
error_msg("invalid file space management strategy\n", opt_arg);
|
||||
h5tools_setstatus(EXIT_FAILURE);
|
||||
ret_value = -1;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'T':
|
||||
options->fs_threshold = (hsize_t) HDatol( opt_arg );
|
||||
break;
|
||||
|
||||
case 'E':
|
||||
enable_error_stack = TRUE;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
} /* switch */
|
||||
|
||||
} /* while */
|
||||
|
||||
if (has_i_o == 0) {
|
||||
@ -591,14 +582,14 @@ done:
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
int main(int argc, const char **argv) {
|
||||
int main(int argc, const char **argv)
|
||||
{
|
||||
pack_opt_t options; /*the global options */
|
||||
H5E_auto2_t func;
|
||||
H5E_auto2_t tools_func;
|
||||
void *edata;
|
||||
void *tools_edata;
|
||||
|
||||
pack_opt_t options; /*the global options */
|
||||
|
||||
h5tools_setprogname(PROGRAMNAME);
|
||||
h5tools_setstatus(EXIT_SUCCESS);
|
||||
|
||||
|
@ -39,11 +39,6 @@ static int verify_filters(hid_t pid, hid_t tid, int nfilters, filter_info_t *fil
|
||||
* Programmer: Pedro Vicente, pvn@hdfgroup.org
|
||||
*
|
||||
* Date: December 19, 2003
|
||||
* Modified: December, 19, 2007 (exactly 4 years later :-) )
|
||||
* Separate into 3 cases
|
||||
* 1) no filter input, get all datasets and compare DCPLs. TO DO
|
||||
* 2) filter input on selected datasets, get each one trough OBJ and match
|
||||
* 3) filter input on all datasets, get all objects and match
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -51,8 +46,8 @@ static int verify_filters(hid_t pid, hid_t tid, int nfilters, filter_info_t *fil
|
||||
int
|
||||
h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options)
|
||||
{
|
||||
int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */
|
||||
hid_t fidin = -1; /* file ID for input file*/
|
||||
int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */
|
||||
hid_t fidin = -1; /* file ID for input file*/
|
||||
hid_t fidout = -1; /* file ID for output file*/
|
||||
hid_t did = -1; /* dataset ID */
|
||||
hid_t pid = -1; /* dataset creation property list ID */
|
||||
|
@ -183,7 +183,7 @@ COPY_TESTFILES_TO_TESTDIR()
|
||||
INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'`
|
||||
INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'`
|
||||
if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
|
||||
$CP -f $tstfile $TESTDIR
|
||||
$CP -f $tstfile $TESTDIR
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: FAILED to copy $tstfile ."
|
||||
|
||||
@ -241,7 +241,7 @@ TOOLTEST() {
|
||||
# any unexpected output from that stream too.
|
||||
TESTING $H5LS $@
|
||||
(
|
||||
cd $TESTDIR
|
||||
cd $TESTDIR
|
||||
$RUNSERIAL $H5LS_BIN "$@"
|
||||
) >$actual 2>$actual_err
|
||||
|
||||
@ -253,37 +253,37 @@ TOOLTEST() {
|
||||
STDERR_FILTER $actual_err
|
||||
cat $actual_err >> $actual
|
||||
if [ $h5haveexitcode = 'yes' -a $exitcode -ne $retvalexpect ]; then
|
||||
echo "*FAILED*"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
if [ yes = "$verbose" ]; then
|
||||
echo "test returned with exit code $exitcode"
|
||||
echo "test output: (up to $NLINES lines)"
|
||||
head -$NLINES $actual
|
||||
echo "***end of test output***"
|
||||
echo ""
|
||||
fi
|
||||
echo "*FAILED*"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
if [ yes = "$verbose" ]; then
|
||||
echo "test returned with exit code $exitcode"
|
||||
echo "test output: (up to $NLINES lines)"
|
||||
head -$NLINES $actual
|
||||
echo "***end of test output***"
|
||||
echo ""
|
||||
fi
|
||||
elif [ ! -f $expect ]; then
|
||||
# Create the expect file if it doesn't yet exist.
|
||||
# Create the expect file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actual $expect
|
||||
elif $CMP $expect $actual; then
|
||||
echo " PASSED"
|
||||
else
|
||||
echo "*FAILED*"
|
||||
echo " Expected result differs from actual result"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
|
||||
echo " Expected result differs from actual result"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
|
||||
fi
|
||||
|
||||
# Clean up output file
|
||||
if test -z "$HDF5_NOCLEANUP"; then
|
||||
rm -f $actual $actual_err $actual_sav $actual_err_sav
|
||||
rm -f $actual $actual_err $actual_sav $actual_err_sav
|
||||
fi
|
||||
}
|
||||
|
||||
##############################################################################
|
||||
##############################################################################
|
||||
### T H E T E S T S ###
|
||||
### T H E T E S T S ###
|
||||
##############################################################################
|
||||
##############################################################################
|
||||
# prepare for test
|
||||
|
@ -29,14 +29,14 @@ TESTNAME=h5repack
|
||||
EXIT_SUCCESS=0
|
||||
EXIT_FAILURE=1
|
||||
|
||||
H5REPACK=../../src/h5repack/h5repack # The tool name
|
||||
H5REPACK_BIN=`pwd`/$H5REPACK # The path of the tool binary
|
||||
H5REPACK=../../src/h5repack/h5repack # The tool name
|
||||
H5REPACK_BIN=`pwd`/$H5REPACK # The path of the tool binary
|
||||
|
||||
H5DIFF=../../src/h5diff/h5diff # The h5diff tool name
|
||||
H5DIFF_BIN=`pwd`/$H5DIFF # The path of the h5diff tool binary
|
||||
H5DIFF=../../src/h5diff/h5diff # The h5diff tool name
|
||||
H5DIFF_BIN=`pwd`/$H5DIFF # The path of the h5diff tool binary
|
||||
|
||||
H5DUMP=../../src/h5dump/h5dump # The h5dump tool name
|
||||
H5DUMP_BIN=`pwd`/$H5DUMP # The path of the h5dump tool binary
|
||||
H5DUMP=../../src/h5dump/h5dump # The h5dump tool name
|
||||
H5DUMP_BIN=`pwd`/$H5DUMP # The path of the h5dump tool binary
|
||||
|
||||
RM='rm -rf'
|
||||
CMP='cmp'
|
||||
@ -386,7 +386,7 @@ VERIFY_LAYOUT_VDS()
|
||||
|
||||
# Clean up output file
|
||||
if test -z "$HDF5_NOCLEANUP"; then
|
||||
rm -f $actual $actual_err
|
||||
rm -f $actual $actual_err
|
||||
fi
|
||||
|
||||
# clean up tmp files
|
||||
@ -1223,27 +1223,27 @@ TOOLTEST_META meta_long h5repack_layout.h5 --metadata_block_size=8192
|
||||
# layout conversions
|
||||
###############################################################
|
||||
if test $USE_FILTER_DEFLATE != "yes" ; then
|
||||
SKIP vds_dset_chunk_20x10x5
|
||||
SKIP vds_dset_chunk_20x10x5
|
||||
else
|
||||
VERIFY_LAYOUT_VDS vds_dset_chunk_20x10x5 1_vds.h5 vds_dset CHUNKED --layout vds_dset:CHUNK=20x10x5
|
||||
VERIFY_LAYOUT_VDS vds_dset_chunk_20x10x5 1_vds.h5 vds_dset CHUNKED --layout vds_dset:CHUNK=20x10x5
|
||||
fi
|
||||
|
||||
if test $USE_FILTER_DEFLATE != "yes" ; then
|
||||
SKIP vds_chunk2x5x8
|
||||
SKIP vds_chunk2x5x8
|
||||
else
|
||||
VERIFY_LAYOUT_VDS vds_chunk2x5x8 3_1_vds.h5 vds_dset CHUNKED -l vds_dset:CHUNK=2x5x8
|
||||
VERIFY_LAYOUT_VDS vds_chunk2x5x8 3_1_vds.h5 vds_dset CHUNKED -l vds_dset:CHUNK=2x5x8
|
||||
fi
|
||||
|
||||
if test $USE_FILTER_DEFLATE != "yes" ; then
|
||||
SKIP vds_chunk3x6x9
|
||||
SKIP vds_chunk3x6x9
|
||||
else
|
||||
VERIFY_LAYOUT_VDS vds_chunk3x6x9 2_vds.h5 vds_dset CHUNKED -l vds_dset:CHUNK=3x6x9
|
||||
VERIFY_LAYOUT_VDS vds_chunk3x6x9 2_vds.h5 vds_dset CHUNKED -l vds_dset:CHUNK=3x6x9
|
||||
fi
|
||||
|
||||
if test $USE_FILTER_DEFLATE != "yes" ; then
|
||||
SKIP vds_compa 4_vds.h5
|
||||
SKIP vds_compa 4_vds.h5
|
||||
else
|
||||
VERIFY_LAYOUT_VDS vds_compa 4_vds.h5 vds_dset COMPACT -l vds_dset:COMPA
|
||||
VERIFY_LAYOUT_VDS vds_compa 4_vds.h5 vds_dset COMPACT -l vds_dset:COMPA
|
||||
fi
|
||||
|
||||
if test $USE_FILTER_DEFLATE != "yes" ; then
|
||||
|
@ -97,7 +97,6 @@ const char *H5REPACK_FILENAMES[] = {
|
||||
/* Name of tool */
|
||||
#define PROGRAMNAME "h5repacktst"
|
||||
|
||||
|
||||
#define DIM1 40
|
||||
#define DIM2 20
|
||||
#define CDIM1 DIM1/2
|
||||
@ -192,7 +191,7 @@ int main (void)
|
||||
puts("Testing h5repack:");
|
||||
|
||||
/* make the test files */
|
||||
TESTING(" generating datasets");
|
||||
TESTING(" generating files for testing");
|
||||
if (make_testfiles() < 0)
|
||||
GOERROR;
|
||||
PASSED();
|
||||
|
@ -100,11 +100,7 @@ static const char *progname = "h5perf_serial";
|
||||
* It seems that only the options that accept additional information
|
||||
* such as dataset size (-e) require the colon next to it.
|
||||
*/
|
||||
#if 1
|
||||
static const char *s_opts = "a:A:B:c:Cd:D:e:F:ghi:Imno:p:P:r:stT:v:wx:X:";
|
||||
#else
|
||||
static const char *s_opts = "a:A:bB:c:Cd:D:e:F:ghi:Imno:p:P:r:stT:wx:X:";
|
||||
#endif /* 1 */
|
||||
static struct long_options l_opts[] = {
|
||||
{ "align", require_arg, 'a' },
|
||||
{ "alig", require_arg, 'a' },
|
||||
|
Loading…
Reference in New Issue
Block a user