HDFFV-10876 Update h5dump and h5ls for new ref api.

This commit is contained in:
Allen Byrne
2019-11-07 09:49:11 -06:00
parent 2dd5bbfe16
commit 6b927a773c
63 changed files with 5674 additions and 3063 deletions
+70 -70
View File
@@ -20,13 +20,13 @@
*/
#define PROGRAMNAME "h5watch" /* Name of tool */
#define FIELD_SEP "," /* nested field separator */
#define DEFAULT_RETRY 50 /* number of times to try opening the file */
#define DEFAULT_RETRY 50 /* number of times to try opening the file */
/*
* Note:(see comments in hl/src/H5LDprivate.h)
* This tool uses private routines H5LD_construct_vector()and H5LD_clean_vector()
* This tool uses H5LD_memb_t data structure declared in H5LDprivate.h
* This tool uses H5LD_memb_t data structure declared in H5LDprivate.h
*/
const char *progname = "h5watch"; /* tool name */
@@ -35,7 +35,7 @@ static char *g_dup_fields = NULL; /* copy of "list_of_fields" */
static H5LD_memb_t **g_listv = NULL; /* vector info for "list_of_fields" */
static hbool_t g_monitor_size_only = FALSE; /* monitor changes in dataset dimension sizes */
static unsigned g_polling_interval = 1; /* polling interval to check appended data */
static unsigned g_polling_interval = 1; /* polling interval to check appended data */
static hbool_t g_label = FALSE; /* label compound values */
static int g_display_width = 80; /* output width in characters */
@@ -109,7 +109,7 @@ static struct long_options l_opts[] = {
*
* Purpose: Prepare to print the dataset's appended data.
* Call the tools library routine h5tools_dump_dset() to do the printing.
* (This routine is mostly copied from dump_dataset_values() in tools/h5ls/h5ls.c
* (This routine is mostly copied from dump_dataset_values() in tools/h5ls/h5ls.c
* and modified accordingly).
*
* Return: 0 on success; negative on failure
@@ -121,33 +121,33 @@ static struct long_options l_opts[] = {
static herr_t
doprint(hid_t did, hsize_t *start, hsize_t *block, int rank)
{
h5tools_context_t ctx; /* print context */
h5tool_format_t info; /* Format info for the tools library */
static char fmt_double[16], fmt_float[16]; /* Format info */
struct subset_t subset; /* Subsetting info */
hsize_t ss_start[H5S_MAX_RANK]; /* Info for hyperslab */
hsize_t ss_stride[H5S_MAX_RANK]; /* Info for hyperslab */
hsize_t ss_block[H5S_MAX_RANK]; /* Info for hyperslab */
hsize_t ss_count[H5S_MAX_RANK]; /* Info for hyperslab */
int i; /* Local index variable */
h5tools_context_t ctx; /* print context */
h5tool_format_t info; /* Format info for the tools library */
static char fmt_double[16], fmt_float[16]; /* Format info */
struct subset_t subset; /* Subsetting info */
hsize_t ss_start[H5S_MAX_RANK]; /* Info for hyperslab */
hsize_t ss_stride[H5S_MAX_RANK]; /* Info for hyperslab */
hsize_t ss_block[H5S_MAX_RANK]; /* Info for hyperslab */
hsize_t ss_count[H5S_MAX_RANK]; /* Info for hyperslab */
int i; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
HDmemset(&ctx, 0, sizeof(ctx));
/* Subsetting information for the tools library printing routines */
subset.start.data = ss_start;
subset.stride.data = ss_stride;
subset.block.data = ss_block;
subset.count.data = ss_count;
ctx.sset->start.data = ss_start;
ctx.sset->stride.data = ss_stride;
ctx.sset->block.data = ss_block;
ctx.sset->count.data = ss_count;
/* Initialize subsetting information */
for(i = 0; i < rank; i++) {
subset.stride.data[i] = 1;
subset.count.data[i] = 1;
subset.start.data[i] = start[i];
subset.block.data[i] = block[i];
ctx.sset->stride.data[i] = 1;
ctx.sset->count.data[i] = 1;
ctx.sset->start.data[i] = start[i];
ctx.sset->block.data[i] = block[i];
} /* end for */
HDmemset(&ctx, 0, sizeof(ctx));
/* Set to all default values and then override */
HDmemset(&info, 0, sizeof info);
@@ -220,7 +220,7 @@ doprint(hid_t did, hsize_t *start, hsize_t *block, int rank)
} /* end if */
/* Print the values. */
if((ret_value = h5tools_dump_dset(stdout, &info, &ctx, did, &subset)) < 0)
if((ret_value = h5tools_dump_dset(stdout, &info, &ctx, did)) < 0)
error_msg("unable to print data\n");
HDfprintf(stdout, "\n");
@@ -255,7 +255,7 @@ slicendump(hid_t did, hsize_t *prev_dims, hsize_t *cur_dims, hsize_t *start, hsi
int i; /* Local index variable */
int ind; /* Index for the current rank */
herr_t ret_value = SUCCEED; /* Return value */
ind = rank - subrank;
if((subrank - 1) > 0) {
@@ -288,7 +288,7 @@ done:
return ret_value;
} /* end slicendump() */
/*-------------------------------------------------------------------------
* Function: monitor_dataset
*
@@ -305,16 +305,16 @@ done:
*
*-------------------------------------------------------------------------
*/
static herr_t
static herr_t
monitor_dataset(hid_t fid, char *dsetname)
{
hid_t did; /* dataset id */
hid_t sid; /* dataspace id */
int ndims; /* # of dimensions in the dataspace */
int i, u; /* local index variable */
hsize_t prev_dims[H5S_MAX_RANK]; /* current dataspace dimensions */
hsize_t cur_dims[H5S_MAX_RANK]; /* previous dataspace dimensions */
herr_t ret_value = SUCCEED; /* return value */
hid_t did; /* dataset id */
hid_t sid; /* dataspace id */
int ndims; /* # of dimensions in the dataspace */
int i, u; /* local index variable */
hsize_t prev_dims[H5S_MAX_RANK]; /* current dataspace dimensions */
hsize_t cur_dims[H5S_MAX_RANK]; /* previous dataspace dimensions */
herr_t ret_value = SUCCEED; /* return value */
HDfprintf(stdout, "Monitoring dataset %s...\n", dsetname);
@@ -323,7 +323,7 @@ monitor_dataset(hid_t fid, char *dsetname)
error_msg("error in opening dataset \"%s\"\n", dsetname);
ret_value = FAIL;
goto done;
}
}
if((sid = H5Dget_space(did)) < 0) {
error_msg("error in getting dataspace id for dataset \"%s\"\n", dsetname);
ret_value = FAIL;
@@ -398,7 +398,7 @@ monitor_dataset(hid_t fid, char *dsetname)
}
HDfflush(stdout);
}
/* Save the current dimension sizes */
HDmemcpy(prev_dims, cur_dims, (size_t)ndims * sizeof(hsize_t));
@@ -438,7 +438,7 @@ process_cmpd_fields(hid_t fid, char *dsetname)
herr_t ret_value = SUCCEED; /* Return value */
HDassert(g_list_of_fields && *g_list_of_fields);
/* Open the dataset */
if((did = H5Dopen2(fid, dsetname, H5P_DEFAULT)) < 0) {
error_msg("error in opening dataset \"%s\"\n", dsetname);
@@ -457,14 +457,14 @@ process_cmpd_fields(hid_t fid, char *dsetname)
if(H5Tget_class(dtid) != H5T_COMPOUND) {
error_msg("dataset should be compound type for <list_of_fields>\n");
ret_value = FAIL;
goto done;
goto done;
}
/* Make a copy of "g_list_of_fields" */
if((g_dup_fields = HDstrdup(g_list_of_fields)) == NULL) {
error_msg("error in duplicating g_list_of_fields\n");
ret_value = FAIL;
goto done;
goto done;
}
/* Estimate the number of comma-separated fields in "g_list of_fields" */
@@ -474,7 +474,7 @@ process_cmpd_fields(hid_t fid, char *dsetname)
if((g_listv = (H5LD_memb_t **)HDcalloc(len, sizeof(H5LD_memb_t *))) == NULL) {
error_msg("error in allocating memory for H5LD_memb_t\n");
ret_value = FAIL;
goto done;
goto done;
}
/* Process and store info for "g_listv" */
@@ -495,7 +495,7 @@ done:
return(ret_value);
} /* process_cmpd_fields() */
/*-------------------------------------------------------------------------
* Function: check_dataset
*
@@ -512,18 +512,18 @@ done:
static herr_t
check_dataset(hid_t fid, char *dsetname)
{
hid_t did=-1; /* Dataset id */
hid_t dcp=-1; /* Dataset creation property */
hid_t sid=-1; /* Dataset's dataspace id */
int ndims; /* # of dimensions in the dataspace */
unsigned u; /* Local index variable */
hsize_t cur_dims[H5S_MAX_RANK]; /* size of dataspace dimensions */
hsize_t max_dims[H5S_MAX_RANK]; /* maximum size of dataspace dimensions */
hbool_t unlim_max_dims = FALSE; /* whether dataset has unlimited or max. dimension setting */
hid_t did=-1; /* Dataset id */
hid_t dcp=-1; /* Dataset creation property */
hid_t sid=-1; /* Dataset's dataspace id */
int ndims; /* # of dimensions in the dataspace */
unsigned u; /* Local index variable */
hsize_t cur_dims[H5S_MAX_RANK]; /* size of dataspace dimensions */
hsize_t max_dims[H5S_MAX_RANK]; /* maximum size of dataspace dimensions */
hbool_t unlim_max_dims = FALSE; /* whether dataset has unlimited or max. dimension setting */
void *edata;
H5E_auto2_t func;
H5D_layout_t layout;
herr_t ret_value = SUCCEED; /* Return value */
herr_t ret_value = SUCCEED; /* Return value */
/* Disable error reporting */
H5Eget_auto2(H5E_DEFAULT, &func, &edata);
@@ -574,17 +574,17 @@ check_dataset(hid_t fid, char *dsetname)
/* Check whether dataset has unlimited dimension or max. dimension setting */
for(u = 0; u < (unsigned)ndims; u++)
if(max_dims[u] == H5S_UNLIMITED || cur_dims[u] != max_dims[u]) {
if(max_dims[u] == H5S_UNLIMITED || cur_dims[u] != max_dims[u]) {
unlim_max_dims = TRUE;
break;
}
break;
}
if(!unlim_max_dims) {
error_msg("\"%s\" should have unlimited or max. dimension setting\n", dsetname);
ret_value = FAIL;
}
done:
done:
H5Eset_auto2(H5E_DEFAULT, func, edata);
/* Closing */
@@ -597,7 +597,7 @@ done:
return(ret_value);
} /* check_dataset() */
/*-------------------------------------------------------------------------
* Function: leave
*
@@ -618,7 +618,7 @@ leave(int ret)
exit(ret);
}
/*-------------------------------------------------------------------------
* Function: usage
*
@@ -630,7 +630,7 @@ leave(int ret)
*
*-------------------------------------------------------------------------
*/
static void
static void
usage(const char *prog)
{
HDfflush(stdout);
@@ -653,7 +653,7 @@ usage(const char *prog)
HDfprintf(stdout, " for a compound data type. <list_of_fields> can be\n");
HDfprintf(stdout, " specified as follows:\n");
HDfprintf(stdout, " 1) A comma-separated list of field names in a\n");
HDfprintf(stdout, " compound data type. \",\" is the separator\n");
HDfprintf(stdout, " compound data type. \",\" is the separator\n");
HDfprintf(stdout, " for field names while \".\" is the separator\n");
HDfprintf(stdout, " for a nested field.\n");
HDfprintf(stdout, " 2) A single field name in a compound data type.\n");
@@ -672,7 +672,7 @@ usage(const char *prog)
} /* usage() */
/*-------------------------------------------------------------------------
* Function: parse_command_line
*
@@ -688,7 +688,7 @@ usage(const char *prog)
static void
parse_command_line(int argc, const char *argv[])
{
int opt; /* Command line option */
int opt; /* Command line option */
int tmp;
/* no arguments */
@@ -726,7 +726,7 @@ parse_command_line(int argc, const char *argv[])
case 'S': /* --simple */
g_simple_output = TRUE;
break;
case 'l': /* --label */
g_label = TRUE;
break;
@@ -772,7 +772,7 @@ parse_command_line(int argc, const char *argv[])
leave(EXIT_FAILURE);
}
}
/* check for object to be processed */
if (argc <= opt_ind) {
@@ -782,7 +782,7 @@ parse_command_line(int argc, const char *argv[])
}
} /* parse_command_line() */
/*-------------------------------------------------------------------------
* Function: catch_signal
*
@@ -859,9 +859,9 @@ main(int argc, const char *argv[])
}
/* Mostly copied from tools/h5ls coding & modified accordingly */
/*
* [OBJECT] is specified as
* [<filename>/<path_to_dataset>/<dsetname>]
/*
* [OBJECT] is specified as
* [<filename>/<path_to_dataset>/<dsetname>]
*
* Example: ../dir1/foo/bar/dset
* \_________/\______/
@@ -871,7 +871,7 @@ main(int argc, const char *argv[])
* succeeds. The first call uses the entire name and each subsequent call
* chops off the last component. If we reach the beginning of the name
* then there must have been something wrong with the file (perhaps it
* doesn't exist).
* doesn't exist).
*/
if((fname = HDstrdup(argv[opt_ind])) == NULL) {
error_msg("memory allocation failed (file %s:line %d)\n",
@@ -913,7 +913,7 @@ main(int argc, const char *argv[])
if(fname) HDfree(fname);
if(fapl >= 0) H5Pclose(fapl);
leave(EXIT_FAILURE);
}
}
if(!dname) {
error_msg("no dataset specified\n");
@@ -935,13 +935,13 @@ main(int argc, const char *argv[])
if(process_cmpd_fields(fid, dname) < 0)
h5tools_setstatus(EXIT_FAILURE);
}
}
}
/* If everything is fine, start monitoring the datset */
if(h5tools_getstatus() != EXIT_FAILURE)
if(monitor_dataset(fid, dname) < 0)
h5tools_setstatus(EXIT_FAILURE);
/* Free spaces */
if(fname) HDfree(fname);
if(dname) HDfree(dname);
+326 -5
View File
@@ -1107,7 +1107,9 @@ public class H5 implements java.io.Serializable {
log.trace("H5Aread_dname_D");
status = H5Aread_double(attr_id, mem_type_id, (double[]) obj, isCriticalPinning);
}
else if ((H5.H5Tdetect_class(mem_type_id, HDF5Constants.H5T_REFERENCE) && (is1D && (dataClass.getComponentType() == String.class))) || H5.H5Tequal(mem_type_id, HDF5Constants.H5T_STD_REF_DSETREG)) {
else if ((H5.H5Tdetect_class(mem_type_id, HDF5Constants.H5T_REFERENCE) &&
(is1D && (dataClass.getComponentType() == String.class))) ||
H5.H5Tequal(mem_type_id, HDF5Constants.H5T_STD_REF_DSETREG)) {
log.trace("H5Aread_reg_ref");
status = H5Aread_reg_ref(attr_id, mem_type_id, (String[]) obj);
}
@@ -2005,7 +2007,9 @@ public class H5 implements java.io.Serializable {
status = H5Dread_double(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id,
(double[]) obj, isCriticalPinning);
}
else if ((H5.H5Tdetect_class(mem_type_id, HDF5Constants.H5T_REFERENCE) && (is1D && (dataClass.getComponentType() == String.class))) || H5.H5Tequal(mem_type_id, HDF5Constants.H5T_STD_REF_DSETREG)) {
else if ((H5.H5Tdetect_class(mem_type_id, HDF5Constants.H5T_REFERENCE) &&
(is1D && (dataClass.getComponentType() == String.class))) ||
H5.H5Tequal(mem_type_id, HDF5Constants.H5T_STD_REF_DSETREG)) {
log.trace("H5Dread_reg_ref");
status = H5Dread_reg_ref(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id,
(String[]) obj);
@@ -8093,6 +8097,325 @@ public class H5 implements java.io.Serializable {
**/
public synchronized static native int H5PLsize() throws HDF5LibraryException;
// ////////////////////////////////////////////////////////////
// //
// H5R: HDF5 1.12 Reference API Functions //
// //
// ////////////////////////////////////////////////////////////
// Constructors //
/**
* H5Rcreate_object creates a reference pointing to the object named name located at loc id.
*
* @param loc_id
* IN: Location identifier used to locate the object being pointed to.
* @param name
* IN: Name of object at location loc_id.
*
* @return the reference (byte[]) if successful
*
* @exception HDF5LibraryException
* - Error from the HDF-5 Library.
* @exception NullPointerException
* - an input array is null.
* @exception IllegalArgumentException
* - an input array is invalid.
**/
public synchronized static native byte[] H5Rcreate_object(long loc_id, String name)
throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
/**
* H5Rcreate_region creates the reference, pointing to the region represented by
* space id within the object named name located at loc id.
*
* @param loc_id
* IN: Location identifier used to locate the object being pointed to.
* @param name
* IN: Name of object at location loc_id.
* @param space_id
* IN: Identifies the dataset region that a dataset region reference points to.
*
* @return the reference (byte[]) if successful
*
* @exception HDF5LibraryException
* - Error from the HDF-5 Library.
* @exception NullPointerException
* - an input array is null.
* @exception IllegalArgumentException
* - an input array is invalid.
**/
public synchronized static native byte[] H5Rcreate_region(long loc_id, String name, long space_id)
throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
/**
* H5Rcreate_attr creates the reference, pointing to the attribute named attr name
* and attached to the object named name located at loc id.
*
* @param loc_id
* IN: Location identifier used to locate the object being pointed to.
* @param name
* IN: Name of object at location loc_id.
* @param attr_name
* IN: Name of the attribute within the object.
*
* @return the reference (byte[]) if successful
*
* @exception HDF5LibraryException
* - Error from the HDF-5 Library.
* @exception NullPointerException
* - an input array is null.
* @exception IllegalArgumentException
* - an input array is invalid.
**/
public synchronized static native byte[] H5Rcreate_attr(long loc_id, String name, String attr_name)
throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
/**
* H5Rdestroy destroys a reference and releases resources.
*
* @param ref_ptr
* IN: Reference to an object, region or attribute attached to an object.
*
* @exception HDF5LibraryException
* - Error from the HDF-5 Library.
* @exception NullPointerException
* - an input array is null.
* @exception IllegalArgumentException
* - an input array is invalid.
**/
public synchronized static native void H5Rdestroy(byte[] ref_ptr)
throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
// Info //
/**
* H5Rget_type retrieves the type of a reference.
*
* @param ref_ptr
* IN: Reference to an object, region or attribute attached to an object.
*
* @return a valid reference type if successful; otherwise returns H5R UNKNOWN.
*
* @exception HDF5LibraryException
* - Error from the HDF-5 Library.
* @exception NullPointerException
* - an input array is null.
* @exception IllegalArgumentException
* - an input array is invalid.
**/
public synchronized static native int H5Rget_type(byte[] ref_ptr)
throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
/**
* H5Requal determines whether two references point to the same object, region or attribute.
*
* @param ref1_ptr
* IN: Reference to an object, region or attribute attached to an object.
* @param ref2_ptr
* IN: Reference to an object, region or attribute attached to an object.
*
* @return true if equal, else false
*
* @exception HDF5LibraryException
* - Error from the HDF-5 Library.
* @exception NullPointerException
* - an input array is null.
* @exception IllegalArgumentException
* - an input array is invalid.
**/
public synchronized static native boolean H5Requal(byte[] ref1_ptr, byte[] ref2_ptr)
throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
/**
* H5Rcopy creates a copy of an existing reference.
*
* @param src_ref_ptr
* IN: Reference to an object, region or attribute attached to an object.
*
* @return a valid copy of the reference (byte[]) if successful.
*
* @exception HDF5LibraryException
* - Error from the HDF-5 Library.
* @exception NullPointerException
* - an input array is null.
* @exception IllegalArgumentException
* - an input array is invalid.
**/
public synchronized static native byte[] H5Rcopy(byte[] src_ref_ptr)
throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
// Dereference //
/**
* H5Ropen_object opens that object and returns an identifier.
* The object opened with this function should be closed when it is no longer needed
* so that resource leaks will not develop. Use the appropriate close function such
* as H5Oclose or H5Dclose for datasets.
*
* @param ref_ptr
* IN: Reference to an object, region or attribute attached to an object.
* @param rapl_id
* IN: A reference access property list identifier for the reference. The access property
* list can be used to access external files that the reference points
* to (through a file access property list).
* @param oapl_id
* IN: An object access property list identifier for the reference. The access property
* property list must be of the same type as the object being referenced,
* that is a group or dataset property list.
*
* @return a valid identifier if successful
*
* @exception HDF5LibraryException
* - Error from the HDF-5 Library.
* @exception NullPointerException
* - an input array is null.
* @exception IllegalArgumentException
* - an input array is invalid.
**/
public synchronized static native long H5Ropen_object(byte[] ref_ptr, long rapl_id, long oapl_id)
throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
/**
* H5Ropen region creates a copy of the dataspace of the dataset pointed to by a region reference,
* ref ptr, and defines a selection matching the selection pointed to by ref ptr within the dataspace copy.
* Use H5Sclose to release the dataspace identifier returned by this function when the identifier is no longer needed.
*
* @param ref_ptr
* IN: Reference to an object, region or attribute attached to an object.
* @param rapl_id
* IN: A reference access property list identifier for the reference. The access property
* list can be used to access external files that the reference points
* to (through a file access property list).
* @param oapl_id
* IN: An object access property list identifier for the reference. The access property
* property list must be of the same type as the object being referenced,
* that is a group or dataset property list.
*
* @return a valid dataspace identifier if successful
*
* @exception HDF5LibraryException
* - Error from the HDF-5 Library.
* @exception NullPointerException
* - an input array is null.
* @exception IllegalArgumentException
* - an input array is invalid.
**/
public synchronized static native long H5Ropen_region(byte[] ref_ptr, long rapl_id, long oapl_id)
throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
/**
* H5Ropen_attr opens the attribute attached to the object and returns an identifier.
* The attribute opened with this function should be closed with H5Aclose when it is no longer needed
* so that resource leaks will not develop.
*
* @param ref_ptr
* IN: Reference to an object, region or attribute attached to an object.
* @param rapl_id
* IN: A reference access property list identifier for the reference. The access property
* list can be used to access external files that the reference points
* to (through a file access property list).
* @param aapl_id
* IN: An attribute access property list identifier for the reference. The access property
* property list must be of the same type as the object being referenced,
* that is a group or dataset property list.
*
* @return a valid attribute identifier if successful
*
* @exception HDF5LibraryException
* - Error from the HDF-5 Library.
* @exception NullPointerException
* - an input array is null.
* @exception IllegalArgumentException
* - an input array is invalid.
**/
public synchronized static native long H5Ropen_attr(byte[] ref_ptr, long rapl_id, long aapl_id)
throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
// Get type //
/**
* H5Rget obj type3 retrieves the type of the referenced object pointed to.
*
* @param ref_ptr
* IN: Reference to an object, region or attribute attached to an object.
* @param rapl_id
* IN: A reference access property list identifier for the reference. The access property
* list can be used to access external files that the reference points
* to (through a file access property list).
*
* @return Returns the object type
*
* @exception HDF5LibraryException
* - Error from the HDF-5 Library.
* @exception NullPointerException
* - array is null.
* @exception IllegalArgumentException
* - array is invalid.
**/
public synchronized static native int H5Rget_obj_type3(byte[] ref_ptr, long rapl_id)
throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
// Get name //
/**
* H5Rget_file_name retrieves the file name for the object, region or attribute reference pointed to.
*
* @param ref_ptr
* IN: Reference to an object, region or attribute attached to an object.
*
* @return Returns the file name of the reference
*
* @exception HDF5LibraryException
* - Error from the HDF-5 Library.
* @exception NullPointerException
* - array is null.
* @exception IllegalArgumentException
* - array is invalid.
**/
public synchronized static native String H5Rget_file_name(byte[] ref_ptr)
throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
/**
* H5Rget_obj_name retrieves the object name for the object, region or attribute reference pointed to.
*
* @param ref_ptr
* IN: Reference to an object, region or attribute attached to an object.
* @param rapl_id
* IN: A reference access property list identifier for the reference. The access property
* list can be used to access external files that the reference points
* to (through a file access property list).
*
* @return Returns the object name of the reference
*
* @exception HDF5LibraryException
* - Error from the HDF-5 Library.
* @exception NullPointerException
* - array is null.
* @exception IllegalArgumentException
* - array is invalid.
**/
public synchronized static native String H5Rget_obj_name(byte[] ref_ptr, long rapl_id)
throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
/**
* H5Rget_attr_name retrieves the attribute name for the object, region or attribute reference pointed to.
*
* @param ref_ptr
* IN: Reference to an object, region or attribute attached to an object.
*
* @return Returns the attribute name of the reference
*
* @exception HDF5LibraryException
* - Error from the HDF-5 Library.
* @exception NullPointerException
* - array is null.
* @exception IllegalArgumentException
* - array is invalid.
**/
public synchronized static native String H5Rget_attr_name(byte[] ref_ptr)
throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
// ////////////////////////////////////////////////////////////
// //
// H5R: HDF5 1.8 Reference API Functions //
@@ -10328,14 +10651,12 @@ public class H5 implements java.io.Serializable {
* @param buf
* Buffer with data to be reclaimed.
*
* @return a non-negative value if successful
*
* @exception HDF5LibraryException
* - Error from the HDF-5 Library.
* @exception NullPointerException
* - buf is null.
**/
public synchronized static native int H5Treclaim(long type_id, long space_id, long xfer_plist_id, byte[] buf)
public synchronized static native void H5Treclaim(long type_id, long space_id, long xfer_plist_id, byte[] buf)
throws HDF5LibraryException, NullPointerException;
/**
+22
View File
@@ -407,11 +407,18 @@ public class HDF5Constants {
public static final int H5PL_VOL_PLUGIN = H5PL_VOL_PLUGIN();
public static final int H5PL_ALL_PLUGIN = H5PL_ALL_PLUGIN();
public static final int H5R_ATTR = H5R_ATTR();
public static final int H5R_BADTYPE = H5R_BADTYPE();
public static final int H5R_DATASET_REGION = H5R_DATASET_REGION();
public static final int H5R_DATASET_REGION1 = H5R_DATASET_REGION1();
public static final int H5R_DATASET_REGION2 = H5R_DATASET_REGION2();
public static final int H5R_MAXTYPE = H5R_MAXTYPE();
public static final int H5R_REF_BUF_SIZE = H5R_REF_BUF_SIZE();
public static final int H5R_OBJ_REF_BUF_SIZE = H5R_OBJ_REF_BUF_SIZE();
public static final int H5R_OBJECT = H5R_OBJECT();
public static final int H5R_OBJECT1 = H5R_OBJECT1();
public static final int H5R_OBJECT2 = H5R_OBJECT2();
public static final int H5S_ALL = H5S_ALL();
public static final int H5S_MAX_RANK = H5S_MAX_RANK();
public static final int H5S_NO_CLASS = H5S_NO_CLASS();
@@ -606,6 +613,7 @@ public class HDF5Constants {
public static final long H5T_STD_I8LE = H5T_STD_I8LE();
public static final long H5T_STD_REF_DSETREG = H5T_STD_REF_DSETREG();
public static final long H5T_STD_REF_OBJ = H5T_STD_REF_OBJ();
public static final long H5T_STD_REF = H5T_STD_REF();
public static final long H5T_STD_U16BE = H5T_STD_U16BE();
public static final long H5T_STD_U16LE = H5T_STD_U16LE();
public static final long H5T_STD_U32BE = H5T_STD_U32BE();
@@ -1420,16 +1428,28 @@ public class HDF5Constants {
private static native final int H5PL_VOL_PLUGIN();
private static native final int H5R_ATTR();
private static native final int H5R_BADTYPE();
private static native final int H5R_DATASET_REGION();
private static native final int H5R_DATASET_REGION1();
private static native final int H5R_DATASET_REGION2();
private static native final int H5R_MAXTYPE();
private static native final int H5R_REF_BUF_SIZE();
private static native final int H5R_OBJ_REF_BUF_SIZE();
private static native final int H5R_OBJECT();
private static native final int H5R_OBJECT1();
private static native final int H5R_OBJECT2();
private static native final int H5S_ALL();
private static native final int H5S_MAX_RANK();
@@ -1818,6 +1838,8 @@ public class HDF5Constants {
private static native final long H5T_STD_REF_OBJ();
private static native final long H5T_STD_REF();
private static native final long H5T_STD_U16BE();
private static native final long H5T_STD_U16LE();
+14
View File
@@ -813,13 +813,25 @@ Java_hdf_hdf5lib_HDF5Constants_H5R_1BADTYPE(JNIEnv *env, jclass cls) { return H5
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5R_1MAXTYPE(JNIEnv *env, jclass cls) { return H5R_MAXTYPE; }
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5R_1REF_1BUF_1SIZE(JNIEnv *env, jclass cls) { return H5R_REF_BUF_SIZE; }
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5R_1OBJ_1REF_1BUF_1SIZE(JNIEnv *env, jclass cls) { return H5R_OBJ_REF_BUF_SIZE; }
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5R_1DSET_1REG_1REF_1BUF_1SIZE(JNIEnv *env, jclass cls) { return H5R_DSET_REG_REF_BUF_SIZE; }
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5R_1ATTR(JNIEnv *env, jclass cls) { return H5R_ATTR; }
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5R_1OBJECT(JNIEnv *env, jclass cls) { return H5R_OBJECT; }
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5R_1OBJECT1(JNIEnv *env, jclass cls) { return H5R_OBJECT1; }
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5R_1OBJECT2(JNIEnv *env, jclass cls) { return H5R_OBJECT2; }
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5R_1DATASET_1REGION(JNIEnv *env, jclass cls) { return H5R_DATASET_REGION; }
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5R_1DATASET_1REGION1(JNIEnv *env, jclass cls) { return H5R_DATASET_REGION1; }
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5R_1DATASET_1REGION2(JNIEnv *env, jclass cls) { return H5R_DATASET_REGION2; }
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5S_1ALL(JNIEnv *env, jclass cls) { return H5S_ALL; }
@@ -1211,6 +1223,8 @@ Java_hdf_hdf5lib_HDF5Constants_H5T_1STD_1REF_1DSETREG(JNIEnv *env, jclass cls) {
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STD_1REF_1OBJ(JNIEnv *env, jclass cls) { return H5T_STD_REF_OBJ; }
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STD_1REF(JNIEnv *env, jclass cls) { return H5T_STD_REF; }
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STD_1U16BE(JNIEnv *env, jclass cls) { return H5T_STD_U16BE; }
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STD_1U16LE(JNIEnv *env, jclass cls) { return H5T_STD_U16LE; }
+10
View File
@@ -425,6 +425,8 @@ Java_hdf_hdf5lib_H5_H5Pget_1fapl_1hdfs
CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5FD_hdfs_fapl_t", "(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;I)V", args, ret_obj);
#else
UNUSED(fapl_id);
H5_UNIMPLEMENTED(ENVONLY, "H5Pget_fapl_hdfs: not implemented");
#endif /* H5_HAVE_LIBHDFS */
@@ -532,6 +534,9 @@ Java_hdf_hdf5lib_H5_H5Pset_1fapl_1hdfs
if (H5Pset_fapl_hdfs((hid_t)fapl_id, &instance) < 0)
H5_LIBRARY_ERROR(ENVONLY);
#else
UNUSED(fapl_id);
UNUSED(fapl_config);
H5_UNIMPLEMENTED(ENVONLY, "H5Pset_fapl_hdfs: not implemented");
#endif /* H5_HAVE_LIBHDFS */
@@ -841,6 +846,8 @@ Java_hdf_hdf5lib_H5_H5Pget_1fapl_1ros3
CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5FD_ros3_fapl_t", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", args, ret_obj);
#else
UNUSED(fapl_id);
H5_UNIMPLEMENTED(ENVONLY, "H5Pget_fapl_ros3: not implemented");
#endif /* H5_HAVE_ROS3_VFD */
@@ -939,6 +946,9 @@ Java_hdf_hdf5lib_H5_H5Pset_1fapl_1ros3
if (H5Pset_fapl_ros3((hid_t)fapl_id, &instance) < 0)
H5_LIBRARY_ERROR(ENVONLY);
#else
UNUSED(fapl_id);
UNUSED(fapl_config);
H5_UNIMPLEMENTED(ENVONLY, "H5Pset_fapl_ros3: not implemented");
#endif /* H5_HAVE_ROS3_VFD */
+591 -2
View File
@@ -26,10 +26,599 @@ extern "C" {
#include "h5jni.h"
#include "h5rImp.h"
/* H5R: HDF5 1.12 Reference API Functions */
/*
* Pointer to the JNI's Virtual Machine; used for callback functions.
* Class: hdf_hdf5lib_H5
* Method: H5Rcreate_object
* Signature: (JLjava/lang/String;)[B
*/
/* extern JavaVM *jvm; */
JNIEXPORT jbyteArray JNICALL
Java_hdf_hdf5lib_H5_H5Rcreate_1object
(JNIEnv *env, jclass clss, jlong loc_id, jstring name)
{
const char *refName = NULL;
jboolean isCopy;
jbyteArray ref = NULL;
jbyte *refBuf = NULL;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Rcreate_object: name is NULL");
PIN_JAVA_STRING(ENVONLY, name, refName, NULL, "H5Rcreate_object: reference name not pinned");
if (NULL == (refBuf = (unsigned char *) HDcalloc((size_t) 1, H5R_REF_BUF_SIZE)))
H5_JNI_FATAL_ERROR(ENVONLY, "H5Rcreate_object: failed to allocate reference buffer");
if ((status = H5Rcreate_object((hid_t)loc_id, refName, (const H5R_ref_t *)refBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (NULL == (ref = ENVPTR->NewByteArray(ENVONLY, (jsize)H5R_REF_BUF_SIZE)))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
ENVPTR->SetByteArrayRegion(ENVONLY, ref, 0, (jsize)H5R_REF_BUF_SIZE, (jbyte *)refBuf);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
done:
if (refName)
UNPIN_JAVA_STRING(ENVONLY, name, refName);
if (refBuf)
HDfree(refBuf);
return ref;
} /* end Java_hdf_hdf5lib_H5_H5Rcreate_1object */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Rcreate_region
* Signature: (JLjava/lang/String;J)[B
*/
JNIEXPORT jbyteArray JNICALL
Java_hdf_hdf5lib_H5_H5Rcreate_1region
(JNIEnv *env, jclass clss, jlong loc_id, jstring name, jlong space_id)
{
const char *refName = NULL;
jboolean isCopy;
jbyteArray ref = NULL;
jbyte *refBuf = NULL;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Rcreate_region: name is NULL");
PIN_JAVA_STRING(ENVONLY, name, refName, NULL, "H5Rcreate_region: reference name not pinned");
if (NULL == (refBuf = (unsigned char *) HDcalloc((size_t) 1, H5R_REF_BUF_SIZE)))
H5_JNI_FATAL_ERROR(ENVONLY, "H5Rcreate_region: failed to allocate reference buffer");
if ((status = H5Rcreate_region((hid_t)loc_id, refName, space_id, (const H5R_ref_t *)refBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (NULL == (ref = ENVPTR->NewByteArray(ENVONLY, (jsize)H5R_REF_BUF_SIZE)))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
ENVPTR->SetByteArrayRegion(ENVONLY, ref, 0, (jsize)H5R_REF_BUF_SIZE, (jbyte *)refBuf);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
done:
if (refName)
UNPIN_JAVA_STRING(ENVONLY, name, refName);
if (refBuf)
HDfree(refBuf);
return ref;
} /* end Java_hdf_hdf5lib_H5_H5Rcreate_1region */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Rcreate_attr
* Signature: (JLjava/lang/String;Ljava/lang/String;)[B
*/
JNIEXPORT jbyteArray JNICALL
Java_hdf_hdf5lib_H5_H5Rcreate_1attr
(JNIEnv *env, jclass clss, jlong loc_id, jstring name, jstring attr_name)
{
const char *refName = NULL;
const char *attrName = NULL;
jboolean isCopy;
jbyteArray ref = NULL;
jbyte *refBuf = NULL;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Rcreate_attr: name is NULL");
if (NULL == attr_name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Rcreate_attr: attribute name is NULL");
PIN_JAVA_STRING(ENVONLY, attr_name, attrName, NULL, "H5Rcreate_attr: attribute name not pinned");
PIN_JAVA_STRING(ENVONLY, name, refName, NULL, "H5Rcreate_attr: reference name not pinned");
if (NULL == (refBuf = (unsigned char *) HDcalloc((size_t) 1, H5R_REF_BUF_SIZE)))
H5_JNI_FATAL_ERROR(ENVONLY, "H5Rcreate_attr: failed to allocate reference buffer");
if ((status = H5Rcreate_attr((hid_t)loc_id, refName, attrName, (const H5R_ref_t *)refBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (NULL == (ref = ENVPTR->NewByteArray(ENVONLY, (jsize)H5R_REF_BUF_SIZE)))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
ENVPTR->SetByteArrayRegion(ENVONLY, ref, 0, (jsize)H5R_REF_BUF_SIZE, (jbyte *)refBuf);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
done:
if (attrName)
UNPIN_JAVA_STRING(ENVONLY, attr_name, attrName);
if (refName)
UNPIN_JAVA_STRING(ENVONLY, name, refName);
if (refBuf)
HDfree(refBuf);
return ref;
} /* end Java_hdf_hdf5lib_H5_H5Rcreate_1attr */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Rdestroy
* Signature: ([B)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Rdestroy
(JNIEnv *env, jclass clss, jbyteArray ref)
{
jboolean isCopy;
jbyte *refBuf = NULL;
jsize refBufLen;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == ref)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Rdestroy: reference is NULL");
if ((refBufLen = ENVPTR->GetArrayLength(ENVONLY, ref)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Rdestroy: reference array length < 0");
}
PIN_BYTE_ARRAY(ENVONLY, ref, refBuf, &isCopy, "H5Rdestroy: reference buffer not pinned");
if ((status = H5Rdestroy((const H5R_ref_t *)refBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (refBuf)
UNPIN_BYTE_ARRAY(ENVONLY, ref, refBuf, (status < 0) ? JNI_ABORT : 0);
} /* end Java_hdf_hdf5lib_H5_H5Rdestroy */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Rget_type
* Signature: ([B)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Rget_1type
(JNIEnv *env, jclass clss, jbyteArray ref)
{
jboolean isCopy;
jbyte *refBuf = NULL;
jsize refBufLen;
H5R_type_t ref_type;
UNUSED(clss);
if (NULL == ref)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Rget_type: reference is NULL");
if ((refBufLen = ENVPTR->GetArrayLength(ENVONLY, ref)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Rget_type: reference array length < 0");
}
PIN_BYTE_ARRAY(ENVONLY, ref, refBuf, &isCopy, "H5Rget_type: reference buffer not pinned");
if ((ref_type = H5Rget_type((const H5R_ref_t *)refBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (refBuf)
UNPIN_BYTE_ARRAY(ENVONLY, ref, refBuf, (ref_type < 0) ? JNI_ABORT : 0);
return (jint)ref_type;
} /* end Java_hdf_hdf5lib_H5_H5Rget_1type */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Requal
* Signature: ([B[B)Z
*/
JNIEXPORT jboolean JNICALL
Java_hdf_hdf5lib_H5_H5Requal
(JNIEnv *env, jclass clss, jbyteArray ref1, jbyteArray ref2)
{
jboolean isCopy;
jbyte *refBuf1 = NULL;
jbyte *refBuf2 = NULL;
jsize refBufLen;
htri_t bval = JNI_FALSE;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == ref1)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Requal: reference1 is NULL");
if (NULL == ref2)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Requal: reference2 is NULL");
if ((refBufLen = ENVPTR->GetArrayLength(ENVONLY, ref1)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Requal: reference1 array length < 0");
}
PIN_BYTE_ARRAY(ENVONLY, ref1, refBuf1, &isCopy, "H5Requal: reference1 buffer not pinned");
if ((refBufLen = ENVPTR->GetArrayLength(ENVONLY, ref2)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Requal: reference2 array length < 0");
}
PIN_BYTE_ARRAY(ENVONLY, ref2, refBuf2, &isCopy, "H5Requal: reference2 buffer not pinned");
if ((bval = H5Requal((const H5R_ref_t *)refBuf1, (const H5R_ref_t *)refBuf2)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
status = bval;
bval = (bval > 0) ? JNI_TRUE : JNI_FALSE;
done:
if (refBuf2)
UNPIN_BYTE_ARRAY(ENVONLY, ref2, refBuf2, (status < 0) ? JNI_ABORT : 0);
if (refBuf1)
UNPIN_BYTE_ARRAY(ENVONLY, ref1, refBuf1, (status < 0) ? JNI_ABORT : 0);
return (jboolean)bval;
} /* end Java_hdf_hdf5lib_H5_H5Requal */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Rcopy
* Signature: ([B)[B
*/
JNIEXPORT jbyteArray JNICALL
Java_hdf_hdf5lib_H5_H5Rcopy
(JNIEnv *env, jclass clss, jbyteArray src_ref)
{
jboolean isCopy;
jbyte *src_refBuf = NULL;
jsize refBufLen;
jbyteArray dst_ref = NULL;
jbyte *dst_refBuf = NULL;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == src_ref)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Rcopy: src reference is NULL");
if ((refBufLen = ENVPTR->GetArrayLength(ENVONLY, src_ref)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Rcopy: src reference array length < 0");
}
PIN_BYTE_ARRAY(ENVONLY, src_ref, src_refBuf, &isCopy, "H5Rcopy: src reference buffer not pinned");
if (NULL == (dst_refBuf = (unsigned char *) HDcalloc((size_t) 1, H5R_REF_BUF_SIZE)))
H5_JNI_FATAL_ERROR(ENVONLY, "H5Rcreate_attr: failed to allocate dst reference buffer");
if ((status = H5Rcopy((const H5R_ref_t *)src_refBuf, (const H5R_ref_t *)dst_refBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (NULL == (dst_ref = ENVPTR->NewByteArray(ENVONLY, (jsize)H5R_REF_BUF_SIZE)))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
ENVPTR->SetByteArrayRegion(ENVONLY, dst_ref, 0, (jsize)H5R_REF_BUF_SIZE, (jbyte *)dst_refBuf);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
done:
if (src_refBuf)
UNPIN_BYTE_ARRAY(ENVONLY, src_ref, src_refBuf, (status < 0) ? JNI_ABORT : 0);
if (dst_refBuf)
HDfree(dst_refBuf);
return dst_ref;
} /* end Java_hdf_hdf5lib_H5_H5Rcopy */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Ropen_object
* Signature: ([BJJ)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5_H5Ropen_1object
(JNIEnv *env, jclass clss, jbyteArray ref, jlong rapl_id, jlong oapl_id)
{
jboolean isCopy;
jbyte *refBuf = NULL;
jsize refBufLen;
hid_t retVal = H5I_INVALID_HID;
UNUSED(clss);
if (NULL == ref)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Ropen_object: reference is NULL");
if ((refBufLen = ENVPTR->GetArrayLength(ENVONLY, ref)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Ropen_object: reference array length < 0");
}
PIN_BYTE_ARRAY(ENVONLY, ref, refBuf, &isCopy, "H5Ropen_object: reference buffer not pinned");
if ((retVal = H5Ropen_object((const H5R_ref_t *)refBuf, (hid_t)rapl_id, (hid_t)oapl_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (refBuf)
UNPIN_BYTE_ARRAY(ENVONLY, ref, refBuf, (retVal < 0) ? JNI_ABORT : 0);
return (jlong)retVal;
} /* end Java_hdf_hdf5lib_H5_H5Ropen_1object */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Ropen_region
* Signature: ([BJJ)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5_H5Ropen_1region
(JNIEnv *env, jclass clss, jbyteArray ref, jlong rapl_id, jlong oapl_id)
{
jboolean isCopy;
jbyte *refBuf = NULL;
jsize refBufLen;
hid_t retVal = H5I_INVALID_HID;
UNUSED(clss);
if (NULL == ref)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Ropen_region: reference is NULL");
if ((refBufLen = ENVPTR->GetArrayLength(ENVONLY, ref)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Ropen_region: reference array length < 0");
}
PIN_BYTE_ARRAY(ENVONLY, ref, refBuf, &isCopy, "H5Ropen_region: reference buffer not pinned");
if ((retVal = H5Ropen_region((const H5R_ref_t *)refBuf, (hid_t)rapl_id, (hid_t)oapl_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (refBuf)
UNPIN_BYTE_ARRAY(ENVONLY, ref, refBuf, (retVal < 0) ? JNI_ABORT : 0);
return (jlong)retVal;
} /* end Java_hdf_hdf5lib_H5_H5Ropen_1region */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Ropen_attr
* Signature: ([BJJ)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5_H5Ropen_1attr
(JNIEnv *env, jclass clss, jbyteArray ref, jlong rapl_id, jlong aapl_id)
{
jboolean isCopy;
jbyte *refBuf = NULL;
jsize refBufLen;
hid_t retVal = H5I_INVALID_HID;
UNUSED(clss);
if (NULL == ref)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Ropen_attr: reference is NULL");
if ((refBufLen = ENVPTR->GetArrayLength(ENVONLY, ref)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Ropen_attr: reference array length < 0");
}
PIN_BYTE_ARRAY(ENVONLY, ref, refBuf, &isCopy, "H5Ropen_attr: reference buffer not pinned");
if ((retVal = H5Ropen_attr((const H5R_ref_t *)refBuf, (hid_t)rapl_id, (hid_t)aapl_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (refBuf)
UNPIN_BYTE_ARRAY(ENVONLY, ref, refBuf, (retVal < 0) ? JNI_ABORT : 0);
return (jlong)retVal;
} /* end Java_hdf_hdf5lib_H5_H5Ropen_1attr */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Rget_obj_type3
* Signature: ([BJ)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Rget_1obj_1type3
(JNIEnv *env, jclass clss, jbyteArray ref, jlong rapl_id)
{
H5O_type_t object_info;
jboolean isCopy;
jbyte *refBuf = NULL;
int retVal = -1;
UNUSED(clss);
if (NULL == ref)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Rget_obj_type3: reference buffer is NULL");
PIN_BYTE_ARRAY(ENVONLY, ref, refBuf, &isCopy, "H5Rget_obj_type3: reference buffer not pinned");
if ((retVal = H5Rget_obj_type3((const H5R_ref_t *)refBuf, (hid_t)rapl_id, &object_info)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (retVal >= 0)
retVal = object_info;
done:
if (refBuf)
UNPIN_BYTE_ARRAY(ENVONLY, ref, refBuf, (retVal < 0) ? JNI_ABORT : 0);
return (jint)retVal;
} /* end Java_hdf_hdf5lib_H5_H5Rget_1obj_1type3 */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Rget_file_name
* Signature: ([B)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL
Java_hdf_hdf5lib_H5_H5Rget_1file_1name
(JNIEnv *env, jclass clss, jbyteArray ref)
{
jboolean isCopy;
jbyte *refBuf = NULL;
jstring str = NULL;
ssize_t buf_size;
ssize_t check_size;
char *namePtr = NULL;
UNUSED(clss);
if (NULL == ref)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Rget_file_name: reference buffer is NULL");
PIN_BYTE_ARRAY(ENVONLY, ref, refBuf, &isCopy, "H5Rget_file_name: reference buffer not pinned");
/* Get the length of the name */
if ((buf_size = H5Rget_file_name((const H5R_ref_t *)refBuf, NULL, 0)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (NULL == (namePtr = (char *) HDmalloc(sizeof(char) * (size_t)buf_size + 1)))
H5_JNI_FATAL_ERROR(ENVONLY, "H5Rget_file_name: malloc failed");
if ((check_size = H5Rget_file_name((const H5R_ref_t *)refBuf, namePtr, (size_t)buf_size + 1)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
namePtr[buf_size] = '\0';
if (NULL == (str = ENVPTR->NewStringUTF(ENVONLY, namePtr)))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
done:
if (namePtr)
HDfree(namePtr);
if (refBuf)
UNPIN_BYTE_ARRAY(ENVONLY, ref, refBuf, (check_size < 0) ? JNI_ABORT : 0);
return str;
} /* end Java_hdf_hdf5lib_H5_H5Rget_1file_1name */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Rget_obj_name
* Signature: ([BJ)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL
Java_hdf_hdf5lib_H5_H5Rget_1obj_1name
(JNIEnv *env, jclass clss, jbyteArray ref, jlong rapl_id)
{
jboolean isCopy;
jbyte *refBuf = NULL;
jstring str = NULL;
ssize_t buf_size;
ssize_t check_size;
char *namePtr = NULL;
UNUSED(clss);
if (NULL == ref)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Rget_obj_name: reference buffer is NULL");
PIN_BYTE_ARRAY(ENVONLY, ref, refBuf, &isCopy, "H5Rget_obj_name: reference buffer not pinned");
/* Get the length of the name */
if ((buf_size = H5Rget_obj_name((const H5R_ref_t *)refBuf, (hid_t)rapl_id, NULL, 0)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (NULL == (namePtr = (char *) HDmalloc(sizeof(char) * (size_t)buf_size + 1)))
H5_JNI_FATAL_ERROR(ENVONLY, "H5Rget_obj_name: malloc failed");
if ((check_size = H5Rget_obj_name((const H5R_ref_t *)refBuf, (hid_t)rapl_id, namePtr, (size_t)buf_size + 1)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
namePtr[buf_size] = '\0';
if (NULL == (str = ENVPTR->NewStringUTF(ENVONLY, namePtr)))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
done:
if (namePtr)
HDfree(namePtr);
if (refBuf)
UNPIN_BYTE_ARRAY(ENVONLY, ref, refBuf, (check_size < 0) ? JNI_ABORT : 0);
return str;
} /* end Java_hdf_hdf5lib_H5_H5Rget_1obj_1name */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Rget_attr_name
* Signature: ([B)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL
Java_hdf_hdf5lib_H5_H5Rget_1attr_1name
(JNIEnv *env, jclass clss, jbyteArray ref)
{
jboolean isCopy;
jbyte *refBuf = NULL;
jstring str = NULL;
ssize_t buf_size;
ssize_t check_size;
char *namePtr = NULL;
UNUSED(clss);
if (NULL == ref)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Rget_attr_name: reference buffer is NULL");
PIN_BYTE_ARRAY(ENVONLY, ref, refBuf, &isCopy, "H5Rget_attr_name: reference buffer not pinned");
/* Get the length of the name */
if ((buf_size = H5Rget_attr_name((const H5R_ref_t *)refBuf, NULL, 0)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (NULL == (namePtr = (char *) HDmalloc(sizeof(char) * (size_t)buf_size + 1)))
H5_JNI_FATAL_ERROR(ENVONLY, "H5Rget_attr_name: malloc failed");
if ((check_size = H5Rget_attr_name((const H5R_ref_t *)refBuf, namePtr, (size_t)buf_size + 1)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
namePtr[buf_size] = '\0';
if (NULL == (str = ENVPTR->NewStringUTF(ENVONLY, namePtr)))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
done:
if (namePtr)
HDfree(namePtr);
if (refBuf)
UNPIN_BYTE_ARRAY(ENVONLY, ref, refBuf, (check_size < 0) ? JNI_ABORT : 0);
return str;
} /* end Java_hdf_hdf5lib_H5_H5Rget_1attr_1name */
/* H5R: HDF5 1.8 Reference API Functions */
/*
* Class: hdf_hdf5lib_H5
+130
View File
@@ -21,6 +21,136 @@
extern "C" {
#endif /* __cplusplus */
/* H5R: HDF5 1.12 Reference API Functions */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Rcreate_object
* Signature: (JLjava/lang/String;)[B
*/
JNIEXPORT jbyteArray JNICALL
Java_hdf_hdf5lib_H5_H5Rcreate_1object
(JNIEnv *, jclass, jlong, jstring);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Rcreate_region
* Signature: (JLjava/lang/String;J)[B
*/
JNIEXPORT jbyteArray JNICALL
Java_hdf_hdf5lib_H5_H5Rcreate_1region
(JNIEnv *, jclass, jlong, jstring, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Rcreate_attr
* Signature: (JLjava/lang/String;Ljava/lang/String;)[B
*/
JNIEXPORT jbyteArray JNICALL
Java_hdf_hdf5lib_H5_H5Rcreate_1attr
(JNIEnv *, jclass, jlong, jstring, jstring);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Rdestroy
* Signature: ([B)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Rdestroy
(JNIEnv *, jclass, jbyteArray);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Rget_type
* Signature: ([B)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Rget_1type
(JNIEnv *, jclass, jbyteArray);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Requal
* Signature: ([B[B)Z
*/
JNIEXPORT jboolean JNICALL
Java_hdf_hdf5lib_H5_H5Requal
(JNIEnv *, jclass, jbyteArray, jbyteArray);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Rcopy
* Signature: ([B)[B
*/
JNIEXPORT jbyteArray JNICALL
Java_hdf_hdf5lib_H5_H5Rcopy
(JNIEnv *, jclass, jbyteArray);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Ropen_object
* Signature: ([BJJ)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5_H5Ropen_1object
(JNIEnv *, jclass, jbyteArray, jlong, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Ropen_region
* Signature: ([BJJ)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5_H5Ropen_1region
(JNIEnv *, jclass, jbyteArray, jlong, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Ropen_attr
* Signature: ([BJJ)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5_H5Ropen_1attr
(JNIEnv *, jclass, jbyteArray, jlong, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Rget_obj_type3
* Signature: ([BJ)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Rget_1obj_1type3
(JNIEnv *, jclass, jbyteArray, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Rget_file_name
* Signature: ([B)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL
Java_hdf_hdf5lib_H5_H5Rget_1file_1name
(JNIEnv *, jclass, jbyteArray);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Rget_obj_name
* Signature: ([BJ)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL
Java_hdf_hdf5lib_H5_H5Rget_1obj_1name
(JNIEnv *, jclass, jbyteArray, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Rget_attr_name
* Signature: ([B)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL
Java_hdf_hdf5lib_H5_H5Rget_1attr_1name
(JNIEnv *, jclass, jbyteArray);
/* H5R: HDF5 1.8 Reference API Functions */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Rcreate
+3 -3
View File
@@ -162,9 +162,9 @@ done:
} /* end Java_hdf_hdf5lib_H5__1H5Scopy */
#ifdef notdef
// 10/28/99 -- added code to copy the array -- this is not used,
// but serves as a reminder in case we try to implement this in
// the future....
/* 10/28/99 -- added code to copy the array -- this is not used,
* but serves as a reminder in case we try to implement this in
*/ the future....
/*
* Note: the argument coord is actually long coord[][], which has been
* flattened by the caller.
+3 -3
View File
@@ -49,9 +49,9 @@ Java_hdf_hdf5lib_H5__1H5Scopy
(JNIEnv *, jclass, jlong);
#ifdef notdef
// 10/28/99 -- added code to copy the array -- this is not used,
// but serves as a reminder in case we try to implement this in
// the future....
/* 10/28/99 -- added code to copy the array -- this is not used,
* but serves as a reminder in case we try to implement this in
*/ the future....
/*
* Note: the argument coord is actually long coord[][], which has been
* flattened by the caller.
+2 -4
View File
@@ -981,9 +981,9 @@ done:
/*
* Class: hdf_hdf5lib_H5
* Method: H5Treclaim
* Signature: (JJJ[B)I
* Signature: (JJJ[B)V
*/
JNIEXPORT jint JNICALL
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Treclaim
(JNIEnv *env, jclass clss, jlong type_id, jlong space_id,
jlong xfer_plist_id, jbyteArray buf)
@@ -1005,8 +1005,6 @@ Java_hdf_hdf5lib_H5_H5Treclaim
done:
if (pinBuf)
UNPIN_BYTE_ARRAY(ENVONLY, buf, pinBuf, (status < 0) ? JNI_ABORT : 0);
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Treclaim */
/*
+2 -2
View File
@@ -402,9 +402,9 @@ Java_hdf_hdf5lib_H5_H5Tpack
/*
* Class: hdf_hdf5lib_H5
* Method: H5Treclaim
* Signature: (JJJ[B)I
* Signature: (JJJ[B)V
*/
JNIEXPORT jint JNICALL
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Treclaim
(JNIEnv*, jclass, jlong, jlong, jlong, jbyteArray);
+166 -107
View File
@@ -71,6 +71,12 @@ static int render_bin_output_region_data_points(FILE *stream, hid_t region_s
static int render_bin_output_region_points(FILE *stream, hid_t region_space,
hid_t region_id, hid_t container);
/* Strings for output */
#define H5_TOOLS_GROUP "GROUP"
#define H5_TOOLS_DATASET "DATASET"
#define H5_TOOLS_DATATYPE "DATATYPE"
#define H5_TOOLS_ATTRIBUTE "ATTRIBUTE"
/** frees memory held by array of strings */
void
h5str_array_free
@@ -625,6 +631,64 @@ done:
return retVal;
} /* end h5str_convert */
/*-------------------------------------------------------------------------
* Function: h5str_sprint_reference
*
* Purpose: Object reference -- show the name of the referenced object.
*
* Return: Nothing
*-------------------------------------------------------------------------
*/
void
h5str_sprint_reference(JNIEnv *env, h5str_t *out_str, hid_t container, void *ref_p)
{
ssize_t buf_size, status;
char *ref_name = NULL;
const H5R_ref_t *ref_vp = (H5R_ref_t *)ref_p;
UNUSED(container);
if (!h5str_append(out_str, " "))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
buf_size = H5Rget_file_name(ref_vp, NULL, 0);
if (buf_size) {
ref_name = (char *)HDmalloc(sizeof(char) * (size_t)buf_size + 1);
status = H5Rget_file_name(ref_vp, ref_name, buf_size + 1);
ref_name[buf_size] = '\0';
if (!h5str_append(out_str, ref_name))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
HDfree(ref_name);
ref_name = NULL;
}
buf_size = H5Rget_obj_name(ref_vp, H5P_DEFAULT, NULL, 0);
if (buf_size) {
ref_name = (char *)HDmalloc(sizeof(char) * (size_t)buf_size + 1);
status = H5Rget_obj_name(ref_vp, H5P_DEFAULT, ref_name, buf_size + 1);
ref_name[buf_size] = '\0';
if (!h5str_append(out_str, ref_name))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
HDfree(ref_name);
ref_name = NULL;
}
if (H5Rget_type(ref_vp) == H5R_ATTR) {
buf_size = H5Rget_attr_name(ref_vp, NULL, 0);
if (buf_size) {
ref_name = (char *)HDmalloc(sizeof(char) * (size_t)buf_size + 1);
status = H5Rget_attr_name(ref_vp, ref_name, buf_size + 1);
ref_name[buf_size] = '\0';
if (!h5str_append(out_str, ref_name))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
HDfree(ref_name);
ref_name = NULL;
}
}
done:
if (ref_name)
HDfree(ref_name);
}
/*
* Prints the value of a data point into a string.
*
@@ -984,96 +1048,89 @@ h5str_sprintf
break;
}
if (H5R_DSET_REG_REF_BUF_SIZE == typeSize) {
H5S_sel_type region_type = H5S_SEL_ERROR;
hid_t region_obj = H5I_INVALID_HID;
hid_t region = H5I_INVALID_HID;
char ref_name[1024];
if (H5Tequal(tid, H5T_STD_REF)) {
H5O_type_t obj_type; /* Object type */
H5R_type_t ref_type; /* Reference type */
const H5R_ref_t *ref_vp = (H5R_ref_t *)cptr;
/*
* Dataset region reference --
* show the type and the referenced object
*/
ref_type = H5Rget_type(ref_vp);
H5Rget_obj_type3(ref_vp, H5P_DEFAULT, &obj_type);
switch (ref_type) {
case H5R_OBJECT1:
switch (obj_type) {
case H5O_TYPE_GROUP:
if (!h5str_append(out_str, H5_TOOLS_GROUP))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
break;
/* Get name of the dataset the region reference points to using H5Rget_name */
if ((region_obj = H5Rdereference2(container, H5P_DEFAULT, H5R_DATASET_REGION, cptr)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
case H5O_TYPE_DATASET:
if (!h5str_append(out_str, H5_TOOLS_DATASET))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
break;
if ((region = H5Rget_region(container, H5R_DATASET_REGION, cptr)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
case H5O_TYPE_NAMED_DATATYPE:
if (!h5str_append(out_str, H5_TOOLS_DATATYPE))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
break;
if (expand_data) {
if (H5S_SEL_ERROR == (region_type = H5Sget_select_type(region)))
H5_LIBRARY_ERROR(ENVONLY);
if (H5S_SEL_POINTS == region_type) {
if (h5str_dump_region_points_data(ENVONLY, out_str, region, region_obj) < 0)
case H5O_TYPE_MAP:
case H5O_TYPE_UNKNOWN:
case H5O_TYPE_NTYPES:
default:
break;
} /* end switch */
break;
case H5R_DATASET_REGION1:
if (!h5str_append(out_str, H5_TOOLS_DATASET))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
}
else {
if (h5str_dump_region_blocks_data(ENVONLY, out_str, region, region_obj) < 0)
h5str_sprint_reference(ENVONLY, out_str, container, (void*)cptr);
break;
case H5R_OBJECT2:
switch (obj_type) {
case H5O_TYPE_GROUP:
if (!h5str_append(out_str, H5_TOOLS_GROUP))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
break;
case H5O_TYPE_DATASET:
if (!h5str_append(out_str, H5_TOOLS_DATASET))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
break;
case H5O_TYPE_NAMED_DATATYPE:
if (!h5str_append(out_str, H5_TOOLS_DATATYPE))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
break;
case H5O_TYPE_MAP:
case H5O_TYPE_UNKNOWN:
case H5O_TYPE_NTYPES:
default:
break;
} /* end switch */
h5str_sprint_reference(ENVONLY, out_str, container, (void*)cptr);
break;
case H5R_DATASET_REGION2:
if (!h5str_append(out_str, H5_TOOLS_DATASET))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
}
}
else {
if (H5Rget_name(region_obj, H5R_DATASET_REGION, cptr, (char *)ref_name, 1024) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (!h5str_append(out_str, ref_name))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
if (H5S_SEL_ERROR == (region_type = H5Sget_select_type(region)))
H5_LIBRARY_ERROR(ENVONLY);
if (H5S_SEL_POINTS == region_type) {
if (!h5str_append(out_str, " REGION_TYPE POINT"))
h5str_sprint_reference(ENVONLY, out_str, container, (void*)cptr);
break;
case H5R_ATTR:
if (!h5str_append(out_str, H5_TOOLS_ATTRIBUTE))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
if (h5str_dump_region_points(ENVONLY, out_str, region, region_obj) < 0)
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
}
else {
if (!h5str_append(out_str, " REGION_TYPE BLOCK"))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
if (h5str_dump_region_blocks(ENVONLY, out_str, region, region_obj) < 0)
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
}
}
if (H5Sclose(region) < 0)
H5_LIBRARY_ERROR(ENVONLY);
region = H5I_INVALID_HID;
if (H5Dclose(region_obj) < 0)
H5_LIBRARY_ERROR(ENVONLY);
region_obj = H5I_INVALID_HID;
h5str_sprint_reference(ENVONLY, out_str, container, (void*)cptr);
break;
default:
break;
} /* end switch */
}
else if (H5R_OBJ_REF_BUF_SIZE == typeSize) {
H5O_info_t oi;
hid_t obj = H5I_INVALID_HID;
/*
* Object references -- show the type and OID of the referenced
* object.
*/
if (NULL == (this_str = (char *) HDmalloc(64)))
H5_JNI_FATAL_ERROR(ENVONLY, "h5str_sprintf: failed to allocate string buffer");
if ((obj = H5Rdereference2(container, H5P_DEFAULT, H5R_OBJECT, cptr)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (H5Oget_info2(obj, &oi, H5O_INFO_ALL) < 0)
H5_LIBRARY_ERROR(ENVONLY);
/* Print object data and close object */
if (HDsprintf(this_str, "%u-%lu", (unsigned) oi.type, oi.addr) < 0)
H5_JNI_FATAL_ERROR(ENVONLY, "h5str_sprintf: HDsprintf failure");
if (H5Oclose(obj) < 0)
H5_LIBRARY_ERROR(ENVONLY);
obj = H5I_INVALID_HID;
else if (H5Tequal(tid, H5T_STD_REF_DSETREG)) {
/* (H5R_DSET_REG_REF_BUF_SIZE == typeSize) */
H5_LIBRARY_ERROR(ENVONLY);
}
else if (H5Tequal(tid, H5T_STD_REF_OBJ)) {
/* (H5R_OBJ_REF_BUF_SIZE == typeSize) */
H5_LIBRARY_ERROR(ENVONLY);
}
break;
@@ -2204,20 +2261,28 @@ h5str_render_bin_output
case H5T_REFERENCE:
{
if (H5Tequal(tid, H5T_STD_REF_DSETREG)) {
if (H5Tequal(tid, H5T_STD_REF)) {
hid_t region_id = H5I_INVALID_HID;
hid_t region_space = H5I_INVALID_HID;
H5S_sel_type region_type;
hid_t region_id, region_space;
/* Region data */
for (block_index = 0; block_index < block_nelmts; block_index++) {
mem = ((unsigned char*)_mem) + block_index * size;
if ((region_id = H5Rdereference2(container, H5P_DEFAULT, H5R_DATASET_REGION, mem)) < 0)
if((region_id = H5Ropen_object((const H5R_ref_t *)mem, H5P_DEFAULT, H5P_DEFAULT)) < 0)
continue;
if ((region_space = H5Rget_region(container, H5R_DATASET_REGION, mem)) < 0) {
else {
if((region_space = H5Ropen_region((const H5R_ref_t *)mem, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
if (!h5str_is_zero(mem, H5Tget_size(H5T_STD_REF))) {
region_type = H5Sget_select_type(region_space);
if (region_type == H5S_SEL_POINTS)
ret_value = render_bin_output_region_points(stream, region_space, region_id, container);
else
ret_value = render_bin_output_region_blocks(stream, region_space, region_id, container);
}
H5Sclose(region_space);
} /* end if (region_space >= 0) */
H5Dclose(region_id);
continue;
}
if ((region_type = H5Sget_select_type(region_space)) < 0) {
@@ -2225,19 +2290,13 @@ h5str_render_bin_output
H5Dclose(region_id);
continue;
}
if (region_type == H5S_SEL_POINTS)
ret_value = render_bin_output_region_points(stream, region_space, region_id, container);
else
ret_value = render_bin_output_region_blocks(stream, region_space, region_id, container);
H5Sclose(region_space);
H5Dclose(region_id);
if (ret_value < 0)
break;
}
}
else if (H5Tequal(tid, H5T_STD_REF_DSETREG)) {
;
}
else if (H5Tequal(tid, H5T_STD_REF_OBJ)) {
;
}
@@ -3091,15 +3150,15 @@ done:
} /* end Java_hdf_hdf5lib_H5_H5Dcopy */
/*
/////////////////////////////////////////////////////////////////////////////////
//
//
// Add these methods so that we don't need to call H5Gget_objtype_by_idx
// in a loop to get information for all the objects in a group, which takes
// a lot of time to finish if the number of objects is more than 10,000
//
/////////////////////////////////////////////////////////////////////////////////
*/
* /////////////////////////////////////////////////////////////////////////////////
* //
* //
* // Add these methods so that we don't need to call H5Gget_objtype_by_idx
* // in a loop to get information for all the objects in a group, which takes
* // a lot of time to finish if the number of objects is more than 10,000
* //
* /////////////////////////////////////////////////////////////////////////////////
*/
#ifdef __cplusplus
herr_t obj_info_all(hid_t g_id, const char *name, const H5L_info_t *linfo, void *op_data);
+1
View File
@@ -40,6 +40,7 @@ extern void h5str_free(h5str_t *str);
extern void h5str_resize(h5str_t *str, size_t new_len);
extern char* h5str_append(h5str_t *str, const char* cstr);
extern size_t h5str_convert(JNIEnv *env, char **in_str, hid_t container, hid_t tid, void *out_buf, size_t out_buf_offset);
extern void h5str_sprint_reference(JNIEnv *env, h5str_t *out_str, hid_t container, void *ref_p);
extern size_t h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *in_buf, size_t in_buf_len, int expand_data);
extern void h5str_array_free(char **strs, size_t len);
extern int h5str_dump_simple_dset(JNIEnv *env, FILE *stream, hid_t dset, int binary_order);
+143
View File
@@ -22,12 +22,17 @@ import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Reader;
import java.io.StreamTokenizer;
import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
import org.junit.After;
import org.junit.Before;
@@ -50,6 +55,81 @@ public class TestH5 {
public void nextTestName() {
System.out.println();
}
private static final String H5_FILE = "testData.h5";
private static final String EXPORT_FILE = "testExport.txt";
private static final int DIM_X = 4;
private static final int DIM_Y = 6;
private static final int RANK = 2;
long H5fid = -1;
long H5dsid = -1;
long H5did = -1;
long[] H5dims = { DIM_X, DIM_Y };
private final void _deleteFile(String filename) {
File file = null;
try {
file = new File(filename);
}
catch (Throwable err) {}
if (file.exists()) {
try {file.delete();} catch (SecurityException e) {}
}
}
private final long _createDataset(long fid, long dsid, String name, long dapl) {
long did = -1;
try {
did = H5.H5Dcreate(fid, name, HDF5Constants.H5T_STD_I32BE, dsid,
HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, dapl);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Dcreate: " + err);
}
assertTrue("TestH5._createDataset: ", did > 0);
return did;
}
private final void _createH5File() {
try {
H5fid = H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_TRUNC,
HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
H5dsid = H5.H5Screate_simple(2, H5dims, null);
H5did = _createDataset(H5fid, H5dsid, "dset", HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
fail("TestH5Pfapl.createH5file: " + err);
}
assertTrue("TestH5.createH5file: H5.H5Fcreate: ", H5fid > 0);
assertTrue("TestH5.createH5file: H5.H5Screate_simple: ", H5dsid > 0);
assertTrue("TestH5.createH5file: _createDataset: ", H5did > 0);
try {
H5.H5Fflush(H5fid, HDF5Constants.H5F_SCOPE_LOCAL);
}
catch (Throwable err) {
err.printStackTrace();
}
}
public final void _closeH5File() throws HDF5LibraryException {
if (H5did >= 0)
try {H5.H5Dclose(H5did);} catch (Exception ex) {}
if (H5dsid > 0)
try {H5.H5Sclose(H5dsid);} catch (Exception ex) {}
if (H5fid > 0)
try {H5.H5Fclose(H5fid);} catch (Exception ex) {}
H5fid = -1;
H5dsid = -1;
H5did = -1;
}
public final void _deleteH5file() {
_deleteFile(H5_FILE);
}
/**
* Test method for {@link hdf.hdf5lib.H5#J2C(int)}.
@@ -268,4 +348,67 @@ public class TestH5 {
fail("Exception thrown during test: " + ex.toString());
}
}
@Test
public void testH5export_dataset() {
int[][] dset_data = new int[DIM_X][DIM_Y];
int[][] dset_indata = new int[DIM_X][DIM_Y];
int FILLVAL = 99;
_createH5File();
// Initialize the dataset.
for (int indx = 0; indx < DIM_X; indx++)
for (int jndx = 0; jndx < DIM_Y; jndx++)
dset_data[indx][jndx] = FILLVAL;
try {
if (H5did >= 0)
H5.H5Dwrite(H5did, HDF5Constants.H5T_NATIVE_INT,
HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
HDF5Constants.H5P_DEFAULT, dset_data[0]);
}
catch (Exception e) {
e.printStackTrace();
}
_closeH5File();
try {
H5.H5export_dataset(EXPORT_FILE, H5_FILE, "/dset", 99);
}
catch (HDF5LibraryException err) {
err.printStackTrace();
fail("H5export_dataset failed: " + err);
}
File file = new File(EXPORT_FILE);
try {
Reader reader = new FileReader(EXPORT_FILE);
StreamTokenizer streamTokenizer = new StreamTokenizer(reader);
int indx = 0;
int jndx = 0;
while(streamTokenizer.nextToken() != StreamTokenizer.TT_EOF){
if(streamTokenizer.ttype == StreamTokenizer.TT_NUMBER) {
dset_indata[indx][jndx] = (int)streamTokenizer.nval;
jndx++;
if (jndx >= DIM_Y) {
jndx = 0;
indx++;
}
}
}
reader.close();
}
catch (IOException err) {
err.printStackTrace();
fail("read file failed: " + err);
}
for(int row = 0; row < DIM_X; row++)
for(int col = 0; col < DIM_Y; col++) {
assertTrue("H5export_dataset: <"+row+","+col+">"+dset_indata[row][col]+"=99", dset_indata[row][col]==99);
}
// _deleteH5file();
}
}
+1 -1
View File
@@ -366,7 +366,7 @@ public class TestH5Edefault {
}
assertTrue("H5.H5Eset_current_stack: get_num #:" + num_msg, num_msg == saved_num_msg);
// Se the current stack to be the default and try that again
// Set the current stack to be the default and try that again
try {
H5.H5Eset_current_stack(stack_id);
num_msg = H5.H5Eget_num(HDF5Constants.H5E_DEFAULT);
+359 -12
View File
@@ -24,6 +24,7 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
import hdf.hdf5lib.exceptions.HDF5Exception;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
import hdf.hdf5lib.exceptions.HDF5FunctionArgumentException;
import org.junit.After;
import org.junit.Before;
@@ -42,6 +43,8 @@ public class TestH5R {
long H5gid = -1;
long H5did2 = -1;
long[] H5dims = { DIM_X, DIM_Y };
int[][] dset_data = new int[DIM_X][DIM_Y];
int FILLVAL = 99;
private final void _deleteFile(String filename) {
File file = null;
@@ -66,7 +69,7 @@ public class TestH5R {
err.printStackTrace();
fail("H5.H5Dcreate: " + err);
}
assertTrue("TestH5R._createDataset: ",did > 0);
assertTrue("TestH5R._createDataset: ", did > 0);
return did;
}
@@ -100,6 +103,21 @@ public class TestH5R {
H5did2 = _createDataset(H5gid, H5dsid, "dset2", HDF5Constants.H5P_DEFAULT);
H5did = _createDataset(H5fid, H5dsid, "dset", HDF5Constants.H5P_DEFAULT);
// Initialize the dataset.
for (int indx = 0; indx < DIM_X; indx++)
for (int jndx = 0; jndx < DIM_Y; jndx++)
dset_data[indx][jndx] = FILLVAL;
try {
if (H5did >= 0)
H5.H5Dwrite(H5did, HDF5Constants.H5T_NATIVE_INT,
HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL,
HDF5Constants.H5P_DEFAULT, dset_data[0]);
}
catch (Exception e) {
e.printStackTrace();
}
}
catch (Throwable err) {
err.printStackTrace();
@@ -129,13 +147,15 @@ public class TestH5R {
System.out.println();
}
// Test v1.8 APIs params
@Test
public void testH5Rget_name() {
long loc_id=H5fid;
int ref_type=HDF5Constants.H5R_OBJECT;
long ret_val=-1;
byte[] ref=null;
String[] name= {""};
long loc_id = H5fid;
int ref_type = HDF5Constants.H5R_OBJECT;
long ret_val = -1;
byte[] ref = null;
String[] name = {""};
String objName = "/dset";
try {
@@ -164,7 +184,7 @@ public class TestH5R {
byte[] ref=null;
String objName = "/dset";
int obj_type = -1;;
int obj_type = -1;
try {
ref = H5.H5Rcreate(H5fid, objName, ref_type, -1);
@@ -226,8 +246,8 @@ public class TestH5R {
group_id= H5.H5Rdereference(H5gid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5R_OBJECT, ref2);
assertNotNull(ref1);
assertNotNull(ref2);
assertTrue(dataset_id>=0);
assertTrue(group_id>=0);
assertTrue(dataset_id >= 0);
assertTrue(group_id >= 0);
}
catch (Throwable err) {
err.printStackTrace();
@@ -247,7 +267,7 @@ public class TestH5R {
ref = H5.H5Rcreate(H5fid, "/dset", HDF5Constants.H5R_DATASET_REGION, H5dsid);
dsid = H5.H5Rget_region(H5fid, HDF5Constants.H5R_DATASET_REGION, ref);
assertNotNull(ref);
assertTrue(dsid>=0);
assertTrue(dsid >= 0);
}
catch (Throwable err) {
err.printStackTrace();
@@ -261,7 +281,7 @@ public class TestH5R {
@Test(expected = IllegalArgumentException.class)
public void testH5Rget_name_Invalidreftype() throws Throwable {
byte[] ref = null;
String[] name= {""};
String[] name = {""};
ref = H5.H5Rcreate(H5fid, "/dset", HDF5Constants.H5R_OBJECT, -1);
H5.H5Rget_name(H5fid, HDF5Constants.H5R_DATASET_REGION, ref, name, 16);
}
@@ -269,7 +289,7 @@ public class TestH5R {
@Test(expected = NullPointerException.class)
public void testH5Rget_name_NULLreference() throws Throwable {
byte[] ref = null;
String[] name= {""};
String[] name = {""};
H5.H5Rget_name(H5fid, HDF5Constants.H5R_OBJECT, ref, name, 16);
}
@@ -330,4 +350,331 @@ public class TestH5R {
H5.H5Rdereference(H5gid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5R_OBJECT, ref1);
}
// Test v1.12 APIs params
@Test
public void testH5Rget_object() {
int ref_type = HDF5Constants.H5R_OBJECT2;
long ret_val = -1;
byte[] ref = null;
String name = "";
String objName = "/dset";
try {
ref = H5.H5Rcreate_object(H5fid, objName);
}
catch (Throwable err) {
err.printStackTrace();
fail("testH5Rget_object: H5Rcreate_object " + err);
}
try {
ret_val = H5.H5Rget_type(ref);
}
catch (Throwable err) {
err.printStackTrace();
fail("testH5Rget_object: H5Rget_type: " + err);
}
assertTrue("testH5Rget_object: H5Rget_type", ret_val == ref_type);
try {
name = H5.H5Rget_file_name(ref);
}
catch (Throwable err) {
err.printStackTrace();
fail("testH5Rget_object: H5Rget_file_name: " + err);
}
assertTrue("testH5Rget_object: H5Rget_file_name", H5_FILE.equals(name));
try {
name = H5.H5Rget_obj_name(ref, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
fail("testH5Rget_object: H5Rget_obj_name: " + err);
}
assertTrue("The name of the object: ", objName.equals(name));
}
@Test
public void testH5Rget_obj_type3() {
int obj_type = -1;
byte[] ref = null;
String objName = "/dset";
try {
ref = H5.H5Rcreate_object(H5fid, objName);
}
catch (Throwable err) {
err.printStackTrace();
fail("testH5Rget_obj_type3: H5Rcreate_object " + err);
}
try {
obj_type = H5.H5Rget_obj_type3(ref, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
err.printStackTrace();
fail("testH5Rget_obj_type3: H5.H5Rget_obj_type3: " + err);
}
assertEquals(obj_type, HDF5Constants.H5O_TYPE_DATASET);
}
@Test
public void testH5Rcreate_regionref_object() {
byte[] ref = null;
String objName = "/dset";
long start[] = {2,2}; // Starting location of hyperslab
long stride[] = {1,1}; // Stride of hyperslab
long count[] = {1,1}; // Element count of hyperslab
long block[] = {3,3}; // Block size of hyperslab
// Select 3x3 hyperslab for reference
try {
H5.H5Sselect_hyperslab(H5dsid, HDF5Constants.H5S_SELECT_SET, start, stride, count, block);
}
catch (Throwable err) {
err.printStackTrace();
fail("testH5Rget_object: H5Sselect_hyperslab " + err);
}
try {
ref = H5.H5Rcreate_region(H5fid, objName, H5dsid);
}
catch (Throwable err) {
err.printStackTrace();
fail("testH5Rget_object: H5Rcreate_region " + err);
}
assertNotNull(ref);
}
// @Test//
// public void testH5Rget_group() {
// long loc_id = H5fid;
// int ref_type = HDF5Constants.H5R_OBJECT2;
// long ret_val = -1;
// byte[] ref = null;
// String name = "";
// String objName = "/dset";
//
// try {
// ref = H5.H5Rcreate_object(H5fid, objName);
// }
// catch (Throwable err) {
// err.printStackTrace();
// fail("testH5Rget_object: H5Rcreate_object " + err);
// }
// try {
// dataset_id= H5.H5Rdereference(H5fid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5R_DATASET_REGION, ref1);
//
// //Create reference on group
// ref2 = H5.H5Rcreate(H5gid, "/Group1", HDF5Constants.H5R_OBJECT, -1);
// group_id= H5.H5Rdereference(H5gid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5R_OBJECT, ref2);
// assertNotNull(ref1);
// assertNotNull(ref2);
// assertTrue(dataset_id >= 0);
// assertTrue(group_id >= 0);
// }
// catch (Throwable err) {
// err.printStackTrace();
// fail("TestH5Rdereference " + err);
// }
// finally {
// try {H5.H5Dclose(dataset_id);} catch (Exception ex) {}
// try {H5.H5Gclose(group_id);} catch (Exception ex) {}
// }
// }
// @Test//
// public void testH5Rget_region_dataset() {
// long loc_id = H5fid;
// int ref_type = HDF5Constants.H5R_OBJECT2;
// long ret_val = -1;
// byte[] ref = null;
// String name = "";
// String objName = "/dset";
//
// try {
// ref = H5.H5Rcreate_object(H5fid, objName);
// }
// catch (Throwable err) {
// err.printStackTrace();
// fail("testH5Rget_object: H5Rcreate_object " + err);
// }
// try {
// dsid = H5.H5Rget_region(H5fid, HDF5Constants.H5R_DATASET_REGION, ref);
// assertNotNull(ref);
// assertTrue(dsid >= 0);
// }
// catch (Throwable err) {
// err.printStackTrace();
// fail("TestH5Rget_region: " + err);
// }
// finally {
// try {H5.H5Sclose(dsid);} catch (Exception ex) {}
// }
// }
// @Test//
// public void testH5Rget_attr() {
// long loc_id = H5fid;
// int ref_type = HDF5Constants.H5R_OBJECT2;
// long ret_val = -1;
// byte[] ref = null;
// String name = "";
// String objName = "/dset";
//
// try {
// ref = H5.H5Rcreate_object(H5fid, objName);
// }
// catch (Throwable err) {
// err.printStackTrace();
// fail("testH5Rget_object: H5Rcreate_object " + err);
// }
// try {
// dsid = H5.H5Rget_region(H5fid, HDF5Constants.H5R_DATASET_REGION, ref);
// assertNotNull(ref);
// assertTrue(dsid >= 0);
// }
// catch (Throwable err) {
// err.printStackTrace();
// fail("TestH5Rget_region: " + err);
// }
// finally {
// try {H5.H5Sclose(dsid);} catch (Exception ex) {}
// }
// }
// Test parameters to H5Rcreate_object
@Test(expected = NullPointerException.class)
public void testH5Rcreate_object_Nullname() throws Throwable {
String name = null;
H5.H5Rcreate_object(H5fid, name);
}
@Test(expected = HDF5FunctionArgumentException.class)
public void testH5Rget_name_Invalidloc() throws Throwable {
String name= "";
H5.H5Rcreate_object(-1, name);
}
// Test parameters to H5Rcreate_region
@Test(expected = NullPointerException.class)
public void testH5Rcreate_region_Nullname() throws Throwable {
String name = null;
H5.H5Rcreate_region(H5fid, name, -1);
}
@Test(expected = HDF5FunctionArgumentException.class)
public void testH5Rcreate_region_Invalidloc() throws Throwable {
String name= "";
H5.H5Rcreate_region(-1, name, -1);
}
// Test parameters to H5Rcreate_attr
@Test(expected = NullPointerException.class)
public void testH5Rcreate_attr_Nullname() throws Throwable {
String name = null;
String attrname = "";
H5.H5Rcreate_attr(H5fid, name, attrname);
}
@Test(expected = NullPointerException.class)
public void testH5Rcreate_attr_Nullattrname() throws Throwable {
String name = "";
String attrname = null;
H5.H5Rcreate_attr(H5fid, name, attrname);
}
@Test(expected = HDF5FunctionArgumentException.class)
public void testH5Rcreate_attr_Invalidloc() throws Throwable {
String name= "";
String attrname= "";
H5.H5Rcreate_attr(-1, name, attrname);
}
// Test parameters to H5Rdestroy
@Test(expected = NullPointerException.class)
public void testH5Rdestroy_Nullref() throws Throwable {
byte[] ref = null;
H5.H5Rdestroy(ref);
}
// Test parameters to H5Rget_type
@Test(expected = NullPointerException.class)
public void testH5Rget_type_Nullref() throws Throwable {
byte[] ref = null;
H5.H5Rget_type(ref);
}
// Test parameters to H5Requal
@Test(expected = NullPointerException.class)
public void testH5Requal_Nullref1() throws Throwable {
byte[] ref1 = null;
byte[] ref2 = {0,0,0,0};
H5.H5Requal(ref1, ref2);
}
@Test(expected = NullPointerException.class)
public void testH5Requal_Nullref2() throws Throwable {
byte[] ref1 = {0,0,0,0};
byte[] ref2 = null;
H5.H5Requal(ref1, ref2);
}
// Test parameters to H5Rcopy
@Test(expected = NullPointerException.class)
public void testH5Rcopy_Nullref1() throws Throwable {
byte[] ref1 = null;
byte[] ref2 = H5.H5Rcopy(ref1);
}
// Test parameters to H5Ropen_object
@Test(expected = NullPointerException.class)
public void testH5Ropen_object_Nullref() throws Throwable {
byte[] ref = null;
H5.H5Ropen_object(ref, -1, -1);
}
// Test parameters to H5Ropen_region
@Test(expected = NullPointerException.class)
public void testH5Ropen_region_Nullref() throws Throwable {
byte[] ref = null;
H5.H5Ropen_region(ref, -1, -1);
}
// Test parameters to H5Ropen_attr
@Test(expected = NullPointerException.class)
public void testH5Ropen_attr_Nullref() throws Throwable {
byte[] ref = null;
H5.H5Ropen_attr(ref, -1, -1);
}
// Test parameters to H5Rget_obj_type3
@Test(expected = NullPointerException.class)
public void testH5Rget_obj_type3_Nullref() throws Throwable {
byte[] ref = null;
H5.H5Rget_obj_type3(ref, -1);
}
// Test parameters to H5Rget_file_name
@Test(expected = NullPointerException.class)
public void testH5Rget_file_name_Nullref() throws Throwable {
byte[] ref = null;
H5.H5Rget_file_name(ref);
}
// Test parameters to H5Rget_obj_name
@Test(expected = NullPointerException.class)
public void testH5Rget_obj_name_Nullref() throws Throwable {
byte[] ref = null;
H5.H5Rget_obj_name(ref, -1);
}
// Test parameters to H5Rget_attr_name
@Test(expected = NullPointerException.class)
public void testH5Rget_attr_name_Nullref() throws Throwable {
byte[] ref = null;
H5.H5Rget_attr_name(ref);
}
}
+23 -1
View File
@@ -1,8 +1,14 @@
JUnit version 4.11
.testH5Ropen_attr_Nullref
.testH5Rgetregion_Nullreference
.testH5Rget_obj_type2_Invalidreftype
.testH5Rdereference
.testH5Rget_attr_name_Nullref
.testH5Ropen_region_Nullref
.testH5Requal_Nullref1
.testH5Requal_Nullref2
.testH5Rget_name
.testH5Rget_object
.testH5Rcreate_Invalidreftype
.testH5Rget_name_NULLreference
.testH5Rget_region
@@ -11,13 +17,29 @@ JUnit version 4.11
.testH5Rcreate_Invalidspace_id
.testH5Rdereference_Invalidreference
.testH5Rgetregion_Badreferencetype
.testH5Rget_obj_type3_Nullref
.testH5Rcreate_regionrefobj
.testH5Ropen_object_Nullref
.testH5Rdestroy_Nullref
.testH5Rget_name_Invalidreftype
.testH5Rgetregion_Invalidreftype
.testH5Rcreate_object_Nullname
.testH5Rget_obj_type2
.testH5Rget_obj_type3
.testH5Rget_name_Invalidloc
.testH5Rcopy_Nullref1
.testH5Rcreate_attr_Invalidloc
.testH5Rcreate_InvalidObjectName
.testH5Rget_file_name_Nullref
.testH5Rget_obj_name_Nullref
.testH5Rcreate_region_Nullname
.testH5Rcreate_regionref_object
.testH5Rcreate_attr_Nullattrname
.testH5Rcreate_region_Invalidloc
.testH5Rget_type_Nullref
.testH5Rcreate_attr_Nullname
Time: XXXX
OK (17 tests)
OK (39 tests)
+2 -2
View File
@@ -38,7 +38,7 @@ if (NOT ONLY_SHARED_LIBS)
PRIVATE "${HDF5_TOOLS_LIB_SOURCE_DIR};${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
#target_compile_definitions(${HDF5_TOOLS_LIB_TARGET} PRIVATE H5DIFF_DEBUG>)
#target_compile_definitions(${HDF5_TOOLS_LIB_TARGET} PRIVATE H5_TOOLS_DEBUG)
TARGET_C_PROPERTIES (${HDF5_TOOLS_LIB_TARGET} STATIC)
target_link_libraries (${HDF5_TOOLS_LIB_TARGET}
PUBLIC ${HDF5_LIB_TARGET}
@@ -58,7 +58,7 @@ if (BUILD_SHARED_LIBS)
)
target_compile_definitions(${HDF5_TOOLS_LIBSH_TARGET}
PUBLIC "H5_BUILT_AS_DYNAMIC_LIB"
#PRIVATE H5DIFF_DEBUG
#PRIVATE H5_TOOLS_DEBUG
)
TARGET_C_PROPERTIES (${HDF5_TOOLS_LIBSH_TARGET} SHARED)
target_link_libraries (${HDF5_TOOLS_LIBSH_TARGET}
+43 -43
View File
@@ -280,7 +280,7 @@ build_match_list (const char *objname1, trav_info_t *info1, const char *objname2
/* init */
trav_table_init(&table);
if (table == NULL) {
H5TOOLS_INFO(H5E_tools_min_id_g, "Cannot create traverse table");
H5TOOLS_INFO(H5E_tools_min_info_id_g, "Cannot create traverse table");
HGOTO_DONE(-1);
}
/*
@@ -440,7 +440,7 @@ trav_grp_symlinks(const char *path, const H5L_info_t *linfo, void *udata)
trav_grp_objs,trav_grp_symlinks, tinfo, H5O_INFO_BASIC) < 0) {
parallel_print("Error: Could not get file contents\n");
opts->err_stat = 1;
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Error: Could not get file contents");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "Error: Could not get file contents");
}
break;
@@ -472,7 +472,7 @@ trav_grp_symlinks(const char *path, const H5L_info_t *linfo, void *udata)
trav_grp_objs,trav_grp_symlinks, tinfo, H5O_INFO_BASIC) < 0) {
parallel_print("Error: Could not get file contents\n");
opts->err_stat = 1;
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Error: Could not get file contents\n");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "Error: Could not get file contents\n");
}
break;
@@ -482,7 +482,7 @@ trav_grp_symlinks(const char *path, const H5L_info_t *linfo, void *udata)
default:
parallel_print("Error: Invalid link type\n");
opts->err_stat = 1;
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Error: Invalid link type");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "Error: Invalid link type");
break;
} /* end of switch */
@@ -564,14 +564,14 @@ h5diff(const char *fname1,
/* open file 1 */
if((file1_id = h5tools_fopen(fname1, H5F_ACC_RDONLY, H5P_DEFAULT, NULL, NULL, (size_t)0)) < 0) {
parallel_print("h5diff: <%s>: unable to open file\n", fname1);
HGOTO_ERROR(1, H5E_tools_min_id_g, "<%s>: unable to open file\n", fname1);
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "<%s>: unable to open file\n", fname1);
} /* end if */
/* open file 2 */
if((file2_id = h5tools_fopen(fname2, H5F_ACC_RDONLY, H5P_DEFAULT, NULL, NULL, (size_t)0)) < 0) {
parallel_print("h5diff: <%s>: unable to open file\n", fname2);
HGOTO_ERROR(1, H5E_tools_min_id_g, "<%s>: unable to open file\n", fname2);
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "<%s>: unable to open file\n", fname2);
} /* end if */
/*-------------------------------------------------------------------------
@@ -589,11 +589,11 @@ h5diff(const char *fname1,
#ifdef H5_HAVE_ASPRINTF
/* Use the asprintf() routine, since it does what we're trying to do below */
if(HDasprintf(&obj1fullname, "/%s", objname1) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "name buffer allocation failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "name buffer allocation failed");
#else /* H5_HAVE_ASPRINTF */
/* (malloc 2 more for "/" and end-of-line) */
if ((obj1fullname = (char*)HDmalloc(HDstrlen(objname1) + 2)) == NULL)
HGOTO_ERROR(1, H5E_tools_min_id_g, "name buffer allocation failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "name buffer allocation failed");
HDstrcpy(obj1fullname, "/");
HDstrcat(obj1fullname, objname1);
@@ -607,11 +607,11 @@ h5diff(const char *fname1,
#ifdef H5_HAVE_ASPRINTF
/* Use the asprintf() routine, since it does what we're trying to do below */
if(HDasprintf(&obj2fullname, "/%s", objname2) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "name buffer allocation failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "name buffer allocation failed");
#else /* H5_HAVE_ASPRINTF */
/* (malloc 2 more for "/" and end-of-line) */
if ((obj2fullname = (char*)HDmalloc(HDstrlen(objname2) + 2)) == NULL)
HGOTO_ERROR(1, H5E_tools_min_id_g, "name buffer allocation failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "name buffer allocation failed");
HDstrcpy(obj2fullname, "/");
HDstrcat(obj2fullname, objname2);
#endif /* H5_HAVE_ASPRINTF */
@@ -630,12 +630,12 @@ h5diff(const char *fname1,
/* check if link itself exist */
if(H5Lexists(file1_id, obj1fullname, H5P_DEFAULT) <= 0) {
parallel_print ("Object <%s> could not be found in <%s>\n", obj1fullname, fname1);
HGOTO_ERROR(1, H5E_tools_min_id_g, "Error: Object could not be found");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "Error: Object could not be found");
}
/* get info from link */
if(H5Lget_info(file1_id, obj1fullname, &src_linfo1, H5P_DEFAULT) < 0) {
parallel_print("Unable to get link info from <%s>\n", obj1fullname);
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Lget_info failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Lget_info failed");
}
info1_lp = info1_obj;
@@ -651,7 +651,7 @@ h5diff(const char *fname1,
if(H5Oget_info_by_name2(file1_id, obj1fullname, &oinfo1, H5O_INFO_BASIC, H5P_DEFAULT) < 0) {
parallel_print("Error: Could not get file contents\n");
HGOTO_ERROR(1, H5E_tools_min_id_g, "Error: Could not get file contents");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "Error: Could not get file contents");
}
obj1type = (h5trav_type_t)oinfo1.type;
trav_info_add(info1_obj, obj1fullname, obj1type);
@@ -680,12 +680,12 @@ h5diff(const char *fname1,
/* check if link itself exist */
if(H5Lexists(file2_id, obj2fullname, H5P_DEFAULT) <= 0) {
parallel_print ("Object <%s> could not be found in <%s>\n", obj2fullname, fname2);
HGOTO_ERROR(1, H5E_tools_min_id_g, "Error: Object could not be found");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "Error: Object could not be found");
}
/* get info from link */
if(H5Lget_info(file2_id, obj2fullname, &src_linfo2, H5P_DEFAULT) < 0) {
parallel_print("Unable to get link info from <%s>\n", obj2fullname);
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Lget_info failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Lget_info failed");
}
info2_lp = info2_obj;
@@ -701,7 +701,7 @@ h5diff(const char *fname1,
if(H5Oget_info_by_name2(file2_id, obj2fullname, &oinfo2, H5O_INFO_BASIC, H5P_DEFAULT) < 0) {
parallel_print("Error: Could not get file contents\n");
HGOTO_ERROR(1, H5E_tools_min_id_g, "Error: Could not get file contents");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "Error: Could not get file contents");
}
obj2type = (h5trav_type_t)oinfo2.type;
trav_info_add(info2_obj, obj2fullname, obj2type);
@@ -753,7 +753,7 @@ h5diff(const char *fname1,
/* treat dangling link as error */
if(opts->m_verbose)
parallel_print("Warning: <%s> is a dangling link.\n", obj1fullname);
HGOTO_ERROR(1, H5E_tools_min_id_g, "treat dangling link as error");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "treat dangling link as error");
}
else {
if(opts->m_verbose)
@@ -767,7 +767,7 @@ h5diff(const char *fname1,
}
else if(l_ret1 < 0) { /* fail */
parallel_print ("Object <%s> could not be found in <%s>\n", obj1fullname, fname1);
HGOTO_ERROR(1, H5E_tools_min_id_g, "Object could not be found");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "Object could not be found");
}
else if(l_ret1 != 2) { /* symbolic link */
obj1type = (h5trav_type_t)trg_linfo1.trg_type;
@@ -794,7 +794,7 @@ h5diff(const char *fname1,
/* treat dangling link as error */
if(opts->m_verbose)
parallel_print("Warning: <%s> is a dangling link.\n", obj2fullname);
HGOTO_ERROR(1, H5E_tools_min_id_g, "treat dangling link as error");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "treat dangling link as error");
}
else {
if(opts->m_verbose)
@@ -808,7 +808,7 @@ h5diff(const char *fname1,
}
else if(l_ret2 < 0) { /* fail */
parallel_print ("Object <%s> could not be found in <%s>\n", obj2fullname, fname2);
HGOTO_ERROR(1, H5E_tools_min_id_g, "Object could not be found");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "Object could not be found");
}
else if(l_ret2 != 2) { /* symbolic link */
obj2type = (h5trav_type_t)trg_linfo2.trg_type;
@@ -852,7 +852,7 @@ h5diff(const char *fname1,
if(h5trav_visit(file1_id, obj1fullname, TRUE, TRUE,
trav_grp_objs, trav_grp_symlinks, info1_grp, H5O_INFO_BASIC) < 0) {
parallel_print("Error: Could not get file contents\n");
HGOTO_ERROR(1, H5E_tools_min_id_g, "Could not get file contents");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "Could not get file contents");
}
info1_lp = info1_grp;
@@ -866,7 +866,7 @@ h5diff(const char *fname1,
if(h5trav_visit(file2_id, obj2fullname, TRUE, TRUE,
trav_grp_objs, trav_grp_symlinks, info2_grp, H5O_INFO_BASIC) < 0) {
parallel_print("Error: Could not get file contents\n");
HGOTO_ERROR(1, H5E_tools_min_id_g, "Could not get file contents");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "Could not get file contents");
} /* end if */
info2_lp = info2_grp;
}
@@ -1055,11 +1055,11 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1,
#ifdef H5_HAVE_ASPRINTF
/* Use the asprintf() routine, since it does what we're trying to do below */
if(HDasprintf(&obj1_fullpath, "%s%s", grp1_path, table->objs[i].name) < 0) {
HERROR(1, H5E_tools_min_id_g, "name buffer allocation failed");
H5TOOLS_ERROR(1, H5E_tools_min_id_g, "name buffer allocation failed");
}
#else /* H5_HAVE_ASPRINTF */
if((obj1_fullpath = (char*)HDmalloc(HDstrlen(grp1_path) + HDstrlen(table->objs[i].name) + 1)) == NULL) {
HERROR(1, H5E_tools_min_id_g, "name buffer allocation failed");
H5TOOLS_ERROR(1, H5E_tools_min_id_g, "name buffer allocation failed");
}
else {
HDstrcpy(obj1_fullpath, grp1_path);
@@ -1072,11 +1072,11 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1,
#ifdef H5_HAVE_ASPRINTF
/* Use the asprintf() routine, since it does what we're trying to do below */
if(HDasprintf(&obj2_fullpath, "%s%s", grp2_path, table->objs[i].name) < 0) {
HERROR(1, H5E_tools_min_id_g, "name buffer allocation failed");
H5TOOLS_ERROR(1, H5E_tools_min_id_g, "name buffer allocation failed");
}
#else /* H5_HAVE_ASPRINTF */
if((obj2_fullpath = (char*)HDmalloc(HDstrlen(grp2_path) + HDstrlen(table->objs[i].name) + 1)) == NULL) {
HERROR(1, H5E_tools_min_id_g, "name buffer allocation failed");
H5TOOLS_ERROR(1, H5E_tools_min_id_g, "name buffer allocation failed");
}
else {
HDstrcpy(obj2_fullpath, grp2_path);
@@ -1416,7 +1416,7 @@ diff(hid_t file1_id,
/* target object1 - get type and name */
if ((status = H5tools_get_symlink_info(file1_id, path1, &linkinfo1, opts->follow_links)) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5tools_get_symlink_info failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5tools_get_symlink_info failed");
/* dangling link */
if (status == 0) {
@@ -1424,7 +1424,7 @@ diff(hid_t file1_id,
/* dangling link is error */
if(opts->m_verbose)
parallel_print("Warning: <%s> is a dangling link.\n", path1);
HGOTO_ERROR(1, H5E_tools_min_id_g, "dangling link is error");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "dangling link is error");
}
else
is_dangle_link1 = TRUE;
@@ -1432,14 +1432,14 @@ diff(hid_t file1_id,
/* target object2 - get type and name */
if ((status = H5tools_get_symlink_info(file2_id, path2, &linkinfo2, opts->follow_links)) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5tools_get_symlink_info failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5tools_get_symlink_info failed");
/* dangling link */
if (status == 0) {
if (opts->no_dangle_links) {
/* dangling link is error */
if(opts->m_verbose)
parallel_print("Warning: <%s> is a dangling link.\n", path2);
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "dangling link is error");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "dangling link is error");
}
else
is_dangle_link2 = TRUE;
@@ -1534,9 +1534,9 @@ diff(hid_t file1_id,
*/
case H5TRAV_TYPE_DATASET:
if((dset1_id = H5Dopen2(file1_id, path1, H5P_DEFAULT)) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dopen2 failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Dopen2 failed");
if((dset2_id = H5Dopen2(file2_id, path2, H5P_DEFAULT)) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dopen2 failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Dopen2 failed");
/* verbose (-v) and report (-r) mode */
if(opts->m_verbose || opts->m_report) {
do_print_objname("dataset", path1, path2, opts);
@@ -1569,9 +1569,9 @@ diff(hid_t file1_id,
if(H5Dclose(dset1_id) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dclose failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Dclose failed");
if(H5Dclose(dset2_id) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dclose failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Dclose failed");
break;
/*----------------------------------------------------------------------
@@ -1580,12 +1580,12 @@ diff(hid_t file1_id,
*/
case H5TRAV_TYPE_NAMED_DATATYPE:
if((type1_id = H5Topen2(file1_id, path1, H5P_DEFAULT)) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Topen2 failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Topen2 failed");
if((type2_id = H5Topen2(file2_id, path2, H5P_DEFAULT)) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Topen2 failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Topen2 failed");
if((status = H5Tequal(type1_id, type2_id)) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Tequal failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Tequal failed");
/* if H5Tequal is > 0 then the datatypes refer to the same datatype */
nfound = (status > 0) ? 0 : 1;
@@ -1607,9 +1607,9 @@ diff(hid_t file1_id,
nfound += diff_attr(type1_id, type2_id, path1, path2, opts);
if(H5Tclose(type1_id) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Tclose failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Tclose failed");
if(H5Tclose(type2_id) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Tclose failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Tclose failed");
break;
/*----------------------------------------------------------------------
@@ -1625,9 +1625,9 @@ diff(hid_t file1_id,
print_found(nfound);
if((grp1_id = H5Gopen2(file1_id, path1, H5P_DEFAULT)) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Gclose failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Gclose failed");
if((grp2_id = H5Gopen2(file2_id, path2, H5P_DEFAULT)) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Gclose failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Gclose failed");
/*-----------------------------------------------------------------
* compare attributes
@@ -1639,9 +1639,9 @@ diff(hid_t file1_id,
nfound += diff_attr(grp1_id, grp2_id, path1, path2, opts);
if(H5Gclose(grp1_id) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Gclose failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Gclose failed");
if(H5Gclose(grp2_id) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Gclose failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Gclose failed");
break;
+23 -17
View File
@@ -472,7 +472,7 @@ static hsize_t diff_datum(
case H5T_TIME:
case H5T_NCLASSES:
default:
HGOTO_ERROR(1, H5E_tools_min_id_g, "Invalid type class");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "Invalid type class");
break;
/*-------------------------------------------------------------------------
@@ -735,7 +735,12 @@ static hsize_t diff_datum(
hid_t obj1_id = -1;
hid_t obj2_id = -1;
if (type_size == H5R_DSET_REG_REF_BUF_SIZE) {
if (H5Tequal(m_type, H5T_STD_REF)) {
/* if (type_size == H5R_STD_REF_SIZE) */
H5TOOLS_INFO(H5E_tools_min_info_id_g, "NEW reference type");
}
else if (H5Tequal(m_type, H5T_STD_REF_DSETREG)) {
/* if (type_size == H5R_DSET_REG_REF_BUF_SIZE) */
hid_t region1_id = -1;
hid_t region2_id = -1;
@@ -769,7 +774,8 @@ static hsize_t diff_datum(
* Object references. get the type and OID of the referenced object
*-------------------------------------------------------------------------
*/
else if (type_size == H5R_OBJ_REF_BUF_SIZE) {
else if (H5Tequal(m_type, H5T_STD_REF_OBJ)) {
/* if (type_size == H5R_OBJ_REF_BUF_SIZE) */
H5O_type_t obj1_type;
H5O_type_t obj2_type;
@@ -853,7 +859,7 @@ static hsize_t diff_datum(
char temp2_char;
if(type_size != sizeof(char))
HGOTO_ERROR(1, H5E_tools_min_id_g, "Type size is not char size");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "Type size is not char size");
HDmemcpy(&temp1_char, mem1, sizeof(char));
HDmemcpy(&temp2_char, mem2, sizeof(char));
/* -d and !-p */
@@ -928,7 +934,7 @@ static hsize_t diff_datum(
unsigned char temp2_uchar;
if(type_size != sizeof(unsigned char))
HGOTO_ERROR(1, H5E_tools_min_id_g, "Type size is not unsigned char size");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "Type size is not unsigned char size");
HDmemcpy(&temp1_uchar, mem1, sizeof(unsigned char));
HDmemcpy(&temp2_uchar, mem2, sizeof(unsigned char));
@@ -1004,7 +1010,7 @@ static hsize_t diff_datum(
short temp2_short;
if(type_size != sizeof(short))
HGOTO_ERROR(1, H5E_tools_min_id_g, "Type size is not short size");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "Type size is not short size");
HDmemcpy(&temp1_short, mem1, sizeof(short));
HDmemcpy(&temp2_short, mem2, sizeof(short));
@@ -1080,7 +1086,7 @@ static hsize_t diff_datum(
unsigned short temp2_ushort;
if(type_size != sizeof(unsigned short))
HGOTO_ERROR(1, H5E_tools_min_id_g, "Type size is not unsigned short size");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "Type size is not unsigned short size");
HDmemcpy(&temp1_ushort, mem1, sizeof(unsigned short));
HDmemcpy(&temp2_ushort, mem2, sizeof(unsigned short));
@@ -1156,7 +1162,7 @@ static hsize_t diff_datum(
int temp2_int;
if(type_size != sizeof(int))
HGOTO_ERROR(1, H5E_tools_min_id_g, "Type size is not int size");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "Type size is not int size");
HDmemcpy(&temp1_int, mem1, sizeof(int));
HDmemcpy(&temp2_int, mem2, sizeof(int));
@@ -1232,7 +1238,7 @@ static hsize_t diff_datum(
unsigned int temp2_uint;
if(type_size != sizeof(unsigned int))
HGOTO_ERROR(1, H5E_tools_min_id_g, "Type size is not unsigned int size");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "Type size is not unsigned int size");
HDmemcpy(&temp1_uint, mem1, sizeof(unsigned int));
HDmemcpy(&temp2_uint, mem2, sizeof(unsigned int));
@@ -1308,7 +1314,7 @@ static hsize_t diff_datum(
long temp2_long;
if(type_size != sizeof(long))
HGOTO_ERROR(1, H5E_tools_min_id_g, "Type size is not long size");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "Type size is not long size");
HDmemcpy(&temp1_long, mem1, sizeof(long));
HDmemcpy(&temp2_long, mem2, sizeof(long));
@@ -1384,7 +1390,7 @@ static hsize_t diff_datum(
unsigned long temp2_ulong;
if(type_size != sizeof(unsigned long))
HGOTO_ERROR(1, H5E_tools_min_id_g, "Type size is not unsigned long size");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "Type size is not unsigned long size");
HDmemcpy(&temp1_ulong, mem1, sizeof(unsigned long));
HDmemcpy(&temp2_ulong, mem2, sizeof(unsigned long));
@@ -1468,7 +1474,7 @@ static hsize_t diff_datum(
hbool_t isnan2 = FALSE;
if(type_size != sizeof(float))
HGOTO_ERROR(1, H5E_tools_min_id_g, "Type size is not float size");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "Type size is not float size");
HDmemcpy(&temp1_float, mem1, sizeof(float));
HDmemcpy(&temp2_float, mem2, sizeof(float));
@@ -1627,7 +1633,7 @@ static hsize_t diff_datum(
hbool_t isnan2 = FALSE;
if(type_size != sizeof(double))
HGOTO_ERROR(1, H5E_tools_min_id_g, "Type size is not double size");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "Type size is not double size");
HDmemcpy(&temp1_double, mem1, sizeof(double));
HDmemcpy(&temp2_double, mem2, sizeof(double));
@@ -1786,7 +1792,7 @@ static hsize_t diff_datum(
hbool_t isnan2 = FALSE;
if(type_size != sizeof(long double)) {
HGOTO_ERROR(1, H5E_tools_min_id_g, "Type size is not long double size");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "Type size is not long double size");
}
HDmemcpy(&temp1_double, mem1, sizeof(long double));
@@ -4242,18 +4248,18 @@ int ull2float(unsigned long long ull_value, float *f_value)
h5difftrace("ull2float start\n");
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcreate failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcreate failed");
src_size = H5Tget_size(H5T_NATIVE_ULLONG);
dst_size = H5Tget_size(H5T_NATIVE_FLOAT);
if((buf = (unsigned char*) HDcalloc((size_t )1, MAX(src_size, dst_size))) == NULL)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for dims");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for dims");
HDmemcpy(buf, &ull_value, src_size);
/* do conversion */
if (H5Tconvert(H5T_NATIVE_ULLONG, H5T_NATIVE_FLOAT, (size_t) 1, buf, NULL, dxpl_id) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tconvert failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tconvert failed");
HDmemcpy(f_value, buf, dst_size);
+44 -44
View File
@@ -155,13 +155,13 @@ static herr_t build_match_list_attrs(hid_t loc1_id, hid_t loc2_id, table_attrs_t
h5difftrace("build_match_list_attrs start\n");
if(H5Oget_info2(loc1_id, &oinfo1, H5O_INFO_NUM_ATTRS) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Oget_info first object failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Oget_info first object failed");
if(H5Oget_info2(loc2_id, &oinfo2, H5O_INFO_NUM_ATTRS) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Oget_info second object failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Oget_info second object failed");
table_attrs_init(&table_lp);
if (table_lp == NULL)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Table allocation failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "Table allocation failed");
/*--------------------------------------------------
* build the list
@@ -173,18 +173,18 @@ static herr_t build_match_list_attrs(hid_t loc1_id, hid_t loc2_id, table_attrs_t
/*------------------
* open attribute1 */
if((attr1_id = H5Aopen_by_idx(loc1_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)curr1, H5P_DEFAULT, H5P_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aopen_by_idx first attribute failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aopen_by_idx first attribute failed");
/* get name */
if(H5Aget_name(attr1_id, (size_t)ATTR_NAME_MAX, name1) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aget_name first attribute failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aget_name first attribute failed");
/*------------------
* open attribute2 */
if((attr2_id = H5Aopen_by_idx(loc2_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)curr2, H5P_DEFAULT, H5P_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aopen_by_idx second attribute failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aopen_by_idx second attribute failed");
/* get name */
if(H5Aget_name(attr2_id, (size_t)ATTR_NAME_MAX, name2) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aget_name second attribute failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aget_name second attribute failed");
/* criteria is string compare */
cmp = HDstrcmp(name1, name2);
@@ -227,10 +227,10 @@ static herr_t build_match_list_attrs(hid_t loc1_id, hid_t loc2_id, table_attrs_t
/*------------------
* open attribute1 */
if((attr1_id = H5Aopen_by_idx(loc1_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)curr1, H5P_DEFAULT, H5P_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aopen_by_idx first attribute failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aopen_by_idx first attribute failed");
/* get name */
if(H5Aget_name(attr1_id, (size_t)ATTR_NAME_MAX, name1) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aget_name first attribute failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aget_name first attribute failed");
h5diffdebug2("build_match_list_attrs #1 name - %s\n", name1);
table_attr_mark_exist(infile, name1, table_lp);
@@ -250,10 +250,10 @@ static herr_t build_match_list_attrs(hid_t loc1_id, hid_t loc2_id, table_attrs_t
/*------------------
* open attribute2 */
if((attr2_id = H5Aopen_by_idx(loc2_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)curr2, H5P_DEFAULT, H5P_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aopen_by_idx second attribute failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aopen_by_idx second attribute failed");
/* get name */
if(H5Aget_name(attr2_id, (size_t)ATTR_NAME_MAX, name2) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aget_name second attribute failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aget_name second attribute failed");
h5diffdebug2("build_match_list_attrs #2 name - %s\n", name2);
table_attr_mark_exist(infile, name2, table_lp);
@@ -351,7 +351,7 @@ hsize_t diff_attr(hid_t loc1_id,
h5difftrace("diff_attr start\n");
if(build_match_list_attrs(loc1_id, loc2_id, &match_list_attrs, opts) < 0) {
HGOTO_ERROR(1, H5E_tools_min_id_g, "build_match_list_attrs failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "build_match_list_attrs failed");
}
h5diffdebug2("build_match_list_attrs - errstat:%d\n", opts->err_stat);
@@ -372,40 +372,40 @@ hsize_t diff_attr(hid_t loc1_id,
/*--------------
* attribute 1 */
if((attr1_id = H5Aopen(loc1_id, name1, H5P_DEFAULT)) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aopen first attribute failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Aopen first attribute failed");
/*--------------
* attribute 2 */
if((attr2_id = H5Aopen(loc2_id, name2, H5P_DEFAULT)) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aopen second attribute failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Aopen second attribute failed");
h5difftrace("diff_attr got attributes\n");
/* get the datatypes */
if((ftype1_id = H5Aget_type(attr1_id)) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aget_type first attribute failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Aget_type first attribute failed");
if((ftype2_id = H5Aget_type(attr2_id)) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aget_type second attribute failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Aget_type second attribute failed");
if((mtype1_id = H5Tget_native_type(ftype1_id, H5T_DIR_DEFAULT)) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Tget_native_type first attribute ftype failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Tget_native_type first attribute ftype failed");
if((mtype2_id = H5Tget_native_type(ftype2_id, H5T_DIR_DEFAULT)) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Tget_native_type second attribute ftype failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Tget_native_type second attribute ftype failed");
if((msize1 = H5Tget_size(mtype1_id)) == 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Tget_size first attribute mtype failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Tget_size first attribute mtype failed");
if((msize2 = H5Tget_size(mtype2_id)) == 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Tget_size second attribute mtype failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Tget_size second attribute mtype failed");
/* get the dataspace */
if((space1_id = H5Aget_space(attr1_id)) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aget_space first attribute failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Aget_space first attribute failed");
if((space2_id = H5Aget_space(attr2_id)) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aget_space second attribute failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Aget_space second attribute failed");
/* get dimensions */
if((rank1 = H5Sget_simple_extent_dims(space1_id, dims1, NULL)) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Sget_simple_extent_dims first attribute failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Sget_simple_extent_dims first attribute failed");
if((rank2 = H5Sget_simple_extent_dims(space2_id, dims2, NULL)) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Sget_simple_extent_dims second attribute failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Sget_simple_extent_dims second attribute failed");
/*----------------------------------------------------------------------
* check for comparable TYPE and SPACE
@@ -417,21 +417,21 @@ hsize_t diff_attr(hid_t loc1_id,
if(diff_can_type(ftype1_id, ftype2_id, rank1, rank2, dims1, dims2,
dims1, dims2, name1, name2, opts, 0) != 1) {
if(H5Tclose(ftype1_id) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Tclose first attribute ftype failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Tclose first attribute ftype failed");
if(H5Tclose(ftype2_id) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Tclose second attribute ftype failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Tclose second attribute ftype failed");
if(H5Sclose(space1_id) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Sclose first attribute failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Sclose first attribute failed");
if(H5Sclose(space2_id) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Sclose second attribute failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Sclose second attribute failed");
if(H5Aclose(attr1_id) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aclose first attribute failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Aclose first attribute failed");
if(H5Aclose(attr2_id) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aclose second attribute failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Aclose second attribute failed");
if(H5Tclose(mtype1_id) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Tclose first attribute mtype failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Tclose first attribute mtype failed");
if(H5Tclose(mtype2_id) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Tclose second attribute mtype failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Tclose second attribute mtype failed");
continue;
}
@@ -442,7 +442,7 @@ hsize_t diff_attr(hid_t loc1_id,
*/
if(FAIL == match_up_memsize(ftype1_id, ftype2_id, &mtype1_id,
&mtype2_id, &msize1, &msize2))
HGOTO_ERROR(1, H5E_tools_min_id_g, "match_up_memsize failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "match_up_memsize failed");
/*---------------------------------------------------------------------
* read
@@ -456,18 +456,18 @@ hsize_t diff_attr(hid_t loc1_id,
buf2 = (void *)HDcalloc((size_t)(nelmts1), msize2);
if(buf1 == NULL || buf2 == NULL) {
parallel_print("cannot read into memory\n");
HGOTO_ERROR(1, H5E_tools_min_id_g, "buffer allocation failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "buffer allocation failed");
}
if(H5Aread(attr1_id, mtype1_id, buf1) < 0) {
parallel_print("Failed reading attribute1 %s/%s\n", path1, name1);
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aget_type first attribute failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Aget_type first attribute failed");
}
else
buf1hasdata = TRUE;
if(H5Aread(attr2_id, mtype2_id, buf2) < 0) {
parallel_print("Failed reading attribute2 %s/%s\n", path2, name2);
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aget_type second attribute failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Aget_type second attribute failed");
}
else
buf2hasdata = TRUE;
@@ -525,21 +525,21 @@ hsize_t diff_attr(hid_t loc1_id,
buf2 = NULL;
if(H5Tclose(ftype1_id) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aget_type first attribute failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Aget_type first attribute failed");
if(H5Tclose(ftype2_id) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aget_type second attribute failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Aget_type second attribute failed");
if(H5Sclose(space1_id) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aget_type first attribute failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Aget_type first attribute failed");
if(H5Sclose(space2_id) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aget_type second attribute failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Aget_type second attribute failed");
if(H5Aclose(attr1_id) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aget_type first attribute failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Aget_type first attribute failed");
if(H5Aclose(attr2_id) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aget_type second attribute failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Aget_type second attribute failed");
if(H5Tclose(mtype1_id) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Tclose first attribute mtype failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Tclose first attribute mtype failed");
if(H5Tclose(mtype2_id) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Tclose second attribute mtype failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Tclose second attribute mtype failed");
nfound_total += nfound;
}
+31 -31
View File
@@ -49,17 +49,17 @@ hsize_t diff_dataset(hid_t file1_id,
/* Open the datasets */
if((did1 = H5Dopen2(file1_id, obj1_name, H5P_DEFAULT)) < 0) {
parallel_print("Cannot open dataset <%s>\n", obj1_name);
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dopen2 first dataset failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Dopen2 first dataset failed");
}
if((did2 = H5Dopen2(file2_id, obj2_name, H5P_DEFAULT)) < 0) {
parallel_print("Cannot open dataset <%s>\n", obj2_name);
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dopen2 second dataset failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Dopen2 second dataset failed");
}
if((dcpl1 = H5Dget_create_plist(did1)) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dget_create_plist first dataset failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Dget_create_plist first dataset failed");
if((dcpl2 = H5Dget_create_plist(did2)) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dget_create_plist second dataset failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Dget_create_plist second dataset failed");
/*-------------------------------------------------------------------------
* check if the dataset creation property list has filters that
@@ -72,7 +72,7 @@ hsize_t diff_dataset(hid_t file1_id,
(status = h5tools_canreadf((opts->m_verbose ? obj2_name : NULL), dcpl2) == 1))
nfound = diff_datasetid(did1, did2, obj1_name, obj2_name, opts);
else if (status < 0) {
HGOTO_ERROR(1, H5E_tools_min_id_g, "h5tools_canreadf failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "h5tools_canreadf failed");
}
else {
ret_value = 1;
@@ -198,27 +198,27 @@ hsize_t diff_datasetid(hid_t did1,
h5difftrace("diff_datasetid start\n");
/* Get the dataspace handle */
if((sid1 = H5Dget_space(did1)) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dget_space failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Dget_space failed");
/* Get rank */
if((rank1 = H5Sget_simple_extent_ndims(sid1)) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed");
/* Get the dataspace handle */
if((sid2 = H5Dget_space(did2)) < 0 )
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dget_space failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Dget_space failed");
/* Get rank */
if((rank2 = H5Sget_simple_extent_ndims(sid2)) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed");
/* Get dimensions */
if(H5Sget_simple_extent_dims(sid1, dims1, maxdim1) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Sget_simple_extent_dims failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Sget_simple_extent_dims failed");
/* Get dimensions */
if(H5Sget_simple_extent_dims(sid2, dims2, maxdim2) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_dims failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_dims failed");
h5diffdebug3("rank: %ld - %ld\n", rank1, rank2);
/*-------------------------------------------------------------------------
@@ -228,25 +228,25 @@ hsize_t diff_datasetid(hid_t did1,
/* Get the data type */
if((f_tid1 = H5Dget_type(did1)) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dget_type failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Dget_type failed");
/* Get the data type */
if((f_tid2 = H5Dget_type(did2)) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dget_type failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Dget_type failed");
/*-------------------------------------------------------------------------
* get the storage layout type
*-------------------------------------------------------------------------
*/
if((dcpl1 = H5Dget_create_plist(did1)) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dget_create_plist failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Dget_create_plist failed");
if((dcpl2 = H5Dget_create_plist(did2)) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dget_create_plist failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Dget_create_plist failed");
if((stl1 = H5Pget_layout(dcpl1)) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Pget_layout failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Pget_layout failed");
if((stl2 = H5Pget_layout(dcpl2)) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Pget_layout failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Pget_layout failed");
/*-------------------------------------------------------------------------
* check for empty datasets
@@ -288,10 +288,10 @@ hsize_t diff_datasetid(hid_t did1,
*/
h5difftrace("check for memory type and sizes\n");
if((m_tid1 = H5Tget_native_type(f_tid1, H5T_DIR_DEFAULT)) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Tget_native_type failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Tget_native_type failed");
if((m_tid2 = H5Tget_native_type(f_tid2, H5T_DIR_DEFAULT)) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Tget_native_type failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Tget_native_type failed");
m_size1 = H5Tget_size(m_tid1);
m_size2 = H5Tget_size(m_tid2);
@@ -357,7 +357,7 @@ hsize_t diff_datasetid(hid_t did1,
if (FAIL == match_up_memsize (f_tid1, f_tid2,
&m_tid1, &m_tid2,
&m_size1, &m_size2))
HGOTO_ERROR(1, H5E_tools_min_id_g, "match_up_memsize failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "match_up_memsize failed");
h5diffdebug3("m_size: %ld - %ld\n", m_size1, m_size2);
dadims = dims1;
dam_size = m_size1;
@@ -403,10 +403,10 @@ hsize_t diff_datasetid(hid_t did1,
if(buf1 != NULL && buf2 != NULL) {
h5difftrace("buf1 != NULL && buf2 != NULL\n");
if(H5Dread(did1, m_tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf1) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dread failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Dread failed");
h5difftrace("H5Dread did2\n");
if(H5Dread(did2, m_tid2, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dread failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Dread failed");
/* array diff */
nfound = diff_array(buf1, buf2, danelmts, (hsize_t)0, rank1, dadims,
@@ -470,9 +470,9 @@ hsize_t diff_datasetid(hid_t did1,
* E.g., sm_space.
*/
if((sm_buf1 = HDmalloc((size_t)sm_nbytes)) == NULL)
HGOTO_ERROR(1, H5E_tools_min_id_g, "HDmalloc failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "HDmalloc failed");
if((sm_buf2 = HDmalloc((size_t)sm_nbytes)) == NULL)
HGOTO_ERROR(1, H5E_tools_min_id_g, "HDmalloc failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "HDmalloc failed");
sm_nelmts = sm_nbytes / p_type_nbytes;
sm_space = H5Screate_simple(1, &sm_nelmts, NULL);
@@ -489,19 +489,19 @@ hsize_t diff_datasetid(hid_t did1,
hs_nelmts *= hs_size[i];
} /* end for */
if(H5Sselect_hyperslab(sid1, H5S_SELECT_SET, hs_offset, NULL, hs_size, NULL) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Sselect_hyperslab failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Sselect_hyperslab failed");
if(H5Sselect_hyperslab(sid2, H5S_SELECT_SET, hs_offset, NULL, hs_size, NULL) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Sselect_hyperslab failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Sselect_hyperslab failed");
if(H5Sselect_hyperslab(sm_space, H5S_SELECT_SET, zero, NULL, &hs_nelmts, NULL) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Sselect_hyperslab failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Sselect_hyperslab failed");
} /* end if */
else
hs_nelmts = 1;
if(H5Dread(did1, m_tid1, sm_space, sid1, H5P_DEFAULT, sm_buf1) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dread failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Dread failed");
if(H5Dread(did2, m_tid2, sm_space, sid2, H5P_DEFAULT, sm_buf2) < 0)
HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dread failed");
H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Dread failed");
/* get array differences. in the case of hyperslab read, increment the number of differences
found in each hyperslab and pass the position at the beginning for printing */
@@ -630,9 +630,9 @@ int diff_can_type(hid_t f_tid1, /* file data type */
*-------------------------------------------------------------------------
*/
if((tclass1 = H5Tget_class(f_tid1)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_class first object failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_class first object failed");
if((tclass2 = H5Tget_class(f_tid2)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_class second object failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_class second object failed");
if(tclass1 != tclass2) {
if((opts->m_verbose || opts->m_list_not_cmp) && obj1_name && obj2_name) {
+3 -3
View File
@@ -346,7 +346,7 @@ herr_t match_up_memsize (hid_t f_tid1_id, hid_t f_tid2_id,
H5Tclose(*m_tid1);
if(((*m_tid1) = H5Tget_native_type(f_tid2_id, H5T_DIR_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_native_type failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_native_type failed");
*m_size1 = H5Tget_size(*m_tid1);
} /* end if */
@@ -354,13 +354,13 @@ herr_t match_up_memsize (hid_t f_tid1_id, hid_t f_tid2_id,
H5Tclose(*m_tid2);
if(((*m_tid2) = H5Tget_native_type(f_tid1_id, H5T_DIR_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_native_type failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_native_type failed");
*m_size2 = H5Tget_size(*m_tid2);
} /* end else */
} /* end if */
if((*m_size1) != (*m_size2))
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "native type sizes do not compare");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "native type sizes do not compare");
done:
return ret_value;
+161 -103
View File
@@ -27,6 +27,8 @@ hid_t H5tools_ERR_STACK_g = 0;
hid_t H5tools_ERR_CLS_g = -1;
hid_t H5E_tools_g = -1;
hid_t H5E_tools_min_id_g = -1;
hid_t H5E_tools_min_info_id_g = -1;
hid_t H5E_tools_min_dbg_id_g = -1;
int compound_data;
FILE *rawattrstream = NULL; /* should initialize to stdout but gcc moans about it */
FILE *rawdatastream = NULL; /* should initialize to stdout but gcc moans about it */
@@ -440,11 +442,11 @@ h5tools_get_fapl(hid_t fapl, const char *driver, unsigned *drivernum)
/* Make a copy of the FAPL, for the file open call to use, eventually */
if (fapl == H5P_DEFAULT) {
if ((new_fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcreate failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcreate failed");
} /* end if */
else {
if ((new_fapl = H5Pcopy(fapl)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcopy failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcopy failed");
} /* end else */
/* Determine which driver the user wants to open the file with. Try
@@ -452,7 +454,7 @@ h5tools_get_fapl(hid_t fapl, const char *driver, unsigned *drivernum)
if (!HDstrcmp(driver, drivernames[SEC2_IDX])) {
/* SEC2 driver */
if (H5Pset_fapl_sec2(new_fapl) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_fapl_sec2 failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_fapl_sec2 failed");
if (drivernum)
*drivernum = SEC2_IDX;
@@ -464,7 +466,7 @@ h5tools_get_fapl(hid_t fapl, const char *driver, unsigned *drivernum)
* is the member size.
*/
if (H5Pset_fapl_family(new_fapl, (hsize_t) 0, H5P_DEFAULT) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_fapl_family failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_fapl_family failed");
if (drivernum)
*drivernum = FAMILY_IDX;
@@ -472,7 +474,7 @@ h5tools_get_fapl(hid_t fapl, const char *driver, unsigned *drivernum)
else if (!HDstrcmp(driver, drivernames[SPLIT_IDX])) {
/* SPLIT Driver */
if (H5Pset_fapl_split(new_fapl, "-m.h5", H5P_DEFAULT, "-r.h5", H5P_DEFAULT) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_fapl_split failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_fapl_split failed");
if (drivernum)
*drivernum = SPLIT_IDX;
@@ -480,7 +482,7 @@ h5tools_get_fapl(hid_t fapl, const char *driver, unsigned *drivernum)
else if (!HDstrcmp(driver, drivernames[MULTI_IDX])) {
/* MULTI Driver */
if (H5Pset_fapl_multi(new_fapl, NULL, NULL, NULL, NULL, TRUE) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_fapl_multi failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_fapl_multi failed");
if(drivernum)
*drivernum = MULTI_IDX;
@@ -496,7 +498,7 @@ h5tools_get_fapl(hid_t fapl, const char *driver, unsigned *drivernum)
if(mpi_initialized && !mpi_finalized) {
if(H5Pset_fapl_mpio(new_fapl, MPI_COMM_WORLD, MPI_INFO_NULL) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_fapl_mpio failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_fapl_mpio failed");
if(drivernum)
*drivernum = MPIO_IDX;
} /* end if */
@@ -734,6 +736,7 @@ void
h5tools_simple_prefix(FILE *stream, const h5tool_format_t *info,
h5tools_context_t *ctx, hsize_t elmtno, int secnum)
{
H5TOOLS_ERR_INIT(int, SUCCEED)
h5tools_str_t prefix;
h5tools_str_t str; /*temporary for indentation */
size_t templength = 0;
@@ -745,6 +748,9 @@ h5tools_simple_prefix(FILE *stream, const h5tool_format_t *info,
if (!ctx->need_prefix)
return;
H5TOOLS_PUSH_STACK();
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "enter");
HDmemset(&prefix, 0, sizeof(h5tools_str_t));
HDmemset(&str, 0, sizeof(h5tools_str_t));
@@ -754,9 +760,11 @@ h5tools_simple_prefix(FILE *stream, const h5tool_format_t *info,
HDputc('\n', stream);
PUTSTREAM(OPT(info->line_sep, ""), stream);
}
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "after CR elmtno=%ld, ctx->ndims=%d", elmtno, ctx->ndims);
/* Calculate new prefix */
h5tools_str_prefix(&prefix, info, elmtno, ctx->ndims, ctx);
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "prefix=%s - str=%s", prefix.s, str.s);
/* Write new prefix to output */
if (ctx->indent_level > 0)
@@ -784,8 +792,9 @@ h5tools_simple_prefix(FILE *stream, const h5tool_format_t *info,
PUTSTREAM(h5tools_str_fmt(&prefix, (size_t)0, info->line_pre), stream);
templength = h5tools_str_len(&prefix);
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "prefix=%s - templength=%d", prefix.s, templength);
for (u = 0; u < indentlevel; u++)
for (u = 0; u < indentlevel; u++) {
/*we already made the indent for the array indices case */
if (!info->pindex) {
PUTSTREAM(h5tools_str_fmt(&prefix, (size_t)0, info->line_indent), stream);
@@ -795,14 +804,20 @@ h5tools_simple_prefix(FILE *stream, const h5tool_format_t *info,
/*we cannot count the prefix for the array indices case */
templength += h5tools_str_len(&str);
}
}
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "prefix=%s - templength=%d", prefix.s, templength);
ctx->cur_column = ctx->prev_prefix_len = templength;
ctx->cur_elmt = 0;
ctx->need_prefix = 0;
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "prefix=%s - str=%s", prefix.s, str.s);
/* Free string */
h5tools_str_close(&prefix);
h5tools_str_close(&str);
H5TOOLS_ENDDEBUG(H5E_tools_min_dbg_id_g, "exit");
H5TOOLS_POP_STACK();
}
/*-------------------------------------------------------------------------
@@ -918,6 +933,7 @@ h5tools_render_element(FILE *stream, const h5tool_format_t *info,
h5tools_context_t *ctx, h5tools_str_t *buffer, hsize_t *curr_pos,
size_t ncols, hsize_t local_elmt_counter, hsize_t elmt_counter)
{
H5TOOLS_ERR_INIT(hbool_t, TRUE)
hbool_t dimension_break = TRUE;
char *s = NULL;
char *section = NULL; /* a section of output */
@@ -927,7 +943,12 @@ h5tools_render_element(FILE *stream, const h5tool_format_t *info,
if (stream == NULL)
return dimension_break;
H5TOOLS_PUSH_STACK();
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "enter need_prefix=%d", ctx->need_prefix);
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "elmt_counter=%ld - local_elmt_counter=%ld", elmt_counter, local_elmt_counter);
s = h5tools_str_fmt(buffer, (size_t)0, "%s");
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "s=%s", s);
/*
* If the element would split on multiple lines if printed at our
@@ -970,6 +991,7 @@ h5tools_render_element(FILE *stream, const h5tool_format_t *info,
dimension_break = FALSE;
}
}
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "elmt_counter=%ld - ctx->size_last_dim=%ld", elmt_counter, ctx->size_last_dim);
/*
* If the previous element occupied multiple lines and this element
@@ -1027,6 +1049,7 @@ h5tools_render_element(FILE *stream, const h5tool_format_t *info,
* this is necessary to print the array indices
*/
*curr_pos = ctx->sm_pos + local_elmt_counter;
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "curr_pos=%ld - ctx->sm_pos=%ld - ctx->ndims=%ld", *curr_pos, ctx->sm_pos, ctx->ndims);
h5tools_simple_prefix(stream, info, ctx, *curr_pos, secnum);
}
@@ -1034,6 +1057,7 @@ h5tools_render_element(FILE *stream, const h5tool_format_t *info,
PUTSTREAM(OPT(info->elmt_suf2, " "), stream);
ctx->cur_column += HDstrlen(OPT(info->elmt_suf2, " "));
}
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "section=%s", section);
/* Print the section */
PUTSTREAM(section, stream);
@@ -1041,6 +1065,10 @@ h5tools_render_element(FILE *stream, const h5tool_format_t *info,
}
ctx->prev_multiline = multiline;
H5TOOLS_ENDDEBUG(H5E_tools_min_dbg_id_g, "exit");
H5TOOLS_POP_STACK();
return dimension_break;
}
@@ -1074,22 +1102,25 @@ h5tools_render_region_element(FILE *stream, const h5tool_format_t *info,
h5tools_context_t *ctx, h5tools_str_t *buffer, hsize_t *curr_pos,
size_t ncols, hsize_t *ptdata, hsize_t local_elmt_counter, hsize_t elmt_counter)
{
H5TOOLS_ERR_INIT(hbool_t, TRUE)
hbool_t dimension_break = TRUE;
char *s = NULL;
char *section = NULL; /* a section of output */
int secnum; /* section sequence number */
int multiline; /* datum was multiline */
H5TOOLS_PUSH_STACK();
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "enter");
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "elmt_counter=%ld - local_elmt_counter=%ld", elmt_counter, local_elmt_counter);
s = h5tools_str_fmt(buffer, (size_t)0, "%s");
/*
* If the element would split on multiple lines if printed at our
* current location...
*/
if (info->line_multi_new == 1 &&
(ctx->cur_column + h5tools_count_ncols(s) +
HDstrlen(OPT(info->elmt_suf2, " ")) +
HDstrlen(OPT(info->line_suf, ""))) > ncols) {
if (info->line_multi_new == 1 && (ctx->cur_column + h5tools_count_ncols(s) +
HDstrlen(OPT(info->elmt_suf2, " ")) + HDstrlen(OPT(info->line_suf, ""))) > ncols) {
if (ctx->prev_multiline) {
/*
* ... and the previous element also occupied more than one
@@ -1098,8 +1129,7 @@ h5tools_render_region_element(FILE *stream, const h5tool_format_t *info,
ctx->need_prefix = TRUE;
}
else if ((ctx->prev_prefix_len + h5tools_count_ncols(s) +
HDstrlen(OPT(info->elmt_suf2, " ")) +
HDstrlen(OPT(info->line_suf, ""))) <= ncols) {
HDstrlen(OPT(info->elmt_suf2, " ")) + HDstrlen(OPT(info->line_suf, ""))) <= ncols) {
/*
* ...but *could* fit on one line otherwise, then we
* should end the current line and start this element on its
@@ -1129,12 +1159,8 @@ h5tools_render_region_element(FILE *stream, const h5tool_format_t *info,
* is too long to fit on a line then start this element at the
* beginning of the line.
*/
if (info->line_multi_new == 1 &&
ctx->prev_multiline &&
(ctx->cur_column +
h5tools_count_ncols(s) +
HDstrlen(OPT(info->elmt_suf2, " ")) +
HDstrlen(OPT(info->line_suf, ""))) > ncols)
if (info->line_multi_new == 1 && ctx->prev_multiline &&
(ctx->cur_column + h5tools_count_ncols(s) + HDstrlen(OPT(info->elmt_suf2, " ")) + HDstrlen(OPT(info->line_suf, ""))) > ncols)
ctx->need_prefix = TRUE;
/*
@@ -1150,8 +1176,7 @@ h5tools_render_region_element(FILE *stream, const h5tool_format_t *info,
* one-at a time.
*/
multiline = 0;
for (secnum = 0, multiline = 0; (section = HDstrtok(secnum ? NULL : s,
OPTIONAL_LINE_BREAK)); secnum++) {
for (secnum = 0, multiline = 0; (section = HDstrtok(secnum ? NULL : s, OPTIONAL_LINE_BREAK)); secnum++) {
/*
* If the current section plus possible suffix and end-of-line
* information would cause the output to wrap then we need to
@@ -1163,10 +1188,7 @@ h5tools_render_region_element(FILE *stream, const h5tool_format_t *info,
* this check to happen for the first line
*/
if ((!info->skip_first || local_elmt_counter) &&
(ctx->cur_column +
HDstrlen(section) +
HDstrlen(OPT(info->elmt_suf2, " ")) +
HDstrlen(OPT(info->line_suf, ""))) > ncols)
(ctx->cur_column + HDstrlen(section) + HDstrlen(OPT(info->elmt_suf2, " ")) + HDstrlen(OPT(info->line_suf, ""))) > ncols)
ctx->need_prefix = 1;
/*
@@ -1177,11 +1199,12 @@ h5tools_render_region_element(FILE *stream, const h5tool_format_t *info,
if (secnum)
multiline++;
/* pass to the prefix in h5tools_simple_prefix the total
/* pass to the prefix in h5tools_region_simple_prefix the total
* position instead of the current stripmine position i;
* this is necessary to print the array indices
*/
*curr_pos = ctx->sm_pos + local_elmt_counter;
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "curr_pos=%ld - ctx->sm_pos=%ld", *curr_pos, ctx->sm_pos);
h5tools_region_simple_prefix(stream, info, ctx, local_elmt_counter, ptdata, secnum);
}
@@ -1196,6 +1219,10 @@ h5tools_render_region_element(FILE *stream, const h5tool_format_t *info,
}
ctx->prev_multiline = multiline;
H5TOOLS_ENDDEBUG(H5E_tools_min_dbg_id_g, "exit");
H5TOOLS_POP_STACK();
return dimension_break;
}
@@ -1210,16 +1237,25 @@ h5tools_render_region_element(FILE *stream, const h5tool_format_t *info,
void
init_acc_pos(h5tools_context_t *ctx, hsize_t *dims)
{
H5TOOLS_ERR_INIT(int, SUCCEED)
int i;
unsigned j;
H5TOOLS_PUSH_STACK();
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "enter");
if(ctx->ndims > 0) {
ctx->acc[ctx->ndims - 1] = 1;
for (i = ((int)ctx->ndims - 2); i >= 0; i--)
for (i = ((int)ctx->ndims - 2); i >= 0; i--) {
ctx->acc[i] = ctx->acc[i + 1] * dims[i + 1];
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "ctx->acc[%d]=%ld", i, ctx->acc[i]);
}
for (j = 0; j < ctx->ndims; j++)
ctx->pos[j] = 0;
}
H5TOOLS_ENDDEBUG(H5E_tools_min_dbg_id_g, "exit");
H5TOOLS_POP_STACK();
}
/*-------------------------------------------------------------------------
@@ -1234,23 +1270,26 @@ init_acc_pos(h5tools_context_t *ctx, hsize_t *dims)
int
render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t block_nelmts)
{
HERR_INIT(int, SUCCEED)
H5TOOLS_ERR_INIT(int, SUCCEED)
unsigned char *mem = (unsigned char*)_mem;
size_t size; /* datum size */
hsize_t block_index;
H5T_class_t type_class;
H5TOOLS_PUSH_STACK();
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "enter");
if((size = H5Tget_size(tid)) == 0)
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_size failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_size failed");
if((type_class = H5Tget_class(tid)) < 0)
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_class failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_class failed");
switch (type_class) {
case H5T_INTEGER:
case H5T_FLOAT:
case H5T_ENUM:
case H5T_BITFIELD:
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "numbers");
block_index = block_nelmts * size;
while(block_index > 0) {
size_t bytes_in = 0; /* # of bytes to write */
@@ -1264,7 +1303,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
bytes_wrote = HDfwrite(mem, 1, bytes_in, stream);
if(bytes_wrote != bytes_in || (0 == bytes_wrote && HDferror(stream)))
H5E_THROW(FAIL, H5E_tools_min_id_g, "fwrite failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "fwrite failed");
block_index -= (hsize_t)bytes_wrote;
mem = mem + bytes_wrote;
@@ -1277,6 +1316,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
char *s = NULL;
unsigned char tempuchar;
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "H5T_STRING");
pad = H5Tget_strpad(tid);
for (block_index = 0; block_index < block_nelmts; block_index++) {
@@ -1287,7 +1327,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
if (s != NULL)
size = HDstrlen(s);
else
H5E_THROW(FAIL, H5E_tools_min_id_g, "NULL string");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "NULL string");
}
else {
s = (char *) mem;
@@ -1295,7 +1335,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
for (i = 0; i < size && (s[i] || pad != H5T_STR_NULLTERM); i++) {
HDmemcpy(&tempuchar, &s[i], sizeof(unsigned char));
if (1 != HDfwrite(&tempuchar, sizeof(unsigned char), 1, stream))
H5E_THROW(FAIL, H5E_tools_min_id_g, "fwrite failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "fwrite failed");
} /* i */
} /* for (block_index = 0; block_index < block_nelmts; block_index++) */
}
@@ -1305,8 +1345,9 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
int snmembs;
unsigned nmembs;
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "H5T_COMPOUND");
if((snmembs = H5Tget_nmembers(tid)) < 0)
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_nmembers of compound failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_nmembers of compound failed");
nmembs = (unsigned)snmembs;
for (block_index = 0; block_index < block_nelmts; block_index++) {
@@ -1322,7 +1363,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
if (render_bin_output(stream, container, memb, mem + offset, 1) < 0) {
H5Tclose(memb);
H5E_THROW(FAIL, H5E_tools_min_id_g, "render_bin_output of compound member failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "render_bin_output of compound member failed");
}
H5Tclose(memb);
@@ -1336,6 +1377,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
hsize_t dims[H5S_MAX_RANK], temp_nelmts, nelmts;
hid_t memb = -1;
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "H5T_ARRAY");
/* get the array's base datatype for each element */
memb = H5Tget_super(tid);
ndims = H5Tget_array_ndims(tid);
@@ -1350,7 +1392,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
}
else {
H5Tclose(memb);
H5E_THROW(FAIL, H5E_tools_min_id_g, "calculate the number of array elements failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "calculate the number of array elements failed");
}
for (block_index = 0; block_index < block_nelmts; block_index++) {
@@ -1358,7 +1400,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
/* dump the array element */
if (render_bin_output(stream, container, memb, mem, nelmts) < 0) {
H5Tclose(memb);
H5E_THROW(FAIL, H5E_tools_min_id_g, "render_bin_output failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "render_bin_output failed");
}
}
H5Tclose(memb);
@@ -1369,7 +1411,8 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
hsize_t nelmts;
hid_t memb = -1;
/* get the VL sequences's base datatype for each element */
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "H5T_VLEN");
/* get the VL sequences's base datatype for each element */
memb = H5Tget_super(tid);
for (block_index = 0; block_index < block_nelmts; block_index++) {
@@ -1380,7 +1423,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
/* dump the array element */
if (render_bin_output(stream, container, memb, ((char *) (((hvl_t *)((void *)mem))->p)), nelmts) < 0) {
H5Tclose(memb);
H5E_THROW(FAIL, H5E_tools_min_id_g, "render_bin_output failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "render_bin_output failed");
}
}
H5Tclose(memb);
@@ -1388,45 +1431,58 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
break;
case H5T_REFERENCE:
{
if (size == H5R_DSET_REG_REF_BUF_SIZE) {
/* if (H5Tequal(tid, H5T_STD_REF_DSETREG)) */
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "reference class type");
if (H5Tequal(tid, H5T_STD_REF)) {
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "H5T_STD_REF");
if (region_output) {
/* region data */
hid_t region_id = -1;
hid_t region_space = -1;
hid_t region_id = H5I_INVALID_HID;
hid_t region_space = H5I_INVALID_HID;
H5S_sel_type region_type;
for (block_index = 0; block_index < block_nelmts; block_index++) {
mem = ((unsigned char*)_mem) + block_index * size;
region_id = H5Rdereference2(container, H5P_DEFAULT, H5R_DATASET_REGION, mem);
if (region_id >= 0) {
region_space = H5Rget_region(container, H5R_DATASET_REGION, mem);
if (region_space >= 0) {
region_type = H5Sget_select_type(region_space);
if(region_type == H5S_SEL_POINTS)
render_bin_output_region_points(region_space, region_id, stream, container);
else
render_bin_output_region_blocks(region_space, region_id, stream, container);
if((region_id = H5Ropen_object((const H5R_ref_t *)mem, H5P_DEFAULT, H5P_DEFAULT)) < 0)
H5Epush2(H5tools_ERR_STACK_g, __FILE__, FUNC, __LINE__, H5tools_ERR_CLS_g, H5E_tools_g, H5E_tools_min_id_g,
"H5Ropen_object H5T_STD_REF failed");
else {
if((region_space = H5Ropen_region((const H5R_ref_t *)mem, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
if (!h5tools_is_zero(mem, H5Tget_size(H5T_STD_REF))) {
region_type = H5Sget_select_type(region_space);
if(region_type == H5S_SEL_POINTS)
render_bin_output_region_points(region_space, region_id, stream, container);
else
render_bin_output_region_blocks(region_space, region_id, stream, container);
}
else {
H5Epush2(H5tools_ERR_STACK_g, __FILE__, FUNC, __LINE__, H5tools_ERR_CLS_g, H5E_tools_g, H5E_tools_min_id_g,
"H5Ropen_object H5T_STD_REF NULL");
}
H5Sclose(region_space);
} /* end if (region_space >= 0) */
H5Dclose(region_id);
} /* end if (region_id >= 0) */
}
}
} /* end if (region_output... */
}
else if (size == H5R_OBJ_REF_BUF_SIZE) {
/* if (H5Tequal(tid, H5T_STD_REF_OBJ)) */
;
else if (H5Tequal(tid, H5T_STD_REF_DSETREG)) {
/* if (size == H5R_DSET_REG_REF_BUF_SIZE) */
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "H5T_STD_REF_DSETREG");
}
else if (H5Tequal(tid, H5T_STD_REF_OBJ)) {
/* if (size == H5R_OBJ_REF_BUF_SIZE) */
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "H5T_STD_REF_OBJ");
}
}
break;
case H5T_TIME:
case H5T_OPAQUE:
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "H5T_OPAQUE");
for (block_index = 0; block_index < block_nelmts; block_index++) {
mem = ((unsigned char*)_mem) + block_index * size;
if (size != HDfwrite(mem, sizeof(char), size, stream))
H5E_THROW(FAIL, H5E_tools_min_id_g, "fwrite failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "fwrite failed");
} /* end for */
break;
@@ -1434,11 +1490,13 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
case H5T_NCLASSES:
default:
/* Badness */
H5E_THROW(FAIL, H5E_tools_min_id_g, "bad type class");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "bad type class");
break;
} /* end switch */
CATCH
H5TOOLS_ENDDEBUG(H5E_tools_min_dbg_id_g, "exit");
H5TOOLS_POP_STACK();
return ret_value;
}
@@ -1457,6 +1515,7 @@ int
render_bin_output_region_data_blocks(hid_t region_id, FILE *stream,
hid_t container, unsigned ndims, hid_t type_id, hsize_t nblocks, hsize_t *ptdata)
{
H5TOOLS_ERR_INIT(int, SUCCEED);
hsize_t *dims1 = NULL;
hsize_t *start = NULL;
hsize_t *count = NULL;
@@ -1468,15 +1527,14 @@ render_bin_output_region_data_blocks(hid_t region_id, FILE *stream,
void *region_buf = NULL;
hsize_t blkndx;
hid_t sid1 = -1;
int ret_value = SUCCEED;
/* Get the dataspace of the dataset */
if((sid1 = H5Dget_space(region_id)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_space failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "H5Dget_space failed");
/* Allocate space for the dimension array */
if((dims1 = (hsize_t *) HDmalloc(sizeof(hsize_t) * ndims)) == NULL)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for dims");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for dims");
/* find the dimensions of each data space from the block coordinates */
numelem = 1;
@@ -1487,21 +1545,21 @@ render_bin_output_region_data_blocks(hid_t region_id, FILE *stream,
/* Create dataspace for reading buffer */
if((mem_space = H5Screate_simple((int)ndims, dims1, NULL)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Screate_simple failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "H5Screate_simple failed");
if((type_size = H5Tget_size(type_id)) == 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_size failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_size failed");
if((region_buf = HDmalloc(type_size * (size_t)numelem)) == NULL)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Could not allocate region buffer");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "Could not allocate region buffer");
/* Select (x , x , ..., x ) x (y , y , ..., y ) hyperslab for reading memory dataset */
/* 1 2 n 1 2 n */
if((start = (hsize_t *) HDmalloc(sizeof(hsize_t) * ndims)) == NULL)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for start");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for start");
if((count = (hsize_t *) HDmalloc(sizeof(hsize_t) * ndims)) == NULL)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for count");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for count");
for (blkndx = 0; blkndx < nblocks; blkndx++) {
for (jndx = 0; jndx < ndims; jndx++) {
@@ -1510,29 +1568,31 @@ render_bin_output_region_data_blocks(hid_t region_id, FILE *stream,
}
if(H5Sselect_hyperslab(sid1, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sselect_hyperslab failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sselect_hyperslab failed");
if(H5Dread(region_id, type_id, mem_space, sid1, H5P_DEFAULT, region_buf) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dread failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dread failed");
if(H5Sget_simple_extent_dims(mem_space, total_size, NULL) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_dims failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_dims failed");
if(render_bin_output(stream, container, type_id, (char*)region_buf, numelem) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "render_bin_output of data region failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "render_bin_output of data region failed");
/* Render the region data element end */
done:
;
} /* end for (blkndx = 0; blkndx < nblocks; blkndx++) */
done:
CATCH
HDfree(start);
HDfree(count);
HDfree(region_buf);
HDfree(dims1);
if(H5Sclose(mem_space) < 0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Sclose failed");
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Sclose failed");
if(H5Sclose(sid1) < 0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Sclose failed");
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Sclose failed");
return ret_value;
}
@@ -1551,7 +1611,7 @@ hbool_t
render_bin_output_region_blocks(hid_t region_space, hid_t region_id,
FILE *stream, hid_t container)
{
HERR_INIT(hbool_t, TRUE)
H5TOOLS_ERR_INIT(hbool_t, TRUE)
hssize_t snblocks;
hsize_t nblocks;
hsize_t alloc_size;
@@ -1562,37 +1622,36 @@ render_bin_output_region_blocks(hid_t region_space, hid_t region_id,
hid_t type_id = -1;
if((snblocks = H5Sget_select_hyper_nblocks(region_space)) <= 0)
H5E_THROW(FALSE, H5E_tools_min_id_g, "H5Sget_select_hyper_nblocks failed");
H5TOOLS_THROW(FALSE, H5E_tools_min_id_g, "H5Sget_select_hyper_nblocks failed");
nblocks = (hsize_t)snblocks;
/* Print block information */
if((sndims = H5Sget_simple_extent_ndims(region_space)) < 0)
H5E_THROW(FALSE, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed");
H5TOOLS_THROW(FALSE, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed");
ndims = (unsigned)sndims;
alloc_size = nblocks * ndims * 2 * sizeof(ptdata[0]);
if((ptdata = (hsize_t*) HDmalloc((size_t) alloc_size)) == NULL)
HGOTO_ERROR(FALSE, H5E_tools_min_id_g, "Could not allocate buffer for ptdata");
H5TOOLS_GOTO_ERROR(FALSE, H5E_tools_min_id_g, "Could not allocate buffer for ptdata");
if(H5Sget_select_hyper_blocklist(region_space, (hsize_t) 0, nblocks, ptdata) < 0)
HGOTO_ERROR(FALSE, H5E_tools_min_id_g, "H5Rget_select_hyper_blocklist failed");
H5TOOLS_GOTO_ERROR(FALSE, H5E_tools_min_id_g, "H5Rget_select_hyper_blocklist failed");
if((dtype = H5Dget_type(region_id)) < 0)
HGOTO_ERROR(FALSE, H5E_tools_min_id_g, "H5Dget_type failed");
H5TOOLS_GOTO_ERROR(FALSE, H5E_tools_min_id_g, "H5Dget_type failed");
if((type_id = H5Tget_native_type(dtype, H5T_DIR_DEFAULT)) < 0)
HGOTO_ERROR(FALSE, H5E_tools_min_id_g, "H5Tget_native_type failed");
H5TOOLS_GOTO_ERROR(FALSE, H5E_tools_min_id_g, "H5Tget_native_type failed");
render_bin_output_region_data_blocks(region_id, stream, container, ndims,
type_id, nblocks, ptdata);
render_bin_output_region_data_blocks(region_id, stream, container, ndims, type_id, nblocks, ptdata);
done:
HDfree(ptdata);
if(type_id > 0 && H5Tclose(type_id) < 0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed");
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed");
if(dtype > 0 && H5Tclose(dtype) < 0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed");
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed");
H5_LEAVE(TRUE)
@@ -1622,40 +1681,40 @@ render_bin_output_region_data_points(hid_t region_space, hid_t region_id,
FILE *stream, hid_t container,
unsigned ndims, hid_t type_id, hsize_t npoints)
{
H5TOOLS_ERR_INIT(int, SUCCEED);
hsize_t *dims1 = NULL;
size_t type_size;
hid_t mem_space = -1;
void *region_buf = NULL;
int ret_value = SUCCEED;
if((type_size = H5Tget_size(type_id)) == 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_size failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_size failed");
if((region_buf = HDmalloc(type_size * (size_t)npoints)) == NULL)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for region");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for region");
/* Allocate space for the dimension array */
if((dims1 = (hsize_t *) HDmalloc(sizeof(hsize_t) * ndims)) == NULL)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for dims");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for dims");
dims1[0] = npoints;
if((mem_space = H5Screate_simple(1, dims1, NULL)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Screate_simple failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Screate_simple failed");
if(H5Dread(region_id, type_id, mem_space, region_space, H5P_DEFAULT, region_buf) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dread failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dread failed");
if(H5Sget_simple_extent_dims(region_space, dims1, NULL) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_dims failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_dims failed");
if(render_bin_output(stream, container, type_id, (char*)region_buf, npoints) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "render_bin_output of data points failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "render_bin_output of data points failed");
done:
HDfree(region_buf);
HDfree(dims1);
if(H5Sclose(mem_space) < 0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Sclose failed");
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Sclose failed");
return ret_value;
}
@@ -1674,7 +1733,7 @@ hbool_t
render_bin_output_region_points(hid_t region_space, hid_t region_id,
FILE *stream, hid_t container)
{
HERR_INIT(hbool_t, TRUE)
H5TOOLS_ERR_INIT(hbool_t, TRUE)
hssize_t snpoints;
hsize_t npoints;
int sndims;
@@ -1683,29 +1742,28 @@ render_bin_output_region_points(hid_t region_space, hid_t region_id,
hid_t type_id = -1;
if((snpoints = H5Sget_select_elem_npoints(region_space)) <= 0)
H5E_THROW(FALSE, H5E_tools_min_id_g, "H5Sget_select_elem_npoints failed");
H5TOOLS_THROW(FALSE, H5E_tools_min_id_g, "H5Sget_select_elem_npoints failed");
npoints = (hsize_t)snpoints;
/* Allocate space for the dimension array */
if((sndims = H5Sget_simple_extent_ndims(region_space)) < 0)
H5E_THROW(FALSE, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed");
H5TOOLS_THROW(FALSE, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed");
ndims = (unsigned)sndims;
if((dtype = H5Dget_type(region_id)) < 0)
HGOTO_ERROR(FALSE, H5E_tools_min_id_g, "H5Dget_type failed");
H5TOOLS_GOTO_ERROR(FALSE, H5E_tools_min_id_g, "H5Dget_type failed");
if((type_id = H5Tget_native_type(dtype, H5T_DIR_DEFAULT)) < 0)
HGOTO_ERROR(FALSE, H5E_tools_min_id_g, "H5Tget_native_type failed");
H5TOOLS_GOTO_ERROR(FALSE, H5E_tools_min_id_g, "H5Tget_native_type failed");
render_bin_output_region_data_points(region_space, region_id,
stream, container, ndims, type_id, npoints);
render_bin_output_region_data_points(region_space, region_id, stream, container, ndims, type_id, npoints);
done:
if(type_id > 0 && H5Tclose(type_id) < 0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed");
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed");
if(dtype > 0 && H5Tclose(dtype) < 0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed");
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed");
H5_LEAVE(ret_value)
CATCH
+25 -23
View File
@@ -91,6 +91,7 @@
#define PACKED_BITS "PACKED_BITS"
#define PACKED_OFFSET "OFFSET"
#define PACKED_LENGTH "LENGTH"
#define REGION "REGION"
#define VDS_VIRTUAL "VIRTUAL"
#define VDS_MAPPING "MAPPING"
#define VDS_SOURCE "SOURCE"
@@ -504,25 +505,25 @@ typedef struct h5tool_format_t {
} h5tool_format_t;
typedef struct h5tools_context_t {
size_t cur_column; /*current column for output */
size_t cur_elmt; /*current element/output line */
int need_prefix; /*is line prefix needed? */
unsigned ndims; /*dimensionality */
hsize_t p_min_idx[H5S_MAX_RANK]; /*min selected index */
hsize_t p_max_idx[H5S_MAX_RANK]; /*max selected index */
int prev_multiline; /*was prev datum multiline? */
size_t prev_prefix_len; /*length of previous prefix */
int continuation; /*continuation of previous data?*/
hsize_t size_last_dim; /*the size of the last dimension,
*needed so we can break after each
*row */
unsigned indent_level; /*the number of times we need some
*extra indentation */
unsigned default_indent_level; /*this is used when the indent level gets changed */
size_t cur_column; /* current column for output */
size_t cur_elmt; /* current element/output line */
int need_prefix; /* is line prefix needed? */
unsigned ndims; /* dimensionality */
hsize_t p_min_idx[H5S_MAX_RANK]; /* min selected index */
hsize_t p_max_idx[H5S_MAX_RANK]; /* max selected index */
int prev_multiline; /* was prev datum multiline? */
size_t prev_prefix_len; /* length of previous prefix */
int continuation; /*c ontinuation of previous data?*/
hsize_t size_last_dim; /* the size of the last dimension, needed so we can break after each row */
unsigned indent_level; /* the number of times we need some extra indentation */
unsigned default_indent_level; /* this is used when the indent level gets changed */
hsize_t acc[H5S_MAX_RANK]; /* accumulator position */
hsize_t pos[H5S_MAX_RANK]; /* matrix position */
hsize_t sm_pos; /* current stripmine element position */
const struct H5LD_memb_t * const *cmpd_listv; /* h5watch: vector containing info about the list of compound fields to be printed */
struct subset_t *sset; /* subsetting parameters */
int display_index; /* */
int display_char; /* */
} h5tools_context_t;
typedef struct subset_d {
@@ -569,8 +570,8 @@ H5TOOLS_DLLVAR int data_output; /* data output */
H5TOOLS_DLLVAR int attr_data_output; /* attribute data output */
/* sort parameters */
H5TOOLS_DLLVAR H5_index_t sort_by; /*sort_by [creation_order | name] */
H5TOOLS_DLLVAR H5_iter_order_t sort_order; /*sort_order [ascending | descending] */
H5TOOLS_DLLVAR H5_index_t sort_by; /* sort_by [creation_order | name] */
H5TOOLS_DLLVAR H5_iter_order_t sort_order; /* sort_order [ascending | descending] */
/* things to display or which are set via command line parameters */
H5TOOLS_DLLVAR int enable_error_stack; /* re-enable error stack; disable=0 enable=1 */
@@ -579,6 +580,7 @@ H5TOOLS_DLLVAR int enable_error_stack; /* re-enable error stack; disable=0 e
#define H5_TOOLS_GROUP "GROUP"
#define H5_TOOLS_DATASET "DATASET"
#define H5_TOOLS_DATATYPE "DATATYPE"
#define H5_TOOLS_ATTRIBUTE "ATTRIBUTE"
/* Definitions of useful routines */
H5TOOLS_DLL void h5tools_init(void);
@@ -619,12 +621,12 @@ H5TOOLS_DLL hbool_t h5tools_render_element(FILE *stream, const h5tool_format_t *
h5tools_context_t *ctx, h5tools_str_t *buffer, hsize_t *curr_pos,
size_t ncols, hsize_t local_elmt_counter, hsize_t elmt_counter);
H5TOOLS_DLL hbool_t h5tools_render_region_element(FILE *stream, const h5tool_format_t *info,
h5tools_context_t *ctx/*in,out*/,
h5tools_str_t *buffer/*string into which to render */,
hsize_t *curr_pos/*total data element position*/,
size_t ncols, hsize_t *ptdata,
hsize_t local_elmt_counter/*element counter*/,
hsize_t elmt_counter);
h5tools_context_t *ctx, /*in,out*/
h5tools_str_t *buffer, /*string into which to render */
hsize_t *curr_pos, /*total data element position*/
size_t ncols, hsize_t *ptdata,
hsize_t local_elmt_counter, /*element counter*/
hsize_t elmt_counter);
#ifdef __cplusplus
}
+1017 -682
View File
@@ -184,45 +184,30 @@ BLOCK, /*blockbegin */
};
const h5tools_dump_header_t* h5tools_dump_header_format;
table_t *h5dump_type_table = NULL; /*type table reference for datatype dump */
table_t *h5dump_type_table = NULL; /* type table reference for datatype dump */
/* local prototypes */
static int h5tools_print_region_data_blocks(hid_t region_id,
FILE *stream, const h5tool_format_t *info, h5tools_context_t *cur_ctx,
h5tools_str_t *buffer/*string into which to render */, size_t ncols,
unsigned ndims, hid_t type_id, hsize_t nblocks, hsize_t *ptdata);
hbool_t h5tools_dump_region_data_points(hid_t region_space, hid_t region_id,
FILE *stream, const h5tool_format_t *info,
h5tools_context_t *ctx/*in,out*/,
h5tools_str_t *buffer/*string into which to render */,
hsize_t *curr_pos/*total data element position*/,
size_t ncols, hsize_t region_elmt_counter/*element counter*/,
hsize_t elmt_counter);
h5tools_str_t *buffer, /* string into which to render */
size_t ncols, unsigned ndims, hid_t type_id, hsize_t nblocks, hsize_t *ptdata);
static int h5tools_print_region_data_points(hid_t region_space, hid_t region_id,
FILE *stream, const h5tool_format_t *info, h5tools_context_t *cur_ctx,
h5tools_str_t *buffer, size_t ncols,
unsigned ndims, hid_t type_id, hsize_t npoints, hsize_t *ptdata);
hbool_t h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id,
FILE *stream, const h5tool_format_t *info,
h5tools_context_t *ctx/*in,out*/,
h5tools_str_t *buffer/*string into which to render */,
hsize_t *curr_pos/*total data element position*/,
size_t ncols, hsize_t region_elmt_counter/*element counter*/,
hsize_t elmt_counter);
void h5tools_print_dims(h5tools_str_t *buffer, hsize_t *s, int dims);
void h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info,
h5tools_context_t *ctx, struct subset_t *sset, int dims);
h5tools_context_t *ctx, int dims);
static void h5tools_print_virtual_selection(hid_t vspace,
FILE *stream, const h5tool_format_t *info,
h5tools_context_t *ctx/*in,out*/,
h5tools_str_t *buffer/*string into which to render */,
hsize_t *curr_pos/*total data element position*/,
h5tools_context_t *ctx, /* in,out */
h5tools_str_t *buffer, /* string into which to render */
hsize_t *curr_pos, /* total data element position */
size_t ncols);
void
@@ -269,30 +254,30 @@ h5tools_dump_init(void)
*/
int
h5tools_dump_simple_data(FILE *stream, const h5tool_format_t *info, hid_t container,
h5tools_context_t *ctx/*in,out*/, unsigned flags,
hsize_t nelmts, hid_t type, void *_mem)
h5tools_context_t *ctx, /* in,out */
unsigned flags, hsize_t nelmts, hid_t type, void *_mem)
{
int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */
H5TOOLS_ERR_INIT(int, SUCCEED);
unsigned char *mem = (unsigned char*) _mem;
hsize_t i; /*element counter */
size_t size; /*size of each datum */
hid_t region_space = -1;
hid_t region_id = -1;
hsize_t i; /* element counter */
size_t size; /* size of each datum */
hbool_t dimension_break = TRUE;
H5S_sel_type region_type;
size_t ncols = 80; /*available output width */
h5tools_str_t buffer; /*string into which to render */
hsize_t curr_pos = 0; /* total data element position */
hsize_t elmt_counter = 0;/*counts the # elements printed.
*I (ptl?) needed something that
*isn't going to get reset when a new
*line is formed. I'm going to use
*this var to count elements and
*break after we see a number equal
*to the ctx->size_last_dim. */
size_t ncols = 80; /* available output width */
h5tools_str_t buffer; /* string into which to render */
hsize_t curr_pos = 0; /* total data element position */
hsize_t elmt_counter = 0;/* counts the # elements printed.
* I (ptl?) needed something that
* isn't going to get reset when a new
* line is formed. I'm going to use
* this var to count elements and
* break after we see a number equal
* to the ctx->size_last_dim. */
H5TOOLS_PUSH_STACK();
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "enter");
/* binary dump */
if (bin_output && (rawdatastream != NULL)) {
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "render_bin_output");
if (render_bin_output(rawdatastream, container, type, _mem, nelmts) < 0) {
PRINTVALSTREAM(rawoutstream, "\nError in writing binary stream\n");
}
@@ -301,6 +286,7 @@ h5tools_dump_simple_data(FILE *stream, const h5tool_format_t *info, hid_t contai
/* setup */
HDmemset(&buffer, 0, sizeof(h5tools_str_t));
size = H5Tget_size(type);
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "type size is %ld", size);
if (info->line_ncols > 0)
ncols = info->line_ncols;
@@ -311,98 +297,173 @@ h5tools_dump_simple_data(FILE *stream, const h5tool_format_t *info, hid_t contai
*/
curr_pos = ctx->sm_pos;
if (region_output && (size == H5R_DSET_REG_REF_BUF_SIZE)) {
for (i = 0; i < nelmts; i++, ctx->cur_elmt++, elmt_counter++) {
void* memref = mem + i * size;
char ref_name[1024];
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "data render start:%ld", nelmts);
for (i = 0; i < nelmts; i++, ctx->cur_elmt++, elmt_counter++) {
void* memref = mem + i * size;
/* region data */
region_id = H5Rdereference2(container, H5P_DEFAULT, H5R_DATASET_REGION, memref);
if (region_id >= 0) {
region_space = H5Rget_region(container, H5R_DATASET_REGION, memref);
if (region_space >= 0) {
if (h5tools_is_zero(memref, H5Tget_size(type))) {
ctx->need_prefix = TRUE;
h5tools_simple_prefix(rawoutstream, info, ctx, curr_pos, 0);
/* Render the data element begin*/
h5tools_str_reset(&buffer);
h5tools_str_sprint(&buffer, info, container, type, memref, ctx);
/* Render the region element begin */
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "NULL");
if (i + 1 < nelmts || (flags & END_OF_DATA) == 0)
h5tools_str_append(&buffer, "%s", OPT(info->elmt_suf1, ","));
dimension_break = h5tools_render_element(rawoutstream, info,
ctx, &buffer, &curr_pos, ncols, i, elmt_counter);
}
else {
if(H5Rget_name(region_id, H5R_DATASET_REGION, memref, (char*) ref_name, (size_t)1024)<0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Rget_name failed");
ctx->need_prefix = TRUE;
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(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, 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, rawoutstream, info, ctx,
&buffer, &curr_pos, ncols, i, elmt_counter);
else
HERROR(H5E_tools_g, H5E_tools_min_id_g, "invalid region type");
/* Render the region element end */
} /* end else to if (h5tools_is_zero(... */
if(H5Sclose(region_space) < 0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Sclose failed");
} /* end if (region_space >= 0) */
else
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Rget_region failed");
if(H5Dclose(region_id) < 0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Dclose failed");
} /* if (region_id >= 0) */
else {
/* if (region_id < 0) - could mean that no reference was written do not throw failure */
H5Epush2(H5tools_ERR_STACK_g, __FILE__, FUNC, __LINE__, H5tools_ERR_CLS_g, H5E_tools_g, H5E_tools_min_id_g, "H5Rdereference failed");
}
ctx->need_prefix = TRUE;
if(FALSE == dimension_break)
elmt_counter = 0;
} /* end for (i = 0; i < nelmts... */
} /* end if (region_output... */
else {
for (i = 0; i < nelmts; i++, ctx->cur_elmt++, elmt_counter++) {
void* memref = mem + i * size;
/* Render the data element begin*/
h5tools_str_reset(&buffer);
h5tools_str_sprint(&buffer, info, container, type, memref, ctx);
if (i + 1 < nelmts || (flags & END_OF_DATA) == 0)
h5tools_str_append(&buffer, "%s", OPT(info->elmt_suf1, ","));
dimension_break = h5tools_render_element(stream, info, ctx, &buffer,
&curr_pos, ncols, i, elmt_counter);
/* Render the data element end*/
if(FALSE == dimension_break)
elmt_counter = 0;
} /* end for (i = 0; i < nelmts... */
}
dimension_break = h5tools_render_element(stream, info, ctx, &buffer,
&curr_pos, ncols, i, elmt_counter);
/* Render the data element end*/
if(FALSE == dimension_break)
elmt_counter = 0;
} /* end for (i = 0; i < nelmts... */
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "data render finish");
h5tools_str_close(&buffer);
}/* else bin */
H5TOOLS_ENDDEBUG(H5E_tools_min_dbg_id_g, "exit");
H5TOOLS_POP_STACK();
return ret_value;
}
/*-------------------------------------------------------------------------
* Audience: Public
* Chapter: H5Tools Library
* Purpose: Print some values from an attribute referenced by object reference.
*
* Description:
* This is a special case subfunction to dump aa attribute references.
*
* Return:
* The function returns False if the last dimension has been reached, otherwise True
*
* In/Out:
* h5tools_context_t *ctx
* hsize_t *curr_pos
*
* Parameters Description:
* h5tools_str_t *buffer is the string into which to render
* hsize_t curr_pos is the total data element position
* size_t ncols
* hsize_t region_elmt_counter is the region element loop counter
* hsize_t elmt_count is the data element loop counter
*-------------------------------------------------------------------------
*/
hbool_t
h5tools_dump_region_attribute(hid_t region_id,
FILE *stream, const h5tool_format_t *info,
h5tools_context_t *ctx, /* in,out */
h5tools_str_t *buffer, /* string into which to render */
hsize_t *curr_pos, /* total data element position */
size_t ncols, hsize_t region_elmt_counter, /* element counter */
hsize_t elmt_counter)
{
H5TOOLS_ERR_INIT(hbool_t, TRUE)
hbool_t dimension_break = TRUE;
hid_t atype = H5I_INVALID_HID;
hid_t type_id = H5I_INVALID_HID;
hid_t region_space = H5I_INVALID_HID;
h5tool_format_t outputformat; /* Use to disable prefix for DATA attribute display */
HDassert(info);
HDassert(ctx);
HDassert(buffer);
H5TOOLS_PUSH_STACK();
outputformat = *info;
outputformat.idx_fmt = "";
outputformat.idx_n_fmt = "";
outputformat.idx_sep = "";
outputformat.line_pre = "";
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "enter");
/* Render the region { element begin */
h5tools_str_reset(buffer);
h5tools_str_append(buffer, " {");
dimension_break = h5tools_render_element(stream, &outputformat, ctx, buffer, curr_pos, ncols, region_elmt_counter, elmt_counter);
/* Render the region { element end */
if((region_space = H5Aget_space(region_id)) < 0)
H5TOOLS_GOTO_ERROR(dimension_break, H5E_tools_min_id_g, "H5Aget_space failed");
if((atype = H5Aget_type(region_id)) < 0)
H5TOOLS_GOTO_ERROR(dimension_break, H5E_tools_min_id_g, "H5Aget_type failed");
if((type_id = H5Tget_native_type(atype, H5T_DIR_DEFAULT)) < 0)
H5TOOLS_GOTO_ERROR(dimension_break, H5E_tools_min_id_g, "H5Tget_native_type failed");
ctx->indent_level++;
ctx->need_prefix = TRUE;
/* Render the datatype element begin */
h5tools_str_reset(buffer);
h5tools_str_append(buffer, "%s %s ",
h5tools_dump_header_format->datatypebegin,
h5tools_dump_header_format->datatypeblockbegin);
ctx->need_prefix = TRUE;
ctx->indent_level++;
h5tools_print_datatype(stream, buffer, info, ctx, atype, TRUE);
ctx->indent_level--;
if (HDstrlen(h5tools_dump_header_format->datatypeblockend)) {
h5tools_str_append(buffer, "%s", h5tools_dump_header_format->datatypeblockend);
if (HDstrlen(h5tools_dump_header_format->datatypeend))
h5tools_str_append(buffer, " ");
}
if (HDstrlen(h5tools_dump_header_format->datatypeend))
h5tools_str_append(buffer, "%s", h5tools_dump_header_format->datatypeend);
dimension_break = h5tools_render_element(stream, info, ctx, buffer, curr_pos, ncols, region_elmt_counter, elmt_counter);
/* Render the datatype element end */
ctx->need_prefix = TRUE;
/* Render the dataspace element begin */
h5tools_str_reset(buffer);
h5tools_str_append(buffer, "%s ", h5tools_dump_header_format->dataspacebegin);
h5tools_print_dataspace(buffer, region_space);
if (HDstrlen(h5tools_dump_header_format->dataspaceblockend)) {
h5tools_str_append(buffer, "%s", h5tools_dump_header_format->dataspaceblockend);
if (HDstrlen(h5tools_dump_header_format->dataspaceend))
h5tools_str_append(buffer, " ");
}
if (HDstrlen(h5tools_dump_header_format->dataspaceend))
h5tools_str_append(buffer, "%s", h5tools_dump_header_format->dataspaceblockend);
dimension_break = h5tools_render_element(stream, info, ctx, buffer, curr_pos, ncols, region_elmt_counter, elmt_counter);
/* Render the dataspace element end */
if (region_output) {
ctx->need_prefix = TRUE;
h5tools_dump_data(rawdatastream, &outputformat, ctx, region_id, FALSE);
}
done:
if(H5Tclose(type_id) < 0)
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed");
if(H5Tclose(atype) < 0)
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed");
ctx->indent_level--;
ctx->need_prefix = TRUE;
/* Render the region } element begin */
h5tools_str_reset(buffer);
h5tools_str_append(buffer, "}");
dimension_break = h5tools_render_element(stream, info, ctx, buffer, curr_pos, ncols, region_elmt_counter, elmt_counter);
/* Render the region } element end */
H5_LEAVE(dimension_break)
CATCH
H5TOOLS_ENDDEBUG(H5E_tools_min_dbg_id_g, "exit");
H5TOOLS_POP_STACK();
return ret_value;
}
@@ -427,9 +488,10 @@ h5tools_dump_simple_data(FILE *stream, const h5tool_format_t *info, hid_t contai
static int
h5tools_print_region_data_blocks(hid_t region_id,
FILE *stream, const h5tool_format_t *info, h5tools_context_t *cur_ctx,
h5tools_str_t *buffer/*string into which to render */, size_t ncols,
unsigned ndims, hid_t type_id, hsize_t nblocks, hsize_t *ptdata)
h5tools_str_t *buffer, /* string into which to render */
size_t ncols, unsigned ndims, hid_t type_id, hsize_t nblocks, hsize_t *ptdata)
{
H5TOOLS_ERR_INIT(int, SUCCEED);
hbool_t dimension_break = TRUE;
hsize_t *dims1 = NULL;
hsize_t *start = NULL;
@@ -444,7 +506,6 @@ h5tools_print_region_data_blocks(hid_t region_id,
unsigned indx;
unsigned jndx;
size_t type_size;
int ret_value = SUCCEED;
hid_t mem_space = -1;
hid_t sid1 = -1;
h5tools_context_t ctx;
@@ -457,13 +518,19 @@ h5tools_print_region_data_blocks(hid_t region_id,
HDmemset(&ctx, 0, sizeof(ctx));
H5TOOLS_PUSH_STACK();
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "enter");
if((type_size = H5Tget_size(type_id)) == 0)
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_size failed");
/* Get the dataspace of the dataset */
if((sid1 = H5Dget_space(region_id)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_space failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_space failed");
/* Allocate space for the dimension array */
if((dims1 = (hsize_t *) HDmalloc((size_t)(sizeof(hsize_t) * ndims))) == NULL)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for dims");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for dims");
/* find the dimensions of each data space from the block coordinates */
numelem = 1;
@@ -474,21 +541,18 @@ h5tools_print_region_data_blocks(hid_t region_id,
/* Create dataspace for reading buffer */
if((mem_space = H5Screate_simple((int)ndims, dims1, NULL)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Screate_simple failed");
if((type_size = H5Tget_size(type_id)) == 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_size failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Screate_simple failed");
if((region_buf = HDmalloc(type_size * (size_t)numelem)) == NULL)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Could not allocate region buffer");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "Could not allocate region buffer");
/* Select (x , x , ..., x ) x (y , y , ..., y ) hyperslab for reading memory dataset */
/* 1 2 n 1 2 n */
if((start = (hsize_t *) HDmalloc(sizeof(hsize_t) * ndims)) == NULL)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for start");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for start");
if((count = (hsize_t *) HDmalloc(sizeof(hsize_t) * ndims)) == NULL)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for count");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for count");
curr_pos = 0;
ctx.indent_level = cur_ctx->indent_level;
@@ -503,56 +567,63 @@ h5tools_print_region_data_blocks(hid_t region_id,
count[indx] = dims1[indx];
}
if(H5Sselect_hyperslab(sid1, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Sselect_hyperslab failed");
if(H5Sselect_hyperslab(sid1, H5S_SELECT_SET, start, NULL, count, NULL) >= 0) {
if(H5Dread(region_id, type_id, mem_space, sid1, H5P_DEFAULT, region_buf) >= 0) {
ctx.indent_level++;
if(H5Sget_simple_extent_dims(mem_space, total_size, NULL) >= 0) {
/* assume entire data space to be printed */
for (indx = 0; indx < (unsigned)ctx.ndims; indx++)
ctx.p_min_idx[indx] = start[indx];
init_acc_pos(&ctx, total_size);
if(H5Dread(region_id, type_id, mem_space, sid1, H5P_DEFAULT, region_buf) < 0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Dread failed");
/* print the data */
region_flags = START_OF_DATA;
if (blkndx == nblocks - 1)
region_flags |= END_OF_DATA;
ctx.indent_level++;
if(H5Sget_simple_extent_dims(mem_space, total_size, NULL) < 0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Sget_simple_extent_dims failed");
for (indx = 0; indx < (unsigned)ctx.ndims; indx++)
ctx.p_max_idx[indx] = dims1[indx];
/* assume entire data space to be printed */
for (indx = 0; indx < (unsigned)ctx.ndims; indx++)
ctx.p_min_idx[indx] = start[indx];
init_acc_pos(&ctx, total_size);
curr_pos = 0;
ctx.sm_pos = blkndx * 2 * ndims;
ctx.size_last_dim = dims1[ndims-1];
/* print the data */
region_flags = START_OF_DATA;
if (blkndx == nblocks - 1)
region_flags |= END_OF_DATA;
h5tools_region_simple_prefix(stream, info, &ctx, curr_pos, ptdata, 0);
for (indx = 0; indx < (unsigned)ctx.ndims; indx++)
ctx.p_max_idx[indx] = dims1[indx];
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "data render start:%ld", numelem);
elmtno = 0;
for (numindex = 0; numindex < numelem; numindex++, elmtno++, ctx.cur_elmt++) {
/* Render the region data element begin */
h5tools_str_reset(buffer);
curr_pos = 0;
ctx.sm_pos = blkndx * 2 * ndims;
ctx.size_last_dim = dims1[ndims-1];
h5tools_str_append(buffer, "%s", numindex ? OPTIONAL_LINE_BREAK "" : "");
h5tools_str_sprint(buffer, info, region_id, type_id,
((char*)region_buf + numindex * type_size), &ctx);
h5tools_region_simple_prefix(stream, info, &ctx, curr_pos, ptdata, 0);
if (numindex + 1 < numelem || (region_flags & END_OF_DATA) == 0)
h5tools_str_append(buffer, "%s", OPT(info->elmt_suf1, ","));
elmtno = 0;
for (numindex = 0; numindex < numelem; numindex++, elmtno++, ctx.cur_elmt++) {
/* Render the region data element begin */
h5tools_str_reset(buffer);
dimension_break = h5tools_render_region_element(stream, info, &ctx, buffer, &curr_pos,
ncols, ptdata, numindex, elmtno);
/* Render the region data element end */
h5tools_str_append(buffer, "%s", numindex ? OPTIONAL_LINE_BREAK "" : "");
h5tools_str_sprint(buffer, info, region_id, type_id,
((char*)region_buf + numindex * type_size), &ctx);
if(FALSE == dimension_break)
elmtno = 0;
} /* end for (numindex = 0; numindex < numelem; numindex++, elmtno++, ctx.cur_elmt++) */
}
else {
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Sget_simple_extent_dims failed");
}
ctx.indent_level--;
}
else {
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Dread failed");
}
}
else {
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Sselect_hyperslab failed");
}
if (numindex + 1 < numelem || (region_flags & END_OF_DATA) == 0)
h5tools_str_append(buffer, "%s", OPT(info->elmt_suf1, ","));
dimension_break = h5tools_render_region_element(stream, info, &ctx, buffer, &curr_pos,
ncols, ptdata, numindex, elmtno);
/* Render the region data element end */
if(FALSE == dimension_break)
elmtno = 0;
} /* end for (numindex = 0; numindex < numelem; numindex++, elmtno++, ctx.cur_elmt++) */
ctx.indent_level--;
} /* end for (blkndx = 0; blkndx < nblocks; blkndx++) */
done:
@@ -562,9 +633,12 @@ h5tools_print_region_data_blocks(hid_t region_id,
HDfree(dims1);
if(H5Sclose(mem_space) < 0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Sclose failed");
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Sclose failed");
if(H5Sclose(sid1) < 0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Sclose failed");
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Sclose failed");
CATCH
H5TOOLS_ENDDEBUG(H5E_tools_min_dbg_id_g, "exit");
H5TOOLS_POP_STACK();
return ret_value;
}
@@ -595,13 +669,13 @@ h5tools_print_region_data_blocks(hid_t region_id,
hbool_t
h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id,
FILE *stream, const h5tool_format_t *info,
h5tools_context_t *ctx/*in,out*/,
h5tools_str_t *buffer/*string into which to render */,
hsize_t *curr_pos/*total data element position*/,
size_t ncols, hsize_t region_elmt_counter/*element counter*/,
h5tools_context_t *ctx, /* in,out */
h5tools_str_t *buffer, /* string into which to render */
hsize_t *curr_pos, /* total data element position */
size_t ncols, hsize_t region_elmt_counter, /* element counter */
hsize_t elmt_counter)
{
HERR_INIT(hbool_t, TRUE)
H5TOOLS_ERR_INIT(hbool_t, TRUE)
hbool_t dimension_break = TRUE;
hssize_t snblocks;
hsize_t nblocks;
@@ -609,28 +683,39 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id,
hsize_t *ptdata = NULL;
int sndims;
unsigned ndims;
hid_t dtype = -1;
hid_t type_id = -1;
hsize_t u;
hsize_t indx;
hid_t dtype = H5I_INVALID_HID;
hid_t type_id = H5I_INVALID_HID;
h5tool_format_t outputformat; /* Use to disable prefix for DATA attribute display */
HDassert(info);
HDassert(ctx);
HDassert(buffer);
H5TOOLS_PUSH_STACK();
outputformat = *info;
outputformat.idx_fmt = "";
outputformat.idx_n_fmt = "";
outputformat.idx_sep = "";
outputformat.line_pre = "";
if((snblocks = H5Sget_select_hyper_nblocks(region_space)) <= 0)
H5E_THROW(dimension_break, H5E_tools_min_id_g, "H5Sget_select_hyper_nblocks failed");
H5TOOLS_THROW(dimension_break, H5E_tools_min_id_g, "H5Sget_select_hyper_nblocks failed");
nblocks = (hsize_t)snblocks;
/* Print block information */
if((sndims = H5Sget_simple_extent_ndims(region_space)) < 0)
H5E_THROW(dimension_break, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed");
H5TOOLS_THROW(dimension_break, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed");
ndims = (unsigned)sndims;
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "enter ndims=%d", ndims);
/* Render the region { element begin */
h5tools_str_reset(buffer);
h5tools_str_append(buffer, "{");
dimension_break = h5tools_render_element(stream, info, ctx, buffer, curr_pos, ncols, region_elmt_counter, elmt_counter);
h5tools_str_append(buffer, " {");
dimension_break = h5tools_render_element(stream, &outputformat, ctx, buffer, curr_pos, ncols, region_elmt_counter, elmt_counter);
/* Render the region { element end */
ctx->indent_level++;
@@ -642,31 +727,29 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id,
alloc_size = nblocks * ndims * 2 * sizeof(ptdata[0]);
HDassert(alloc_size == (hsize_t) ((size_t) alloc_size)); /*check for overflow*/
if((ptdata = (hsize_t*) HDmalloc((size_t) alloc_size)) == NULL) {
HERROR(H5E_tools_g, H5E_tools_min_id_g, "Could not allocate buffer for ptdata");
HGOTO_DONE(dimension_break);
}
if((ptdata = (hsize_t*) HDmalloc((size_t) alloc_size)) == NULL)
H5TOOLS_GOTO_ERROR(dimension_break, H5E_tools_min_id_g, "Could not allocate buffer for ptdata");
if(H5Sget_select_hyper_blocklist(region_space, (hsize_t)0, nblocks, ptdata) < 0)
HGOTO_ERROR(dimension_break, H5E_tools_min_id_g, "H5Rget_select_hyper_blocklist failed");
H5TOOLS_GOTO_ERROR(dimension_break, H5E_tools_min_id_g, "H5Rget_select_hyper_blocklist failed");
for(u = 0; u < nblocks; u++) {
unsigned v;
for(indx = 0; indx < nblocks; indx++) {
unsigned loop_indx;
h5tools_str_append(buffer, info->dset_blockformat_pre,
u ? "," OPTIONAL_LINE_BREAK " " : "", (unsigned long)u);
h5tools_str_append(buffer, outputformat.dset_blockformat_pre,
indx ? "," OPTIONAL_LINE_BREAK " " : "", (unsigned long)indx);
/* Start coordinates and opposite corner */
for (v = 0; v < ndims; v++)
h5tools_str_append(buffer, "%s" HSIZE_T_FORMAT, v ? "," : "(",
ptdata[u * 2 * ndims + v]);
for (loop_indx = 0; loop_indx < ndims; loop_indx++)
h5tools_str_append(buffer, "%s" HSIZE_T_FORMAT, loop_indx ? "," : "(",
ptdata[indx * 2 * ndims + loop_indx]);
for (v = 0; v < ndims; v++)
h5tools_str_append(buffer, "%s" HSIZE_T_FORMAT, v ? "," : ")-(",
ptdata[u * 2 * ndims + v + ndims]);
for (loop_indx = 0; loop_indx < ndims; loop_indx++)
h5tools_str_append(buffer, "%s" HSIZE_T_FORMAT, loop_indx ? "," : ")-(",
ptdata[indx * 2 * ndims + loop_indx + ndims]);
h5tools_str_append(buffer, ")");
} /* end for (u = 0; u < nblocks; u++) */
} /* end for (indx = 0; indx < nblocks; indx++) */
dimension_break = h5tools_render_element(stream, info, ctx, buffer, curr_pos, ncols, region_elmt_counter, elmt_counter);
/* Render the region datatype info and indices element end */
@@ -674,9 +757,9 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id,
ctx->need_prefix = TRUE;
if((dtype = H5Dget_type(region_id)) < 0)
HGOTO_ERROR(dimension_break, H5E_tools_min_id_g, "H5Dget_type failed");
H5TOOLS_GOTO_ERROR(dimension_break, H5E_tools_min_id_g, "H5Dget_type failed");
if((type_id = H5Tget_native_type(dtype, H5T_DIR_DEFAULT)) < 0)
HGOTO_ERROR(dimension_break, H5E_tools_min_id_g, "H5Tget_native_type failed");
H5TOOLS_GOTO_ERROR(dimension_break, H5E_tools_min_id_g, "H5Tget_native_type failed");
/* Render the datatype element begin */
h5tools_str_reset(buffer);
@@ -718,40 +801,47 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id,
dimension_break = h5tools_render_element(stream, info, ctx, buffer, curr_pos, ncols, region_elmt_counter, elmt_counter);
/* Render the dataspace element end */
ctx->need_prefix = TRUE;
if (region_output) {
ctx->need_prefix = TRUE;
/* Render the databegin element begin */
h5tools_str_reset(buffer);
h5tools_str_append(buffer, "%s %s ",
h5tools_dump_header_format->databegin,
h5tools_dump_header_format->datablockbegin);
dimension_break = h5tools_render_element(stream, info, ctx, buffer, curr_pos, ncols, region_elmt_counter, elmt_counter);
/* Render the databegin element end */
/* Render the databegin element begin */
h5tools_str_reset(buffer);
h5tools_str_append(buffer, "%s %s",
h5tools_dump_header_format->databegin,
h5tools_dump_header_format->datablockbegin);
dimension_break = h5tools_render_element(stream, info, ctx, buffer, curr_pos, ncols, region_elmt_counter, elmt_counter);
/* Render the databegin element end */
ctx->need_prefix = TRUE;
h5tools_print_region_data_blocks(region_id, rawdatastream, info, ctx,
buffer, ncols, ndims, type_id, nblocks, ptdata);
ctx->need_prefix = TRUE;
h5tools_print_region_data_blocks(region_id, stream, info, ctx, buffer, ncols, ndims, type_id, nblocks, ptdata);
}
done:
HDfree(ptdata);
if(H5Tclose(type_id) < 0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed");
if(type_id > 0 && H5Tclose(type_id) < 0)
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed");
if(H5Tclose(dtype) < 0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed");
if(dtype > 0 && H5Tclose(dtype) < 0)
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed");
ctx->need_prefix = TRUE;
if (region_output) {
ctx->need_prefix = TRUE;
/* Render the dataend element begin */
h5tools_str_reset(buffer);
h5tools_str_append(buffer, "%s %s ",
h5tools_dump_header_format->dataend,
h5tools_dump_header_format->datablockend);
dimension_break = h5tools_render_element(stream, info, ctx, buffer, curr_pos,
ncols, region_elmt_counter, elmt_counter);
/* Render the dataend element end */
/* Render the dataend element begin */
h5tools_str_reset(buffer);
if(HDstrlen(h5tools_dump_header_format->datablockend)) {
h5tools_str_append(buffer, "%s", h5tools_dump_header_format->datablockend);
if(HDstrlen(h5tools_dump_header_format->dataend))
h5tools_str_append(buffer, " ");
}
if(HDstrlen(h5tools_dump_header_format->dataend))
h5tools_str_append(buffer, "%s", h5tools_dump_header_format->dataend);
dimension_break = h5tools_render_element(stream, &outputformat, ctx, buffer, curr_pos,
ncols, region_elmt_counter, elmt_counter);
/* Render the dataend element end */
}
ctx->indent_level--;
ctx->need_prefix = TRUE;
@@ -759,13 +849,16 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id,
/* Render the region } element begin */
h5tools_str_reset(buffer);
h5tools_str_append(buffer, "}");
dimension_break = h5tools_render_element(stream, info, ctx, buffer, curr_pos,
ncols, region_elmt_counter, elmt_counter);
dimension_break = h5tools_render_element(stream, info, ctx, buffer, curr_pos, ncols, region_elmt_counter, elmt_counter);
/* Render the region } element end */
H5_LEAVE(dimension_break)
CATCH
CATCH
H5TOOLS_ENDDEBUG(H5E_tools_min_dbg_id_g, "exit");
H5TOOLS_POP_STACK();
return ret_value;
}
@@ -793,6 +886,7 @@ h5tools_print_region_data_points(hid_t region_space, hid_t region_id,
h5tools_str_t *buffer, size_t ncols,
unsigned ndims, hid_t type_id, hsize_t npoints, hsize_t *ptdata)
{
H5TOOLS_ERR_INIT(int, SUCCEED);
hbool_t dimension_break = TRUE;
hsize_t *dims1 = NULL;
hsize_t elmtno; /* elemnt index */
@@ -801,9 +895,8 @@ h5tools_print_region_data_points(hid_t region_space, hid_t region_id,
hsize_t jndx;
unsigned indx;
size_t type_size;
int ret_value = SUCCEED;
unsigned int region_flags; /* buffer extent flags */
hid_t mem_space = -1;
hid_t mem_space = H5I_INVALID_HID;
void *region_buf = NULL;
h5tools_context_t ctx;
@@ -813,22 +906,25 @@ h5tools_print_region_data_points(hid_t region_space, hid_t region_id,
HDassert(ptdata);
HDassert(ndims > 0);
H5TOOLS_PUSH_STACK();
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "enter");
HDmemset(&ctx, 0, sizeof(ctx));
/* Allocate space for the dimension array */
if((dims1 = (hsize_t *) HDmalloc(sizeof(hsize_t) * ndims)) == NULL)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for dims");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for dims");
dims1[0] = npoints;
/* Create dataspace for reading buffer */
if((mem_space = H5Screate_simple(1, dims1, NULL)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Screate_simple failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "H5Screate_simple failed");
if((type_size = H5Tget_size(type_id)) == 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_size failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_size failed");
if((region_buf = HDmalloc(type_size * (size_t)npoints)) == NULL)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for region");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for region");
curr_pos = 0;
ctx.indent_level = cur_ctx->indent_level;
@@ -837,64 +933,70 @@ h5tools_print_region_data_points(hid_t region_space, hid_t region_id,
ctx.ndims = ndims;
if(H5Dread(region_id, type_id, mem_space, region_space, H5P_DEFAULT, region_buf) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dread failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dread failed");
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "data render start:%ld", npoints);
elmtno = 0;
for (jndx = 0; jndx < npoints; jndx++, elmtno++) {
ctx.need_prefix = TRUE;
ctx.cur_elmt = 0; /* points are always 0 */
ctx.indent_level++;
if(H5Sget_simple_extent_dims(mem_space, total_size, NULL) < 0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Sget_simple_extent_dims failed");
/* assume entire data space to be printed */
for (indx = 0; indx < ctx.ndims; indx++)
ctx.p_min_idx[indx] = 0;
init_acc_pos(&ctx, total_size);
if(H5Sget_simple_extent_dims(mem_space, total_size, NULL) >= 0) {
/* assume entire data space to be printed */
for (indx = 0; indx < ctx.ndims; indx++)
ctx.p_min_idx[indx] = 0;
init_acc_pos(&ctx, total_size);
/* print the data */
region_flags = START_OF_DATA;
if (jndx == npoints - 1)
region_flags |= END_OF_DATA;
/* print the data */
region_flags = START_OF_DATA;
if (jndx == npoints - 1)
region_flags |= END_OF_DATA;
for (indx = 0; indx < ctx.ndims; indx++)
ctx.p_max_idx[indx] = cur_ctx->p_max_idx[indx];
for (indx = 0; indx < ctx.ndims; indx++)
ctx.p_max_idx[indx] = cur_ctx->p_max_idx[indx];
ctx.sm_pos = jndx * ndims;
if (ctx.ndims > 0)
ctx.size_last_dim = ctx.p_max_idx[ctx.ndims - 1];
else
ctx.size_last_dim = 0;
ctx.sm_pos = jndx * ndims;
if (ctx.ndims > 0)
ctx.size_last_dim = ctx.p_max_idx[ctx.ndims - 1];
else
ctx.size_last_dim = 0;
curr_pos = 0; /* points requires constant 0 */
h5tools_region_simple_prefix(stream, info, &ctx, curr_pos, ptdata, 0);
curr_pos = 0; /* points requires constant 0 */
h5tools_region_simple_prefix(stream, info, &ctx, curr_pos, ptdata, 0);
/* Render the point element begin */
h5tools_str_reset(buffer);
/* Render the point element begin */
h5tools_str_reset(buffer);
h5tools_str_append(buffer, "%s", jndx ? OPTIONAL_LINE_BREAK "" : "");
h5tools_str_sprint(buffer, info, region_id, type_id,
((char*)region_buf + jndx * type_size), &ctx);
h5tools_str_append(buffer, "%s", jndx ? OPTIONAL_LINE_BREAK "" : "");
h5tools_str_sprint(buffer, info, region_id, type_id,
((char*)region_buf + jndx * type_size), &ctx);
if (jndx + 1 < npoints || (region_flags & END_OF_DATA) == 0)
h5tools_str_append(buffer, "%s", OPT(info->elmt_suf1, ","));
dimension_break = h5tools_render_region_element(stream, info, &ctx, buffer, &curr_pos,
ncols, ptdata, (hsize_t)0, elmtno);
/* Render the point element end */
if(FALSE == dimension_break)
elmtno = 0;
if (jndx + 1 < npoints || (region_flags & END_OF_DATA) == 0)
h5tools_str_append(buffer, "%s", OPT(info->elmt_suf1, ","));
dimension_break = h5tools_render_region_element(stream, info, &ctx, buffer, &curr_pos,
ncols, ptdata, (hsize_t)0, elmtno);
/* Render the point element end */
if(FALSE == dimension_break)
elmtno = 0;
}
else {
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Sget_simple_extent_dims failed");
}
ctx.indent_level--;
} /* end for (jndx = 0; jndx < npoints; jndx++, elmtno++) */
done:
done:
HDfree(region_buf);
CATCH
HDfree(dims1);
if(H5Sclose(mem_space) < 0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Sclose failed");
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Sclose failed");
H5TOOLS_ENDDEBUG(H5E_tools_min_dbg_id_g, "exit");
H5TOOLS_POP_STACK();
return ret_value;
}
@@ -926,8 +1028,9 @@ hbool_t
h5tools_dump_region_data_points(hid_t region_space, hid_t region_id,
FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx,
h5tools_str_t *buffer, hsize_t *curr_pos, size_t ncols, hsize_t region_elmt_counter,
hsize_t elmt_counter) {
HERR_INIT(hbool_t, TRUE)
hsize_t elmt_counter)
{
H5TOOLS_ERR_INIT(hbool_t, TRUE)
hbool_t dimension_break = TRUE;
hssize_t snpoints;
hsize_t npoints;
@@ -936,48 +1039,59 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id,
int sndims;
unsigned ndims;
hsize_t indx;
hid_t dtype = -1;
hid_t type_id = -1;
hid_t dtype = H5I_INVALID_HID;
hid_t type_id = H5I_INVALID_HID;
h5tool_format_t outputformat; /* Use to disable prefix for DATA attribute display */
HDassert(info);
HDassert(ctx);
HDassert(buffer);
H5TOOLS_PUSH_STACK();
outputformat = *info;
outputformat.idx_fmt = "";
outputformat.idx_n_fmt = "";
outputformat.idx_sep = "";
outputformat.line_pre = "";
if((snpoints = H5Sget_select_elem_npoints(region_space)) <= 0)
H5E_THROW(dimension_break, H5E_tools_min_id_g, "H5Sget_select_elem_npoints failed");
H5TOOLS_THROW(dimension_break, H5E_tools_min_id_g, "H5Sget_select_elem_npoints failed");
npoints = (hsize_t)snpoints;
/* Allocate space for the dimension array */
if((sndims = H5Sget_simple_extent_ndims(region_space)) < 0)
H5E_THROW(dimension_break, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed");
H5TOOLS_THROW(dimension_break, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed");
ndims = (unsigned)sndims;
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "enter ndims=%d", ndims);
/* Render the region { element begin */
h5tools_str_reset(buffer);
h5tools_str_append(buffer, "{");
dimension_break = h5tools_render_element(stream, info, ctx, buffer, curr_pos, ncols, region_elmt_counter, elmt_counter);
dimension_break = h5tools_render_element(stream, &outputformat, ctx, buffer, curr_pos, ncols, region_elmt_counter, elmt_counter);
/* Render the region { element end */
/* Render the region datatype info and indices element begin */
h5tools_str_reset(buffer);
ctx->indent_level++;
ctx->need_prefix = TRUE;
/* Render the region datatype info and indices element begin */
h5tools_str_reset(buffer);
h5tools_str_append(buffer, "REGION_TYPE POINT ");
alloc_size = npoints * ndims * sizeof(ptdata[0]);
HDassert(alloc_size == (hsize_t) ((size_t) alloc_size)); /*check for overflow*/
if(NULL == (ptdata = (hsize_t *)HDmalloc((size_t) alloc_size)))
HGOTO_ERROR(dimension_break, H5E_tools_min_id_g, "Could not allocate buffer for ptdata");
H5TOOLS_GOTO_ERROR(dimension_break, H5E_tools_min_id_g, "Could not allocate buffer for ptdata");
if(H5Sget_select_elem_pointlist(region_space, (hsize_t) 0, npoints, ptdata) < 0)
HGOTO_ERROR(dimension_break, H5E_tools_min_id_g, "H5Sget_select_elem_pointlist failed");
H5TOOLS_GOTO_ERROR(dimension_break, H5E_tools_min_id_g, "H5Sget_select_elem_pointlist failed");
for (indx = 0; indx < npoints; indx++) {
unsigned loop_indx;
h5tools_str_append(buffer, info->dset_ptformat_pre,
h5tools_str_append(buffer, outputformat.dset_ptformat_pre,
indx ? "," OPTIONAL_LINE_BREAK " " : "", (unsigned long) indx);
for (loop_indx = 0; loop_indx < ndims; loop_indx++)
@@ -993,10 +1107,9 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id,
ctx->need_prefix = TRUE;
if((dtype = H5Dget_type(region_id)) < 0)
HGOTO_ERROR(dimension_break, H5E_tools_min_id_g, "H5Dget_type failed");
H5TOOLS_GOTO_ERROR(dimension_break, H5E_tools_min_id_g, "H5Dget_type failed");
if((type_id = H5Tget_native_type(dtype, H5T_DIR_DEFAULT)) < 0)
HGOTO_ERROR(dimension_break, H5E_tools_min_id_g, "H5Tget_native_type failed");
H5TOOLS_GOTO_ERROR(dimension_break, H5E_tools_min_id_g, "H5Tget_native_type failed");
/* Render the datatype element begin */
h5tools_str_reset(buffer);
@@ -1023,8 +1136,6 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id,
/* Render the dataspace element begin */
h5tools_str_reset(buffer);
ctx->need_prefix = TRUE;
h5tools_str_append(buffer, "%s ", h5tools_dump_header_format->dataspacebegin);
h5tools_print_dataspace(buffer, region_space);
@@ -1040,41 +1151,49 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id,
dimension_break = h5tools_render_element(stream, info, ctx, buffer, curr_pos, ncols, region_elmt_counter, elmt_counter);
/* Render the dataspace element end */
ctx->need_prefix = TRUE;
if (region_output) {
ctx->need_prefix = TRUE;
/* Render the databegin element begin */
h5tools_str_reset(buffer);
/* Render the databegin element begin */
h5tools_str_reset(buffer);
h5tools_str_append(buffer, "%s %s ",
h5tools_dump_header_format->databegin,
h5tools_dump_header_format->datablockbegin);
h5tools_str_append(buffer, "%s %s",
h5tools_dump_header_format->databegin,
h5tools_dump_header_format->datablockbegin);
dimension_break = h5tools_render_element(stream, info, ctx, buffer, curr_pos, ncols, region_elmt_counter, elmt_counter);
dimension_break = h5tools_render_element(stream, info, ctx, buffer, curr_pos, ncols, region_elmt_counter, elmt_counter);
ctx->need_prefix = TRUE;
ctx->need_prefix = TRUE;
h5tools_print_region_data_points(region_space, region_id,
rawdatastream, info, ctx, buffer, ncols, ndims, type_id, npoints, ptdata);
h5tools_print_region_data_points(region_space, region_id, stream, info, ctx, buffer, ncols, ndims, type_id, npoints, ptdata);
}
done:
HDfree(ptdata);
if(type_id > 0 && H5Tclose(type_id) < 0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed");
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed");
if(dtype > 0 && H5Tclose(dtype) < 0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed");
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed");
ctx->need_prefix = TRUE;
if (region_output) {
ctx->need_prefix = TRUE;
/* Render the dataend element begin */
h5tools_str_reset(buffer);
h5tools_str_append(buffer, "%s %s ",
h5tools_dump_header_format->dataend,
h5tools_dump_header_format->datablockend);
dimension_break = h5tools_render_element(stream, info, ctx, buffer, curr_pos,
ncols, region_elmt_counter, elmt_counter);
/* Render the dataend element end*/
/* Render the dataend element begin */
h5tools_str_reset(buffer);
if(HDstrlen(h5tools_dump_header_format->datablockend)) {
h5tools_str_append(buffer, "%s", h5tools_dump_header_format->datablockend);
if(HDstrlen(h5tools_dump_header_format->dataend))
h5tools_str_append(buffer, " ");
}
if(HDstrlen(h5tools_dump_header_format->dataend))
h5tools_str_append(buffer, "%s", h5tools_dump_header_format->dataend);
dimension_break = h5tools_render_element(stream, &outputformat, ctx, buffer, curr_pos,
ncols, region_elmt_counter, elmt_counter);
/* Render the dataend element end*/
}
ctx->indent_level--;
ctx->need_prefix = TRUE;
@@ -1088,6 +1207,10 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id,
H5_LEAVE(dimension_break)
CATCH
H5TOOLS_ENDDEBUG(H5E_tools_min_dbg_id_g, "exit");
H5TOOLS_POP_STACK();
return ret_value;
}
@@ -1125,16 +1248,16 @@ CATCH
*/
static herr_t
h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx,
hid_t dset, hid_t p_type, struct subset_t *sset,
hid_t dset, hid_t p_type,
hid_t f_space, hsize_t hyperslab_count,
hsize_t *temp_start,/* start inside offset count loop */
hsize_t *temp_count,/* count inside offset count loop */
hsize_t *temp_block,/* block size used in loop */
hsize_t *temp_stride,/* stride size used in loop */
hsize_t *total_size,/* total size of dataset */
unsigned int row_dim/* index of row_counter dimension */)
hsize_t *temp_start, /* start inside offset count loop */
hsize_t *temp_count, /* count inside offset count loop */
hsize_t *temp_block, /* block size used in loop */
hsize_t *temp_stride, /* stride size used in loop */
hsize_t *total_size, /* total size of dataset */
unsigned int row_dim) /* index of row_counter dimension */
{
HERR_INIT(herr_t, SUCCEED)
H5TOOLS_ERR_INIT(herr_t, SUCCEED)
size_t i; /* counters */
size_t j; /* counters */
hsize_t zero[1] = {0}; /* vector of zeros */
@@ -1148,7 +1271,7 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c
hssize_t ssm_nelmts; /* elements per stripmine*/
hsize_t sm_nelmts; /* elements per stripmine*/
unsigned char *sm_buf = NULL; /* buffer for raw data */
hid_t sm_space = -1; /* stripmine data space */
hid_t sm_space = H5I_INVALID_HID; /* stripmine data space */
hsize_t size_row_block; /* size for blocks along rows */
hsize_t row_counter = 0;
@@ -1156,12 +1279,12 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c
unsigned int vl_data = 0; /* contains VL datatypes */
if ((size_t) ctx->ndims > NELMTS(sm_size))
H5E_THROW(FAIL, H5E_tools_min_id_g, "ndims and sm_size comparision failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "ndims and sm_size comparision failed");
if (ctx->ndims > 0)
init_acc_pos(ctx, total_size);
size_row_block = sset->block.data[row_dim];
size_row_block = ctx->sset->block.data[row_dim];
/* Check if we have VL data in the dataset's datatype */
if (h5tools_detect_vlen(p_type) == TRUE)
@@ -1173,9 +1296,9 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c
cases where block > 1 only and stride > block */
if (size_row_block > 1
&& row_counter == size_row_block
&& sset->stride.data[row_dim] > sset->block.data[row_dim]) {
&& ctx->sset->stride.data[row_dim] > ctx->sset->block.data[row_dim]) {
hsize_t increase_rows = sset->stride.data[row_dim] - sset->block.data[row_dim];
hsize_t increase_rows = ctx->sset->stride.data[row_dim] - ctx->sset->block.data[row_dim];
temp_start[row_dim] += increase_rows;
row_counter = 0;
}
@@ -1184,10 +1307,10 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c
/* calculate the potential number of elements we're going to print */
if(H5Sselect_hyperslab(f_space, H5S_SELECT_SET, temp_start, temp_stride, temp_count, temp_block) < 0)
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sselect_hyperslab failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "H5Sselect_hyperslab failed");
if((ssm_nelmts = H5Sget_select_npoints(f_space)) < 0)
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sget_select_npoints failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "H5Sget_select_npoints failed");
sm_nelmts = (hsize_t)ssm_nelmts;
if (sm_nelmts > 0) {
@@ -1196,7 +1319,7 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c
* a hyperslab whose size is manageable.
*/
if((sm_nbytes = p_type_nbytes = H5Tget_size(p_type)) == 0)
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_size failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_size failed");
if (ctx->ndims > 0)
for (i = ctx->ndims; i > 0; --i) {
@@ -1210,17 +1333,17 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c
HDassert(sm_nbytes == (hsize_t) ((size_t) sm_nbytes)); /*check for overflow*/
if(NULL == (sm_buf = (unsigned char *)HDmalloc((size_t) sm_nelmts * p_type_nbytes)))
H5E_THROW(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for strip-mine");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for strip-mine");
if((sm_space = H5Screate_simple(1, &sm_nelmts, NULL)) < 0)
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Screate_simple failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "H5Screate_simple failed");
if(H5Sselect_hyperslab(sm_space, H5S_SELECT_SET, zero, NULL, &sm_nelmts, NULL) < 0)
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sselect_hyperslab failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "H5Sselect_hyperslab failed");
/* read the data */
if(H5Dread(dset, p_type, sm_space, f_space, H5P_DEFAULT, sm_buf) < 0)
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Dread failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "H5Dread failed");
/* print the data */
flags = START_OF_DATA;
@@ -1234,7 +1357,7 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c
/* print array indices. get the lower bound of the hyperslab and calulate
the element position at the start of hyperslab */
if(H5Sget_select_bounds(f_space, low, high) < 0)
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sget_select_bounds failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "H5Sget_select_bounds failed");
elmtno = 0;
for (i = 0; i < (size_t) ctx->ndims - 1; i++) {
@@ -1252,20 +1375,20 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c
ctx->need_prefix = TRUE;
if(h5tools_dump_simple_data(stream, info, dset, ctx, flags, sm_nelmts, p_type, sm_buf) < 0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "h5tools_dump_simple_data failed");
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "h5tools_dump_simple_data failed");
/* Reclaim any VL memory, if necessary */
if (vl_data)
H5Treclaim(p_type, sm_space, H5P_DEFAULT, sm_buf);
if(H5Sclose(sm_space) < 0)
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sclose failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "H5Sclose failed");
if(sm_buf)
HDfree(sm_buf);
sm_buf = NULL;
}
else
H5E_THROW(SUCCEED, H5E_tools_min_id_g, "nothing to print");
H5TOOLS_THROW(SUCCEED, H5E_tools_min_id_g, "nothing to print");
ctx->continuation++;
@@ -1312,8 +1435,7 @@ CATCH
*/
static herr_t
h5tools_display_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx,
hid_t dset, hid_t p_type, struct subset_t *sset,
hid_t f_space, hsize_t *total_size)
hid_t dset, hid_t p_type, hid_t f_space, hsize_t *total_size)
{
size_t i; /* counters */
hsize_t n; /* counters */
@@ -1339,21 +1461,21 @@ h5tools_display_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools
if (ctx->ndims > 2)
for (i = 0; i < (size_t) ctx->ndims - 2; i++) {
/* block size is handled by containing h5tools_print_simple_subset call */
outer_count = outer_count * sset->count.data[i];
outer_count = outer_count * ctx->sset->count.data[i];
}
/* initialize temporary start, count and maximum start */
for (i = 0; i < ctx->ndims; i++) {
temp_start[i] = sset->start.data[i];
temp_count[i] = sset->count.data[i];
temp_block[i] = sset->block.data[i];
temp_stride[i] = sset->stride.data[i];
temp_start[i] = ctx->sset->start.data[i];
temp_count[i] = ctx->sset->count.data[i];
temp_block[i] = ctx->sset->block.data[i];
temp_stride[i] = ctx->sset->stride.data[i];
max_start[i] = 0;
}
if (ctx->ndims > 2) {
for (i = 0; i < (size_t) ctx->ndims - 2; i++) {
max_start[i] = temp_start[i] + sset->count.data[i] * sset->stride.data[i];
max_start[i] = temp_start[i] + ctx->sset->count.data[i] * ctx->sset->stride.data[i];
temp_count[i] = 1;
}
}
@@ -1364,14 +1486,14 @@ h5tools_display_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools
if (ctx->ndims > 1) {
/* count is the number of iterations to display all the rows,
the block size count times */
count = sset->count.data[row_dim] * sset->block.data[row_dim];
count = ctx->sset->count.data[row_dim] * ctx->sset->block.data[row_dim];
/* always 1 row_counter at a time, that is a block of size 1, 1 time */
temp_count[row_dim] = 1;
temp_block[row_dim] = 1;
/* advance 1 row_counter at a time */
if (sset->block.data[row_dim] > 1)
if (ctx->sset->block.data[row_dim] > 1)
temp_stride[row_dim] = 1;
}
/* for the 1D case */
@@ -1379,7 +1501,7 @@ h5tools_display_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools
count = 1;
}
h5tools_print_simple_subset(stream, info, ctx, dset, p_type, sset,
h5tools_print_simple_subset(stream, info, ctx, dset, p_type,
f_space, count, temp_start, temp_count,
temp_block, temp_stride, total_size, row_dim);
@@ -1389,14 +1511,14 @@ h5tools_display_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools
/* set start to original from current_outer_dim up */
for (i = (size_t)(current_outer_dim + 1); i < ctx->ndims; i++)
temp_start[i] = sset->start.data[i];
temp_start[i] = ctx->sset->start.data[i];
/* increment start dimension */
do {
reset_dim = 0;
temp_start[current_outer_dim] += sset->stride.data[current_outer_dim];
temp_start[current_outer_dim] += ctx->sset->stride.data[current_outer_dim];
if (temp_start[current_outer_dim] >= max_start[current_outer_dim]) {
temp_start[current_outer_dim] = sset->start.data[current_outer_dim];
temp_start[current_outer_dim] = ctx->sset->start.data[current_outer_dim];
current_outer_dim--;
reset_dim = 1;
@@ -1452,20 +1574,20 @@ h5tools_display_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools
*-------------------------------------------------------------------------
*/
static herr_t
h5tools_dump_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, hid_t dset,
hid_t p_type, struct subset_t *sset)
h5tools_dump_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx,
hid_t dset, hid_t p_type)
{
HERR_INIT(herr_t, SUCCEED)
H5TOOLS_ERR_INIT(herr_t, SUCCEED)
int sndims;
hid_t f_space = -1; /* file data space */
hid_t f_space = H5I_INVALID_HID; /* file data space */
size_t i; /* counters */
hsize_t total_size[H5S_MAX_RANK];/* total size of dataset*/
if((f_space = H5Dget_space(dset)) < 0)
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Dget_space failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "H5Dget_space failed");
if((sndims = H5Sget_simple_extent_ndims(f_space)) < 0)
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed");
ctx->ndims = (unsigned)sndims;
/* assume entire data space to be printed */
@@ -1474,17 +1596,17 @@ h5tools_dump_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_co
ctx->p_min_idx[i] = 0;
if(H5Sget_simple_extent_dims(f_space, total_size, NULL) < 0)
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_dims failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_dims failed");
ctx->size_last_dim = total_size[ctx->ndims - 1];
/* Set the compound datatype field list for display */
ctx->cmpd_listv = info->cmpd_listv;
h5tools_display_simple_subset(stream, info, ctx, dset, p_type, sset, f_space, total_size);
h5tools_display_simple_subset(stream, info, ctx, dset, p_type, f_space, total_size);
CATCH
if(f_space >= 0 && H5Sclose(f_space) < 0)
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sclose failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "H5Sclose failed");
return ret_value;
}
@@ -1508,8 +1630,8 @@ static int
h5tools_dump_simple_dset(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx,
hid_t dset, hid_t p_type)
{
HERR_INIT(herr_t, SUCCEED)
hid_t f_space = -1; /* file data space */
H5TOOLS_ERR_INIT(herr_t, SUCCEED)
hid_t f_space = H5I_INVALID_HID; /* file data space */
hsize_t elmtno; /* counter */
size_t i; /* counter */
int sndims; /* rank of dataspace */
@@ -1527,7 +1649,7 @@ h5tools_dump_simple_dset(FILE *stream, const h5tool_format_t *info, h5tools_cont
hsize_t sm_nbytes; /* bytes per stripmine */
hsize_t sm_nelmts; /* elements per stripmine*/
unsigned char *sm_buf = NULL; /* buffer for raw data */
hid_t sm_space = -1; /* stripmine data space */
hid_t sm_space = H5I_INVALID_HID; /* stripmine data space */
/* Hyperslab info */
hsize_t hs_offset[H5S_MAX_RANK]; /* starting offset */
@@ -1537,18 +1659,19 @@ h5tools_dump_simple_dset(FILE *stream, const h5tool_format_t *info, h5tools_cont
/* VL data special information */
unsigned int vl_data = 0; /* contains VL datatypes */
f_space = H5Dget_space(dset);
if (f_space == FAIL)
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Dget_space failed");
H5TOOLS_PUSH_STACK();
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "enter");
if (FAIL == (f_space = H5Dget_space(dset)))
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_space failed");
sndims = H5Sget_simple_extent_ndims(f_space);
if(sndims < 0)
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Dget_simple_extent_ndims failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_simple_extent_ndims failed");
ctx->ndims = (unsigned)sndims;
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "sndims:%d", sndims);
if ((size_t)ctx->ndims > NELMTS(sm_size))
H5E_THROW(FAIL, H5E_tools_min_id_g, "ctx->ndims > NELMTS(sm_size) failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "ctx->ndims > NELMTS(sm_size) failed");
/* Assume entire data space to be printed */
if (ctx->ndims > 0)
@@ -1581,7 +1704,6 @@ h5tools_dump_simple_dset(FILE *stream, const h5tool_format_t *info, h5tools_cont
* a hyperslab whose size is manageable.
*/
sm_nbytes = p_type_nbytes = H5Tget_size(p_type);
if (ctx->ndims > 0) {
for (i = ctx->ndims; i > 0; --i) {
hsize_t size = H5TOOLS_BUFSIZE / sm_nbytes;
@@ -1589,88 +1711,96 @@ h5tools_dump_simple_dset(FILE *stream, const h5tool_format_t *info, h5tools_cont
size = 1;
sm_size[i - 1] = MIN(total_size[i - 1], size);
sm_nbytes *= sm_size[i - 1];
HDassert(sm_nbytes > 0);
}
}
if(!sm_nbytes)
goto done;
HDassert(sm_nbytes == (hsize_t)((size_t)sm_nbytes)); /*check for overflow*/
sm_buf = (unsigned char *)HDmalloc((size_t)sm_nbytes);
if (NULL != (sm_buf = (unsigned char *)HDmalloc((size_t)sm_nbytes))) {
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "stripmine size:%ld", sm_nbytes);
sm_nelmts = sm_nbytes / p_type_nbytes;
sm_space = H5Screate_simple(1, &sm_nelmts, NULL);
sm_nelmts = sm_nbytes / p_type_nbytes;
sm_space = H5Screate_simple(1, &sm_nelmts, NULL);
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "sm_nelmts size:%ld", sm_nelmts);
if (ctx->ndims > 0)
init_acc_pos(ctx, total_size);
if (ctx->ndims > 0)
init_acc_pos(ctx, total_size);
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "ctx->ndims:%d", ctx->ndims);
/* The stripmine loop */
HDmemset(hs_offset, 0, sizeof hs_offset);
HDmemset(zero, 0, sizeof zero);
/* The stripmine loop */
HDmemset(hs_offset, 0, sizeof hs_offset);
HDmemset(zero, 0, sizeof zero);
for (elmtno = 0; elmtno < p_nelmts; elmtno += hs_nelmts) {
/* Calculate the hyperslab size */
if (ctx->ndims > 0) {
for (i = 0, hs_nelmts = 1; i < ctx->ndims; i++) {
hs_size[i] = MIN(total_size[i] - hs_offset[i], sm_size[i]);
ctx->p_max_idx[i] = ctx->p_min_idx[i] + hs_size[i];
hs_nelmts *= hs_size[i];
for (elmtno = 0; elmtno < p_nelmts; elmtno += hs_nelmts) {
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "stripmine read loop:%d", i);
/* Calculate the hyperslab size */
if (ctx->ndims > 0) {
for (i = 0, hs_nelmts = 1; i < ctx->ndims; i++) {
hs_size[i] = MIN(total_size[i] - hs_offset[i], sm_size[i]);
ctx->p_max_idx[i] = ctx->p_min_idx[i] + hs_size[i];
hs_nelmts *= hs_size[i];
}
if (H5Sselect_hyperslab(f_space, H5S_SELECT_SET, hs_offset, NULL, hs_size, NULL) < 0)
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Sselect_hyperslab hs_offset failed");
if (H5Sselect_hyperslab(sm_space, H5S_SELECT_SET, zero, NULL, &hs_nelmts, NULL) < 0)
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Sselect_hyperslab zero failed");
}
else {
if (H5Sselect_all(f_space) < 0)
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Sselect_all f_space failed");
if (H5Sselect_all(sm_space) < 0)
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Sselect_all sm_space failed");
hs_nelmts = 1;
}
H5Sselect_hyperslab(f_space, H5S_SELECT_SET, hs_offset, NULL, hs_size, NULL);
H5Sselect_hyperslab(sm_space, H5S_SELECT_SET, zero, NULL, &hs_nelmts, NULL);
}
else {
H5Sselect_all(f_space);
H5Sselect_all(sm_space);
hs_nelmts = 1;
}
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "Read the data");
/* Read the data */
if (H5Dread(dset, p_type, sm_space, f_space, H5P_DEFAULT, sm_buf) >= 0) {
/* Print the data */
flags = (elmtno == 0) ? START_OF_DATA : 0;
flags |= ((elmtno + hs_nelmts) >= p_nelmts) ? END_OF_DATA : 0;
/* Read the data */
if (H5Dread(dset, p_type, sm_space, f_space, H5P_DEFAULT, sm_buf) < 0) {
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Dread failed");
}
/* initialize the current stripmine position; this is necessary to print the array
indices */
ctx->sm_pos = elmtno;
/* Print the data */
flags = (elmtno == 0) ? START_OF_DATA : 0;
flags |= ((elmtno + hs_nelmts) >= p_nelmts) ? END_OF_DATA : 0;
if(h5tools_dump_simple_data(stream, info, dset, ctx, flags, hs_nelmts, p_type, sm_buf) < 0)
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "h5tools_dump_simple_data failed");
/* initialize the current stripmine position; this is necessary to print the array
indices */
ctx->sm_pos = elmtno;
/* Reclaim any VL memory, if necessary */
if (vl_data)
H5Treclaim(p_type, sm_space, H5P_DEFAULT, sm_buf);
if(h5tools_dump_simple_data(stream, info, dset, ctx, flags, hs_nelmts, p_type, sm_buf) < 0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "h5tools_dump_simple_data failed");
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "Calculate the next hyperslab offset");
/* Calculate the next hyperslab offset */
for (i = ctx->ndims, carry = 1; i > 0 && carry; --i) {
ctx->p_min_idx[i - 1] = ctx->p_max_idx[i - 1];
hs_offset[i - 1] += hs_size[i - 1];
/* Reclaim any VL memory, if necessary */
if (vl_data)
H5Treclaim(p_type, sm_space, H5P_DEFAULT, sm_buf);
/* Calculate the next hyperslab offset */
for (i = ctx->ndims, carry = 1; i > 0 && carry; --i) {
ctx->p_min_idx[i - 1] = ctx->p_max_idx[i - 1];
hs_offset[i - 1] += hs_size[i - 1];
if (hs_offset[i - 1] == total_size[i - 1])
hs_offset[i - 1] = 0;
if (hs_offset[i - 1] == total_size[i - 1])
hs_offset[i - 1] = 0;
else
carry = 0;
}
}
else
carry = 0;
H5TOOLS_ERROR(FAIL, H5E_tools_min_id_g, "H5Dread failed");
ctx->continuation++;
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "stripmine read loop:%d complete", i);
}
ctx->continuation++;
}
CATCH
if(sm_buf)
HDfree(sm_buf);
} /* if (NULL != (sm_buf...)) */
done:
if(sm_space >= 0 && H5Sclose(sm_space) < 0)
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sclose failed");
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Sclose failed");
if(f_space >= 0 && H5Sclose(f_space) < 0)
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sclose failed");
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Sclose failed");
CATCH
H5TOOLS_ENDDEBUG(H5E_tools_min_dbg_id_g, "exit");
H5TOOLS_POP_STACK();
return ret_value;
}
@@ -1682,25 +1812,27 @@ done:
*
* Return: Success: SUCCEED
* Failure: FAIL
*
*-------------------------------------------------------------------------
*/
static int
h5tools_dump_simple_mem(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, hid_t obj_id,
hid_t type, hid_t space, void *mem)
{
HERR_INIT(herr_t, SUCCEED)
H5TOOLS_ERR_INIT(herr_t, SUCCEED)
int sndims; /* rank of dataspace */
unsigned i; /*counters */
hsize_t nelmts; /*total selected elmts */
H5TOOLS_PUSH_STACK();
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "enter");
sndims = H5Sget_simple_extent_ndims(space);
if(sndims < 0)
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Dget_simple_extent_ndims failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "H5Dget_simple_extent_ndims failed");
ctx->ndims = (unsigned)sndims;
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "sndims:%d", sndims);
if ((size_t) ctx->ndims > NELMTS(ctx->p_min_idx))
H5E_THROW(FAIL, H5E_tools_min_id_g, "ctx->ndims > NELMTS(ctx->p_min_idx) failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "ctx->ndims > NELMTS(ctx->p_min_idx) failed");
/* Assume entire data space to be printed */
for (i = 0; i < ctx->ndims; i++)
@@ -1722,11 +1854,14 @@ h5tools_dump_simple_mem(FILE *stream, const h5tool_format_t *info, h5tools_conte
if (ctx->ndims > 0)
init_acc_pos(ctx, ctx->p_max_idx);
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "ctx->ndims:%d", ctx->ndims);
if(h5tools_dump_simple_data(stream, info, obj_id, ctx, START_OF_DATA | END_OF_DATA, nelmts, type, mem) < 0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "h5tools_dump_simple_data failed");
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "h5tools_dump_simple_data failed");
CATCH
H5TOOLS_ENDDEBUG(H5E_tools_min_dbg_id_g, "exit");
H5TOOLS_POP_STACK();
return ret_value;
}
@@ -1746,21 +1881,10 @@ CATCH
*
* Return: Success: SUCCEED
* Failure: FAIL
*
* Modifications:
* Robb Matzke, 1999-06-07
* If info->raw is set then the memory datatype will be the same
* as the file datatype.
*
* Bill Wendling, 2001-02-27
* Renamed to ``h5tools_dump_dset'' and added the subsetting
* parameter.
*
*-------------------------------------------------------------------------
*/
int
h5tools_dump_dset(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx,
hid_t dset, struct subset_t *sset)
h5tools_dump_dset(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, hid_t dset)
{
hid_t f_space = -1;
hid_t p_type = -1;
@@ -1802,15 +1926,15 @@ h5tools_dump_dset(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
/* Print the data */
if (space_type == H5S_SIMPLE || space_type == H5S_SCALAR) {
if(!sset)
if(!ctx->sset)
status = h5tools_dump_simple_dset(rawdatastream, info, ctx, dset, p_type);
else
status = h5tools_dump_simple_subset(rawdatastream, info, ctx, dset, p_type, sset);
status = h5tools_dump_simple_subset(rawdatastream, info, ctx, dset, p_type);
}
else
else {
/* space is H5S_NULL */
status = SUCCEED;
}
done:
if (f_type > 0)
H5Tclose(f_type);
@@ -1831,14 +1955,13 @@ done:
*
* Return: Success: SUCCEED
* Failure: FAIL
*
*-------------------------------------------------------------------------
*/
int
h5tools_dump_mem(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx,
hid_t obj_id, hid_t type, hid_t space, void *mem)
{
HERR_INIT(int, SUCCEED)
H5TOOLS_ERR_INIT(int, SUCCEED)
h5tool_format_t info_dflt;
/* Use default values */
@@ -1852,7 +1975,7 @@ h5tools_dump_mem(FILE *stream, const h5tool_format_t *info, h5tools_context_t *c
/* Check the data space */
if (H5Sis_simple(space) <= 0)
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sis_simple failed")
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "H5Sis_simple failed")
H5_LEAVE(h5tools_dump_simple_mem(rawattrstream, info, ctx, obj_id, type, space, mem))
@@ -1869,14 +1992,13 @@ CATCH
*
* In/Out: h5tools_str_t *buffer
* h5tools_context_t *ctx
*
*-------------------------------------------------------------------------
*/
int
h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_t *info,
h5tools_context_t *ctx, hid_t type, int object_search)
{
HERR_INIT(int, SUCCEED)
H5TOOLS_ERR_INIT(int, SUCCEED)
char *mname;
hid_t mtype = -1;
hid_t str_type = -1;
@@ -1900,7 +2022,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
const char *order_s = NULL; /* byte order string */
if((type_class = H5Tget_class(type)) < 0)
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_class failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_class failed");
if (object_search && H5Tcommitted(type) > 0) {
H5O_info_t oinfo;
obj_t *obj = NULL; /* Found object */
@@ -2190,11 +2312,11 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
order = H5Tget_order(tmp_type);
if(order == H5T_ORDER_LE) {
if(H5Tset_order(str_type, H5T_ORDER_LE) < 0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tset_order failed");
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tset_order failed");
} /* end if */
else if(order == H5T_ORDER_BE) {
if(H5Tset_order(str_type, H5T_ORDER_BE) < 0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tset_order failed");
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tset_order failed");
} /* end if */
if(H5Tequal(tmp_type, str_type)) {
@@ -2204,7 +2326,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
/* If not equal to C variable-length string, check Fortran type. */
if(H5Tclose(str_type) < 0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed");
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed");
str_type = H5Tcopy(H5T_FORTRAN_S1);
H5Tset_cset(str_type, cset);
@@ -2221,11 +2343,11 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
order = H5Tget_order(tmp_type);
if(order == H5T_ORDER_LE) {
if(H5Tset_order(str_type, H5T_ORDER_LE) < 0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tset_order failed");
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tset_order failed");
} /* end if */
else if(order == H5T_ORDER_BE) {
if(H5Tset_order(str_type, H5T_ORDER_BE) < 0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tset_order failed");
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tset_order failed");
} /* end if */
if(H5Tequal(tmp_type, str_type)) {
@@ -2244,9 +2366,9 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
h5tools_str_reset(buffer);
if(H5Tclose(str_type) < 0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed");
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed");
if(H5Tclose(tmp_type) < 0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed");
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed");
h5tools_str_append(buffer, "%s", h5tools_dump_header_format->strblockend);
break;
@@ -2280,7 +2402,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
char *ttag;
if(NULL == (ttag = H5Tget_tag(type)))
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_tag failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_tag failed");
ctx->need_prefix = TRUE;
@@ -2308,7 +2430,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
case H5T_COMPOUND:
if((snmembers = H5Tget_nmembers(type)) < 0)
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_nmembers failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_nmembers failed");
nmembers = (unsigned)snmembers;
h5tools_str_append(buffer, "H5T_COMPOUND %s", h5tools_dump_header_format->structblockbegin);
@@ -2326,10 +2448,10 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
h5tools_str_append(buffer, " \"%s\";", mname);
h5tools_render_element(stream, info, ctx, buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
if(H5Tclose(mtype) < 0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed");
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed");
}
else
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tget_member_type failed");
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tget_member_type failed");
H5free_memory(mname);
}
ctx->indent_level--;
@@ -2350,13 +2472,15 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
}
else if (H5Tequal(type, H5T_STD_REF) == TRUE) {
h5tools_str_append(buffer, " { H5T_STD_REF }");
} else
}
else {
h5tools_str_append(buffer, " { UNDEFINED }");
}
break;
case H5T_ENUM:
if((super = H5Tget_super(type)) < 0)
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_super failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_super failed");
h5tools_str_append(buffer, "H5T_ENUM %s", h5tools_dump_header_format->enumblockbegin);
h5tools_render_element(stream, info, ctx, buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
@@ -2368,7 +2492,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
h5tools_print_datatype(stream, buffer, info, ctx, super, TRUE);
if(H5Tclose(super) < 0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed");
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed");
h5tools_str_append(buffer, ";");
h5tools_render_element(stream, info, ctx, buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
@@ -2386,14 +2510,14 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
case H5T_VLEN:
if((super = H5Tget_super(type)) < 0)
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_super failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_super failed");
h5tools_str_append(buffer, "H5T_VLEN %s ", h5tools_dump_header_format->vlenblockbegin);
h5tools_print_datatype(stream, buffer, info, ctx, super, TRUE);
if(H5Tclose(super) < 0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed");
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed");
h5tools_str_append(buffer, "%s", h5tools_dump_header_format->vlenblockend);
@@ -2414,10 +2538,10 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
h5tools_str_append(buffer, " ");
}
else
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tget_array_dims2 failed");
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tget_array_dims2 failed");
}
else
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tget_array_ndims failed");
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tget_array_ndims failed");
/* Get array base type */
if((super = H5Tget_super(type)) >= 0) {
@@ -2425,10 +2549,10 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
h5tools_print_datatype(stream, buffer, info, ctx, super, TRUE);
/* Close array base type */
if(H5Tclose(super) < 0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed");
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed");
}
else
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tget_super failed");
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tget_super failed");
h5tools_str_append(buffer, " }");
@@ -2454,13 +2578,12 @@ CATCH
*
* In/Out: h5tools_str_t *buffer
* h5tools_context_t *ctx
*
*-------------------------------------------------------------------------
*/
int
h5tools_print_dataspace(h5tools_str_t *buffer, hid_t space)
{
HERR_INIT(int, SUCCEED)
H5TOOLS_ERR_INIT(int, SUCCEED)
hsize_t size[H5TOOLS_DUMP_MAX_RANK];
hsize_t maxsize[H5TOOLS_DUMP_MAX_RANK];
int ndims = -1;
@@ -2468,10 +2591,10 @@ h5tools_print_dataspace(h5tools_str_t *buffer, hid_t space)
int i;
if((ndims = H5Sget_simple_extent_dims(space, size, maxsize)) < 0)
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_dims failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_dims failed");
if((space_type = H5Sget_simple_extent_type(space)) < 0)
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_type failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_type failed");
switch(space_type) {
case H5S_SCALAR:
@@ -2534,10 +2657,9 @@ CATCH
*
*-----------------------------------------------------------------------*/
int
h5tools_print_enum(FILE *stream, h5tools_str_t *buffer, const h5tool_format_t *info,
h5tools_context_t *ctx, hid_t type)
h5tools_print_enum(FILE *stream, h5tools_str_t *buffer, const h5tool_format_t *info, h5tools_context_t *ctx, hid_t type)
{
HERR_INIT(int, SUCCEED)
H5TOOLS_ERR_INIT(int, SUCCEED)
char **name = NULL; /*member names */
unsigned char *value = NULL; /*value array */
unsigned char *copy = NULL; /*a pointer to value array */
@@ -2556,15 +2678,15 @@ h5tools_print_enum(FILE *stream, h5tools_str_t *buffer, const h5tool_format_t *i
ncols = info->line_ncols;
if((snmembs = H5Tget_nmembers(type)) < 0)
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_nmembers failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_nmembers failed");
nmembs = (unsigned)snmembs;
HDassert(nmembs > 0);
if((super = H5Tget_super(type)) < 0)
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_super failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_super failed");
if((type_size = H5Tget_size(type)) <= 0)
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_size(type) failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_size(type) failed");
/*
* Determine what datatype to use for the native values. To simplify
@@ -2577,7 +2699,7 @@ h5tools_print_enum(FILE *stream, h5tools_str_t *buffer, const h5tool_format_t *i
dst_size = sizeof(long long);
if((sign_type = H5Tget_sign(type))<0)
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_sign failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_sign failed");
if(H5T_SGN_NONE == sign_type)
native = H5T_NATIVE_ULLONG;
else
@@ -2588,20 +2710,20 @@ h5tools_print_enum(FILE *stream, h5tools_str_t *buffer, const h5tool_format_t *i
/* Get the names and raw values of all members */
if(NULL == (name = (char **)HDcalloc((size_t)nmembs, sizeof(char *))))
H5E_THROW(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for member name");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for member name");
if(NULL == (value = (unsigned char *)HDcalloc((size_t)nmembs, MAX(type_size, dst_size))))
H5E_THROW(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for member value");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for member value");
for (i = 0; i < nmembs; i++) {
name[i] = H5Tget_member_name(type, i);
if(H5Tget_member_value(type, i, value + i * type_size) < 0)
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_member_value failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_member_value failed");
}
/* Convert values to native datatype */
if (native > 0)
if(H5Tconvert(super, native, (size_t)nmembs, value, NULL, H5P_DEFAULT) < 0)
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tconvert failed");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "H5Tconvert failed");
/*
* Sort members by increasing value
@@ -2658,7 +2780,7 @@ CATCH
HDfree(value);
if(super >= 0 && H5Tclose(super) < 0)
H5E_THROW(FAIL, H5E_tools_min_id_g, "Could not close datatype's super class");
H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "Could not close datatype's super class");
if(0 == nmembs)
h5tools_str_append(buffer, "\n<empty>");
@@ -2678,8 +2800,7 @@ CATCH
*-------------------------------------------------------------------------
*/
void
h5tools_dump_datatype(FILE *stream, const h5tool_format_t *info,
h5tools_context_t *ctx, hid_t type)
h5tools_dump_datatype(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, hid_t type)
{
h5tools_str_t buffer; /* string into which to render */
size_t ncols = 80; /* available output width */
@@ -2726,8 +2847,7 @@ h5tools_dump_datatype(FILE *stream, const h5tool_format_t *info,
*-------------------------------------------------------------------------
*/
void
h5tools_dump_dataspace(FILE *stream, const h5tool_format_t *info,
h5tools_context_t *ctx, hid_t type)
h5tools_dump_dataspace(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, hid_t type)
{
h5tools_str_t buffer; /* string into which to render */
size_t ncols = 80; /* available output width */
@@ -2775,8 +2895,7 @@ h5tools_dump_dataspace(FILE *stream, const h5tool_format_t *info,
*-------------------------------------------------------------------------
*/
void
h5tools_dump_oid(FILE *stream, const h5tool_format_t *info,
h5tools_context_t *ctx, hid_t oid)
h5tools_dump_oid(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, hid_t oid)
{
h5tools_str_t buffer; /* string into which to render */
size_t ncols = 80; /* available output width */
@@ -2810,11 +2929,10 @@ h5tools_dump_oid(FILE *stream, const h5tool_format_t *info,
*-------------------------------------------------------------------------
*/
static void
h5tools_print_virtual_selection(hid_t vspace,
FILE *stream, const h5tool_format_t *info,
h5tools_context_t *ctx/*in,out*/,
h5tools_str_t *buffer/*string into which to render */,
hsize_t *curr_pos/*total data element position*/,
h5tools_print_virtual_selection(hid_t vspace, FILE *stream, const h5tool_format_t *info,
h5tools_context_t *ctx, /* in,out*/
h5tools_str_t *buffer, /* string into which to render */
hsize_t *curr_pos, /* total data element position */
size_t ncols)
{
switch(H5Sget_select_type(vspace)) {
@@ -2881,7 +2999,8 @@ h5tools_print_virtual_selection(hid_t vspace,
*-------------------------------------------------------------------------
*/
void
h5tools_print_fill_value(h5tools_str_t *buffer/*in,out*/, const h5tool_format_t *info, h5tools_context_t *ctx/*in,out*/, hid_t dcpl, hid_t type_id, hid_t obj_id)
h5tools_print_fill_value(h5tools_str_t *buffer/*in,out*/, const h5tool_format_t *info,
h5tools_context_t *ctx/*in,out*/, hid_t dcpl, hid_t type_id, hid_t obj_id)
{
size_t size;
hid_t n_type = -1;
@@ -3367,7 +3486,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
} /*i*/
}/*nfilters*/
else {
ctx->need_prefix = TRUE;
h5tools_str_reset(&buffer);
@@ -3502,12 +3620,10 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
* Purpose: prints the comment for the the object name
*
* Return: void
*
*-------------------------------------------------------------------------
*/
void
h5tools_dump_comment(FILE *stream, const h5tool_format_t *info,
h5tools_context_t *ctx, hid_t obj_id)
h5tools_dump_comment(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, hid_t obj_id)
{
char *comment = NULL;
ssize_t cmt_bufsize = -1;
@@ -3561,9 +3677,7 @@ h5tools_dump_comment(FILE *stream, const h5tool_format_t *info,
*-------------------------------------------------------------------------
*/
void
h5tools_dump_attribute(FILE *stream, const h5tool_format_t *info,
h5tools_context_t *ctx, const char *attr_name, hid_t attr_id,
int display_index, int display_char)
h5tools_dump_attribute(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, const char *attr_name, hid_t attr_id)
{
h5tools_str_t buffer; /* string into which to render */
size_t ncols = 80; /* available output width */
@@ -3606,7 +3720,7 @@ h5tools_dump_attribute(FILE *stream, const h5tool_format_t *info,
h5tools_dump_oid(stream, info, ctx, attr_id);
if(data_output || attr_data_output)
h5tools_dump_data(stream, info, ctx, attr_id, FALSE, NULL, display_index, display_char);
h5tools_dump_data(stream, info, ctx, attr_id, FALSE);
ctx->indent_level--;
@@ -3638,12 +3752,6 @@ h5tools_dump_attribute(FILE *stream, const h5tool_format_t *info,
* Purpose: Dump the dimensions handed to it in a comma separated list
*
* Return: void
*
* Programmer: Bill Wendling
* Tuesday, 27. February 2001
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
void
@@ -3665,7 +3773,6 @@ h5tools_print_dims(h5tools_str_t *buffer, hsize_t *s, int dims)
* Purpose: Prints the packed bits offset and length
*
* Return: void
*
*-------------------------------------------------------------------------
*/
void
@@ -3712,17 +3819,10 @@ h5tools_print_packed_bits(h5tools_str_t *buffer, hid_t type)
* Purpose: Dump the subsetting header like specified in the DDL.
*
* Return: void
*
* Programmer: Bill Wendling
* Tuesday, 27. February 2001
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
void
h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info,
h5tools_context_t *ctx, struct subset_t *sset, int dims)
h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, int dims)
{
h5tools_str_t buffer; /* string into which to render */
hsize_t curr_pos = 0; /* total data element position */
@@ -3745,7 +3845,7 @@ h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info,
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s %s ", h5tools_dump_header_format->startbegin, h5tools_dump_header_format->startblockbegin);
h5tools_print_dims(&buffer, sset->start.data, dims);
h5tools_print_dims(&buffer, ctx->sset->start.data, dims);
h5tools_str_append(&buffer, "%s %s", h5tools_dump_header_format->startend, h5tools_dump_header_format->startblockend);
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
@@ -3753,7 +3853,7 @@ h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info,
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s %s ", h5tools_dump_header_format->stridebegin, h5tools_dump_header_format->strideblockbegin);
h5tools_print_dims(&buffer, sset->stride.data, dims);
h5tools_print_dims(&buffer, ctx->sset->stride.data, dims);
h5tools_str_append(&buffer, "%s %s", h5tools_dump_header_format->strideend, h5tools_dump_header_format->strideblockend);
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
@@ -3762,8 +3862,8 @@ h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info,
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s %s ", h5tools_dump_header_format->countbegin, h5tools_dump_header_format->countblockbegin);
if(sset->count.data)
h5tools_print_dims(&buffer, sset->count.data, dims);
if(ctx->sset->count.data)
h5tools_print_dims(&buffer, ctx->sset->count.data, dims);
else
h5tools_str_append(&buffer, "DEFAULT");
@@ -3775,8 +3875,8 @@ h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info,
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s %s ", h5tools_dump_header_format->blockbegin, h5tools_dump_header_format->blockblockbegin);
if(sset->block.data)
h5tools_print_dims(&buffer, sset->block.data, dims);
if(ctx->sset->block.data)
h5tools_print_dims(&buffer, ctx->sset->block.data, dims);
else
h5tools_str_append(&buffer, "DEFAULT");
@@ -3791,34 +3891,40 @@ h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info,
/*-------------------------------------------------------------------------
* Function: dump_data
*
* Purpose: Dump attribute or dataset data
* Purpose: Dump attribute, obj_data is FALSE, or dataset data, obj_data is TRUE
*
* Return: void
*
*-------------------------------------------------------------------------
*/
void
h5tools_dump_data(FILE *stream, const h5tool_format_t *info,
h5tools_context_t *ctx, hid_t obj_id, int obj_data, struct subset_t *sset,
int display_index, int display_char)
h5tools_dump_data(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, hid_t obj_id, int obj_data)
{
H5TOOLS_ERR_INIT(int, SUCCEED);
H5S_class_t space_type;
int ndims;
int i;
hid_t space = -1;
hid_t type = -1;
hid_t p_type = -1;
size_t i;
hid_t space = H5I_INVALID_HID;
hid_t p_type = H5I_INVALID_HID;
hid_t f_type = H5I_INVALID_HID;
hid_t new_obj_id = H5I_INVALID_HID;
hid_t new_obj_sid = H5I_INVALID_HID;
hsize_t total_size[H5S_MAX_RANK];
hsize_t size[64];
hsize_t alloc_size;
hsize_t nelmts = 1;
hsize_t elmt_counter = 0; /*counts the # elements printed. */
int status = -1;
void *buf = NULL;
h5tools_str_t buffer; /* string into which to render */
hsize_t curr_pos = 0; /* total data element position */
size_t ncols = 80; /* available output width */
h5tool_format_t string_dataformat;
h5tool_format_t outputformat;
hbool_t dimension_break;
h5tools_str_t buffer; /* string into which to render */
hsize_t curr_pos = 0; /* total data element position */
size_t ncols = 80; /* available output width */
h5tool_format_t string_dataformat;
h5tool_format_t outputformat;
H5R_ref_t *ref_buf = NULL;
H5TOOLS_PUSH_STACK();
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "enter");
/* setup */
HDmemset(&buffer, 0, sizeof(h5tools_str_t));
if (info->line_ncols > 0)
@@ -3827,26 +3933,17 @@ h5tools_dump_data(FILE *stream, const h5tool_format_t *info,
outputformat = *info;
string_dataformat = *info;
/* print the matrix indices */
string_dataformat.pindex = display_index;
string_dataformat.pindex = ctx->display_index;
/* do not print indices for regions */
if(obj_data) {
hid_t f_type = H5Dget_type(obj_id);
if (H5Tequal(f_type, H5T_STD_REF_DSETREG)) {
/* For the region option, correct the display of indices */
if (region_output) {
if (!string_dataformat.pindex) {
string_dataformat.idx_fmt = "";
string_dataformat.idx_n_fmt = "";
string_dataformat.idx_sep = "";
string_dataformat.line_pre = "";
}
}
else
string_dataformat.pindex = 0;
}
H5Tclose(f_type);
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "dataset");
f_type = H5Dget_type(obj_id);
space = H5Dget_space(obj_id);
}
else {
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "attribute");
f_type = H5Aget_type(obj_id);
space = H5Aget_space(obj_id);
}
if (string_dataformat.pindex) {
@@ -3857,11 +3954,9 @@ h5tools_dump_data(FILE *stream, const h5tool_format_t *info,
}
info = &string_dataformat;
if (sset && obj_data) {
hid_t f_space = H5Dget_space(obj_id);
if (ctx->sset && obj_data) {
h5tools_dump_subsetting_header(stream, &outputformat, ctx, sset, H5Sget_simple_extent_ndims(f_space));
H5Sclose(f_space);
h5tools_dump_subsetting_header(stream, &outputformat, ctx, H5Sget_simple_extent_ndims(space));
ctx->indent_level++;
}
@@ -3871,135 +3966,372 @@ h5tools_dump_data(FILE *stream, const h5tool_format_t *info,
h5tools_str_append(&buffer, "%s %s", h5tools_dump_header_format->databegin, h5tools_dump_header_format->datablockbegin);
h5tools_render_element(stream, &outputformat, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
/* Print all the values. */
if(obj_data) {
if (H5Tget_class(f_type) == H5T_REFERENCE) {
h5tools_context_t datactx = *ctx; /* print context */
hid_t f_type = H5Dget_type(obj_id);
if((display_char && H5Tget_size(f_type) == 1) && (H5Tget_class(f_type) == H5T_INTEGER)) {
/*
* Print 1-byte integer data as an ASCII character string
* instead of integers if the `-r' or `--string' command-line
* option was given.
*
* We don't want to modify the global dataformat, so make a
* copy of it instead.
*/
string_dataformat = *info;
string_dataformat.idx_fmt = "\"";
info = &string_dataformat;
datactx.indent_level++;
datactx.need_prefix = TRUE;
h5tools_simple_prefix(stream, info, &datactx, (hsize_t)0, 0);
string_dataformat = *info;
string_dataformat.idx_fmt = "\"";
string_dataformat.line_multi_new = 1;
string_dataformat.str_repeat = 8;
string_dataformat.ascii = TRUE;
string_dataformat.elmt_suf1 = "";
string_dataformat.elmt_suf2 = "";
string_dataformat.line_suf = "\"";
info = &string_dataformat;
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "reference class type");
if (!H5Tequal(f_type, H5T_STD_REF) && !H5Tequal(f_type, H5T_STD_REF_DSETREG) && !H5Tequal(f_type, H5T_STD_REF_OBJ)) {
HGOTO_DONE(SUCCEED);
}
else
datactx.need_prefix = TRUE;
status = h5tools_dump_dset(stream, info, &datactx, obj_id, sset);
if((display_char && H5Tget_size(f_type) == 1) && (H5Tget_class(f_type) == H5T_INTEGER)) {
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "\"");
h5tools_render_element(stream, &outputformat, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
ndims = (int)H5Sget_simple_extent_npoints(space);
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "ndims=%d - datactx.ndims=%d", ndims, datactx.ndims);
/* Assume entire data space to be printed */
if (datactx.ndims > 0)
for (i = 0; i < (size_t)datactx.ndims; i++)
datactx.p_min_idx[i] = 0;
H5Sget_simple_extent_dims(space, total_size, NULL);
if (datactx.ndims > 0)
init_acc_pos(&datactx, total_size);
datactx.need_prefix = TRUE;
if (NULL != (ref_buf = (H5R_ref_t *)HDcalloc(MAX(sizeof(unsigned), sizeof(H5R_ref_t)), ndims))) {
if(obj_data) {
if(H5Dread(obj_id, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, ref_buf) < 0) {
HDfree(ref_buf);
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dread reference failed");
}
}
else {
if(H5Aread(obj_id, H5T_STD_REF, ref_buf) < 0) {
HDfree(ref_buf);
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aread reference failed");
}
}
for(i = 0; i < ndims; i++, datactx.cur_elmt++, elmt_counter++) {
H5O_type_t obj_type; /* Object type */
H5R_type_t ref_type; /* Reference type */
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "reference loop:%d with curr_pos=%ld", i, curr_pos);
datactx.need_prefix = TRUE;
h5tools_str_reset(&buffer);
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "reference loop - h5tools_str_sprint with H5T_STD_REF:%d", i);
h5tools_str_sprint(&buffer, &outputformat, obj_id, H5T_STD_REF, &ref_buf[i], &datactx);
h5tools_render_element(stream, &outputformat, &datactx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)i, (hsize_t)ndims);
ref_type = H5Rget_type((const H5R_ref_t *)&ref_buf[i]);
switch (ref_type) {
case H5R_OBJECT1:
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "ref_type is H5R_OBJECT1");
if (H5Rget_obj_type3((const H5R_ref_t *)&ref_buf[i], H5P_DEFAULT, &obj_type) >= 0) {
switch (obj_type) {
case H5O_TYPE_DATASET:
if((new_obj_id = H5Ropen_object((const H5R_ref_t *)&ref_buf[i], H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
datactx.indent_level++;
h5tools_dump_data(stream, &outputformat, &datactx, new_obj_id, TRUE);
datactx.indent_level--;
if(H5Dclose(new_obj_id) < 0)
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Dclose H5R_OBJECT1:H5O_TYPE_DATASET failed");
if(H5Rdestroy(&ref_buf[i]) < 0)
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Rdestroy H5R_OBJECT1:H5O_TYPE_DATASET failed");
}
else
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Ropen_object H5R_OBJECT1:H5O_TYPE_DATASET failed");
break;
case H5O_TYPE_GROUP:
case H5O_TYPE_NAMED_DATATYPE:
case H5O_TYPE_MAP:
case H5O_TYPE_UNKNOWN:
case H5O_TYPE_NTYPES:
default:
break;
} /* end switch */
}
else
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Rget_obj_type3 H5R_OBJECT1 failed");
break;
case H5R_DATASET_REGION1:
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "ref_type is H5R_DATASET_REGION1");
if((new_obj_id = H5Ropen_object((const H5R_ref_t *)&ref_buf[i], H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
datactx.indent_level++;
h5tools_dump_data(stream, &outputformat, &datactx, new_obj_id, TRUE);
datactx.indent_level--;
if(H5Dclose(new_obj_id) < 0)
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Dclose H5R_DATASET_REGION1 failed");
if(H5Rdestroy(&ref_buf[i]) < 0)
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Rdestroy H5R_DATASET_REGION1 failed");
}
else
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Ropen_object H5R_DATASET_REGION1 failed");
break;
case H5R_OBJECT2:
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "ref_type is H5R_OBJECT2");
if (H5Rget_obj_type3((const H5R_ref_t *)&ref_buf[i], H5P_DEFAULT, &obj_type) >= 0) {
switch (obj_type) {
case H5O_TYPE_GROUP:
break;
case H5O_TYPE_DATASET:
if((new_obj_id = H5Ropen_object((const H5R_ref_t *)&ref_buf[i], H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
datactx.indent_level++;
h5tools_dump_data(stream, &outputformat, &datactx, new_obj_id, TRUE);
datactx.indent_level--;
if(H5Oclose(new_obj_id) < 0)
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Oclose H5R_OBJECT2 failed");
if(H5Rdestroy(&ref_buf[i]) < 0)
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Rdestroy H5R_OBJECT2 failed");
}
else
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Ropen_object H5R_OBJECT2 failed");
break;
case H5O_TYPE_NAMED_DATATYPE:
break;
case H5O_TYPE_MAP:
case H5O_TYPE_UNKNOWN:
case H5O_TYPE_NTYPES:
default:
break;
} /* end switch */
}
else
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Rget_obj_type3 H5R_OBJECT2 failed");
break;
case H5R_DATASET_REGION2:
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "ref_type is H5R_DATASET_REGION2");
if (outputformat.line_ncols > 0)
ncols = outputformat.line_ncols;
/* if (new_obj_id < 0) - could mean that no reference was written do not throw failure */
if((new_obj_id = H5Ropen_object((const H5R_ref_t *)&ref_buf[i], H5P_DEFAULT, H5P_DEFAULT)) < 0)
H5Epush2(H5tools_ERR_STACK_g, __FILE__, FUNC, __LINE__, H5tools_ERR_CLS_g, H5E_tools_g, H5E_tools_min_id_g,
"H5Ropen_object H5R_DATASET_REGION2 failed");
else {
if((new_obj_sid = H5Ropen_region((const H5R_ref_t *)&ref_buf[i], H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
if (h5tools_is_zero(&ref_buf[i], H5Tget_size(H5T_STD_REF))) {
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "NULL H5R_DATASET_REGION2");
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, " {");
h5tools_render_element(stream, &outputformat, &datactx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
datactx.indent_level++;
datactx.need_prefix = TRUE;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "NULL");
h5tools_render_element(stream, &outputformat, &datactx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
datactx.indent_level--;
datactx.need_prefix = TRUE;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "}");
h5tools_render_element(stream, &outputformat, &datactx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
}
else {
H5S_sel_type region_type;
region_type = H5Sget_select_type(new_obj_sid);
if(region_type == H5S_SEL_POINTS) {
/* Print point information */
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "H5S_SEL_POINTS H5R_DATASET_REGION2");
dimension_break = h5tools_dump_region_data_points(new_obj_sid, new_obj_id, stream, &outputformat, &datactx,
&buffer, &curr_pos, ncols, i, elmt_counter);
}
else if(region_type == H5S_SEL_HYPERSLABS) {
/* Print block information */
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "H5S_SEL_HYPERSLABS H5R_DATASET_REGION2");
dimension_break = h5tools_dump_region_data_blocks(new_obj_sid, new_obj_id, stream, &outputformat, &datactx,
&buffer, &curr_pos, ncols, i, elmt_counter);
}
else
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "invalid region type");
} /* end else to if (h5tools_is_zero(... */
if(H5Sclose(new_obj_sid) < 0)
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Sclose H5R_DATASET_REGION2 failed");
}
else
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Ropen_region H5R_DATASET_REGION2 failed");
if(H5Dclose(new_obj_id) < 0)
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Dclose H5R_DATASET_REGION2 failed");
if(H5Rdestroy(&ref_buf[i]) < 0)
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Rdestroy H5R_DATASET_REGION2 failed");
}
break;
case H5R_ATTR:
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "ref_type is H5R_ATTR");
if((new_obj_id = H5Ropen_attr((const H5R_ref_t *)&ref_buf[i], H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
dimension_break = h5tools_dump_region_attribute(new_obj_id, stream, &outputformat, &datactx,
&buffer, &curr_pos, ncols, i, elmt_counter);
if(H5Aclose(new_obj_id) < 0)
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Aclose H5R_ATTR failed");
if(H5Rdestroy(&ref_buf[i]) < 0)
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Rdestroy H5R_ATTR failed");
}
else {
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "NULL H5R_ATTR");
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, " {");
h5tools_render_element(stream, &outputformat, &datactx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
datactx.indent_level++;
datactx.need_prefix = TRUE;
datactx.indent_level++;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "NULL");
h5tools_render_element(stream, &outputformat, &datactx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
datactx.indent_level--;
datactx.indent_level--;
datactx.need_prefix = TRUE;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "}");
h5tools_render_element(stream, &outputformat, &datactx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Ropen_attr H5R_ATTR failed");
}
break;
case H5R_BADTYPE:
case H5R_MAXTYPE:
default:
break;
} /* end switch */
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "finished reference loop:%d",i);
} /* end for(i = 0; i < ndims; i++, ctx->cur_elmt++, elmt_counter++) */
HDfree(ref_buf);
}
H5Tclose(f_type);
}
else {
h5tools_context_t datactx = *ctx; /* print context */
/* need to call h5tools_dump_mem for the attribute data */
space = H5Aget_space(obj_id);
space_type = H5Sget_simple_extent_type(space);
if(space_type == H5S_NULL || space_type == H5S_NO_CLASS) {
status = SUCCEED;
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "Print all the values");
/* Print all the values. */
if(obj_data) {
h5tools_context_t datactx = *ctx; /* print context */
string_dataformat = *info;
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "Print all the dataset values");
if((datactx.display_char && H5Tget_size(f_type) == 1) && (H5Tget_class(f_type) == H5T_INTEGER)) {
/*
* Print 1-byte integer data as an ASCII character string
* instead of integers if the `-r' or `--string' command-line
* option was given.
*
* We don't want to modify the global dataformat, so make a
* copy of it instead.
*/
string_dataformat.idx_fmt = "\"";
datactx.indent_level++;
datactx.need_prefix = TRUE;
h5tools_simple_prefix(stream, &string_dataformat, &datactx, (hsize_t)0, 0);
string_dataformat.line_multi_new = 1;
string_dataformat.str_repeat = 8;
string_dataformat.ascii = TRUE;
string_dataformat.elmt_suf1 = "";
string_dataformat.elmt_suf2 = "";
string_dataformat.line_suf = "\"";
}
else {
datactx.need_prefix = TRUE;
}
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "h5tools_dump_dset");
status = h5tools_dump_dset(stream, &string_dataformat, &datactx, obj_id);
if((datactx.display_char && H5Tget_size(f_type) == 1) && (H5Tget_class(f_type) == H5T_INTEGER)) {
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "\"");
h5tools_render_element(stream, &string_dataformat, &datactx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
}
}
else {
/* VL data special information */
unsigned int vl_data = 0; /* contains VL datatypes */
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "Print all the attribute values");
type = H5Aget_type(obj_id);
p_type = H5Tget_native_type(type, H5T_DIR_DEFAULT);
h5tools_context_t datactx = *ctx; /* print context */
/* need to call h5tools_dump_mem for the attribute data */
space_type = H5Sget_simple_extent_type(space);
if(space_type == H5S_NULL || space_type == H5S_NO_CLASS) {
status = SUCCEED;
}
else {
/* VL data special information */
unsigned int vl_data = 0; /* contains VL datatypes */
ndims = H5Sget_simple_extent_dims(space, size, NULL);
p_type = H5Tget_native_type(f_type, H5T_DIR_DEFAULT);
/* Check if we have VL data in the dataset's datatype */
if (h5tools_detect_vlen(p_type) == TRUE)
vl_data = TRUE;
ndims = H5Sget_simple_extent_dims(space, size, NULL);
for (i = 0; i < ndims; i++)
nelmts *= size[i];
/* Check if we have VL data in the dataset's datatype */
if (h5tools_detect_vlen(p_type) == TRUE)
vl_data = TRUE;
alloc_size = nelmts * MAX(H5Tget_size(type), H5Tget_size(p_type));
HDassert(alloc_size == (hsize_t)((size_t)alloc_size)); /*check for overflow*/
for (i = 0; i < ndims; i++)
nelmts *= size[i];
if(alloc_size) {
buf = HDmalloc((size_t)alloc_size);
HDassert(buf);
alloc_size = nelmts * MAX(H5Tget_size(f_type), H5Tget_size(p_type));
HDassert(alloc_size == (hsize_t)((size_t)alloc_size)); /*check for overflow*/
if (H5Aread(obj_id, p_type, buf) >= 0) {
if (display_char && H5Tget_size(type) == 1 && H5Tget_class(type) == H5T_INTEGER) {
/*
* Print 1-byte integer data as an ASCII character string
* instead of integers if the `-r' or `--string' command-line
* option was given.
*
* We don't want to modify the global dataformat, so make a
* copy of it instead.
*/
if (alloc_size) {
buf = HDmalloc((size_t)alloc_size);
HDassert(buf);
if (H5Aread(obj_id, p_type, buf) >= 0) {
string_dataformat = *info;
string_dataformat.idx_fmt = "\"";
info = &string_dataformat;
datactx.indent_level++;
datactx.need_prefix = TRUE;
h5tools_simple_prefix(stream, info, &datactx, (hsize_t)0, 0);
if (datactx.display_char && H5Tget_size(f_type) == 1 && H5Tget_class(f_type) == H5T_INTEGER) {
/*
* Print 1-byte integer data as an ASCII character string
* instead of integers if the `-r' or `--string' command-line
* option was given.
*
* We don't want to modify the global dataformat, so make a
* copy of it instead.
*/
string_dataformat.idx_fmt = "\"";
datactx.indent_level++;
datactx.need_prefix = TRUE;
h5tools_simple_prefix(stream, &string_dataformat, &datactx, (hsize_t)0, 0);
string_dataformat = *info;
string_dataformat.idx_fmt = "\"";
string_dataformat.line_multi_new = 1;
string_dataformat.str_repeat = 8;
string_dataformat.ascii = TRUE;
string_dataformat.elmt_suf1 = "";
string_dataformat.elmt_suf2 = "";
string_dataformat.line_suf = "\"";
info = &string_dataformat;
string_dataformat.line_multi_new = 1;
string_dataformat.str_repeat = 8;
string_dataformat.ascii = TRUE;
string_dataformat.elmt_suf1 = "";
string_dataformat.elmt_suf2 = "";
string_dataformat.line_suf = "\"";
}
else
datactx.need_prefix = TRUE;
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "call h5tools_dump_mem");
status = h5tools_dump_mem(stream, &string_dataformat, &datactx, obj_id, p_type, space, buf);
if (datactx.display_char && H5Tget_size(f_type) == 1 && H5Tget_class(f_type) == H5T_INTEGER) {
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "\"");
h5tools_render_element(stream, &string_dataformat, &datactx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
}
}
else
datactx.need_prefix = TRUE;
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Aread failed");
/* Reclaim any VL memory, if necessary */
if (vl_data)
H5Treclaim(p_type, space, H5P_DEFAULT, buf);
HDfree(buf);
}
status = h5tools_dump_mem(stream, info, &datactx, obj_id, p_type, space, buf);
if (display_char && H5Tget_size(type) == 1 && H5Tget_class(type) == H5T_INTEGER) {
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "\"");
h5tools_render_element(stream, &outputformat, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
}
/* Reclaim any VL memory, if necessary */
if (vl_data)
H5Treclaim(p_type, space, H5P_DEFAULT, buf);
HDfree(buf);
else {
status = SUCCEED;
} /* end if (alloc_size) */
H5Tclose(p_type);
}
else
status = SUCCEED;
H5Tclose(p_type);
H5Tclose(type);
}
H5Sclose(space);
}
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "Print all the values Complete");
if (status == FAIL) {
error_msg("unable to print data\n");
h5tools_setstatus(EXIT_FAILURE);
if (status == FAIL) {
error_msg("unable to print data\n");
h5tools_setstatus(EXIT_FAILURE);
}
}
done:
H5Sclose(space);
H5Tclose(f_type);
ctx->need_prefix = TRUE;
h5tools_simple_prefix(stream, &outputformat, ctx, (hsize_t)0, 0);
@@ -4010,11 +4342,12 @@ h5tools_dump_data(FILE *stream, const h5tool_format_t *info,
if(HDstrlen(h5tools_dump_header_format->dataend))
h5tools_str_append(&buffer, " ");
}
if(HDstrlen(h5tools_dump_header_format->dataend))
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->dataend);
h5tools_render_element(stream, &outputformat, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
if (sset && obj_data) {
if (ctx->sset && obj_data) {
ctx->indent_level--;
ctx->need_prefix = TRUE;
@@ -4032,5 +4365,7 @@ h5tools_dump_data(FILE *stream, const h5tool_format_t *info,
}
h5tools_str_close(&buffer);
H5TOOLS_ENDDEBUG(H5E_tools_min_dbg_id_g, "exit");
H5TOOLS_POP_STACK();
}
+27 -7
View File
@@ -37,8 +37,7 @@ H5TOOLS_DLLVAR table_t *h5dump_type_table; /*type table reference for datatype
H5TOOLS_DLL void h5tools_dump_init(void);
H5TOOLS_DLL int h5tools_dump_dset(FILE *stream, const h5tool_format_t *info,
h5tools_context_t *ctx/*in,out*/, hid_t dset,
struct subset_t *sset);
h5tools_context_t *ctx/*in,out*/, hid_t dset);
H5TOOLS_DLL int h5tools_dump_mem(FILE *stream, const h5tool_format_t *info,
h5tools_context_t *ctx/*in,out*/, hid_t obj_id,
hid_t type, hid_t space, void *mem);
@@ -50,8 +49,7 @@ H5TOOLS_DLL void h5tools_dump_datatype(FILE *stream, const h5tool_format_t *i
H5TOOLS_DLL void h5tools_dump_dataspace(FILE *stream, const h5tool_format_t *info,
h5tools_context_t *ctx/*in,out*/, hid_t space);
H5TOOLS_DLL void h5tools_dump_attribute(FILE *stream, const h5tool_format_t *info,
h5tools_context_t *ctx/*in,out*/, const char *attr_name,
hid_t attr_id, int display_index, int display_char);
h5tools_context_t *ctx/*in,out*/, const char *attr_name, hid_t attr_id);
H5TOOLS_DLL void h5tools_dump_oid(FILE *stream, const h5tool_format_t *info,
h5tools_context_t *ctx/*in,out*/, hid_t oid);
H5TOOLS_DLL void h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
@@ -59,8 +57,30 @@ H5TOOLS_DLL void h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
H5TOOLS_DLL void h5tools_dump_comment(FILE *stream, const h5tool_format_t *info,
h5tools_context_t *ctx/*in,out*/, hid_t obj_id);
H5TOOLS_DLL void h5tools_dump_data(FILE *stream, const h5tool_format_t *info,
h5tools_context_t *ctx, hid_t obj_id,
int obj_data, struct subset_t *sset, int display_index, int display_char);
h5tools_context_t *ctx, hid_t obj_id, int obj_data);
H5TOOLS_DLL hbool_t h5tools_dump_region_attribute(hid_t region_id,
FILE *stream, const h5tool_format_t *info,
h5tools_context_t *ctx/*in,out*/,
h5tools_str_t *buffer/*string into which to render */,
hsize_t *curr_pos/*total data element position*/,
size_t ncols, hsize_t region_elmt_counter/*element counter*/,
hsize_t elmt_counter);
H5TOOLS_DLL hbool_t h5tools_dump_region_data_points(hid_t region_space, hid_t region_id,
FILE *stream, const h5tool_format_t *info,
h5tools_context_t *ctx/*in,out*/,
h5tools_str_t *buffer/*string into which to render */,
hsize_t *curr_pos/*total data element position*/,
size_t ncols, hsize_t region_elmt_counter/*element counter*/,
hsize_t elmt_counter);
H5TOOLS_DLL hbool_t h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id,
FILE *stream, const h5tool_format_t *info,
h5tools_context_t *ctx/*in,out*/,
h5tools_str_t *buffer/*string into which to render */,
hsize_t *curr_pos/*total data element position*/,
size_t ncols, hsize_t region_elmt_counter/*element counter*/,
hsize_t elmt_counter);
H5TOOLS_DLL int h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer/*in,out*/,
const h5tool_format_t *info, h5tools_context_t *ctx/*in,out*/,
@@ -71,7 +91,7 @@ H5TOOLS_DLL int h5tools_print_enum(FILE *stream, h5tools_str_t *buffer/*in,o
const h5tool_format_t *info, h5tools_context_t *ctx/*in,out*/,
hid_t type);
H5TOOLS_DLL void h5tools_print_fill_value(h5tools_str_t *buffer/*in,out*/,
const h5tool_format_t *info, h5tools_context_t *ctx/*in,out*/,
const h5tool_format_t *info, h5tools_context_t *ctx/*in,out*/,
hid_t dcpl, hid_t type_id, hid_t obj_id);
H5TOOLS_DLL void h5tools_print_packed_bits(h5tools_str_t *buffer/*in,out*/, hid_t type);
#ifdef __cplusplus
+70 -22
View File
@@ -18,12 +18,15 @@
#define H5TOOLS_ERROR_H_
#include "H5Epublic.h"
#include "H5Eprivate.h" /* Error handling */
/* tools-HDF5 Error variables */
H5TOOLS_DLLVAR hid_t H5tools_ERR_STACK_g;
H5TOOLS_DLLVAR hid_t H5tools_ERR_CLS_g;
H5TOOLS_DLLVAR hid_t H5E_tools_g;
H5TOOLS_DLLVAR hid_t H5E_tools_min_id_g;
H5TOOLS_DLLVAR hid_t H5E_tools_min_info_id_g;
H5TOOLS_DLLVAR hid_t H5E_tools_min_dbg_id_g;
/* Use FUNC to safely handle variations of C99 __func__ keyword handling */
#ifdef H5_HAVE_C99_FUNC
@@ -39,41 +42,84 @@ H5TOOLS_DLLVAR hid_t H5E_tools_min_id_g;
*/
#define H5TOOLS_INIT_ERROR() { \
H5tools_ERR_CLS_g = H5Eregister_class("H5tools", "HDF5:tools", lib_str); \
H5E_tools_g= H5Ecreate_msg(H5tools_ERR_CLS_g, H5E_MAJOR, "Failure in tools library"); \
H5E_tools_g = H5Ecreate_msg(H5tools_ERR_CLS_g, H5E_MAJOR, "Failure in tools library"); \
H5E_tools_min_id_g = H5Ecreate_msg(H5tools_ERR_CLS_g, H5E_MINOR, "error in function"); \
H5E_tools_min_info_id_g = H5Ecreate_msg(H5tools_ERR_CLS_g, H5E_MINOR, "function info"); \
H5E_tools_min_dbg_id_g = H5Ecreate_msg(H5tools_ERR_CLS_g, H5E_MINOR, "function debug"); \
}
/*
* H5TOOLS_CLOSE_ERROR macro, used to initialize error reporting.
*/
#define H5TOOLS_CLOSE_ERROR() { \
H5Eclose_msg(H5E_tools_min_dbg_id_g); \
H5Eclose_msg(H5E_tools_min_info_id_g); \
H5Eclose_msg(H5E_tools_min_id_g); \
H5Eclose_msg(H5E_tools_g); \
H5Eunregister_class(H5tools_ERR_CLS_g); \
}
/*
* HERR_INIT macro, used to facilitate error reporting. Declaration and assignments of error variables.
* H5TOOLS_ERR_INIT macro, used to facilitate error reporting. Declaration and assignments of error variables.
* Use at the beginning of a function using error handling macros.
*/
#define HERR_INIT(ret_typ, ret_init) \
hbool_t past_catch = FALSE; \
#define H5TOOLS_ERR_INIT(ret_typ, ret_init) \
hid_t pstack_id = H5I_INVALID_HID; \
hid_t estack_id = H5tools_ERR_STACK_g; \
hbool_t past_catch = FALSE; \
ret_typ ret_value = ret_init;
/*
* H5TOOLS_PUSH_STACK macro, used to create a new error stack.
*/
#define H5TOOLS_PUSH_STACK() { \
pstack_id = estack_id; \
estack_id = H5Ecreate_stack(); \
}
/*
* H5TOOLS_INFO macro, used to facilitate error reporting . The arguments are the major
* error number, the minor error number, and a description of the error.
* H5TOOLS_POP_STACK macro, used to release a new error stack.
*/
#define H5TOOLS_POP_STACK() { \
if (H5I_INVALID_HID != pstack_id) { \
H5Eclose_stack(estack_id); \
estack_id = pstack_id; \
pstack_id = H5I_INVALID_HID; \
} \
}
/*
* H5TOOLS_DEBUG macro, used to facilitate error reporting. The arguments are the minor error number, and a description of the error.
*/
#ifdef H5_TOOLS_DEBUG
#define H5TOOLS_DEBUG(min_id, ...) { \
H5Epush2(estack_id, __FILE__, FUNC, __LINE__, H5tools_ERR_CLS_g, H5E_tools_g, min_id, __VA_ARGS__); \
}
#define H5TOOLS_ENDDEBUG(min_id, ...) { \
H5Epush2(estack_id, __FILE__, FUNC, __LINE__, H5tools_ERR_CLS_g, H5E_tools_g, min_id, __VA_ARGS__); \
H5Eprint2(estack_id, stderr); \
}
#else
#define H5TOOLS_DEBUG(min_id, ...) { \
; \
}
#define H5TOOLS_ENDDEBUG(min_id, ...) { \
; \
}
#endif
/*
* H5TOOLS_INFO macro, used to facilitate error reporting . The arguments are the minor error number, and a description of the error.
*/
#define H5TOOLS_INFO(min_id, ...) { \
H5Epush2(H5tools_ERR_STACK_g, __FILE__, FUNC, __LINE__, H5tools_ERR_CLS_g, H5E_tools_g, min_id, __VA_ARGS__); \
}
/*
* HERROR macro, used to facilitate error reporting . The arguments are the major
* H5TOOLS_ERROR macro, used to facilitate error reporting . The arguments are the major
* error number, the minor error number, and a description of the error.
*/
#define HERROR(maj_id, min_id, ...) { \
#define H5TOOLS_ERROR(maj_id, min_id, ...) { \
H5Epush2(H5tools_ERR_STACK_g, __FILE__, FUNC, __LINE__, H5tools_ERR_CLS_g, maj_id, min_id, __VA_ARGS__); \
ret_value = FAIL; \
}
@@ -82,7 +128,7 @@ H5TOOLS_DLLVAR hid_t H5E_tools_min_id_g;
/* Macro for "catching" flow of control when an error occurs. Note that the
* H5_LEAVE macro won't jump back here once it's past this point.
*/
#define CATCH catch_except:; past_catch = TRUE;
/* #define CATCH catch_except:; past_catch = TRUE; defined in H5Eprivate.h */
/*
* H5_LEAVE macro, used to facilitate control flow between a
@@ -91,32 +137,34 @@ H5TOOLS_DLLVAR hid_t H5E_tools_min_id_g;
* The return value is assigned to a variable `ret_value' and control branches
* to the `catch_except' label, if we're not already past it.
*/
#define H5_LEAVE(v) { \
ret_value = v; \
if(!past_catch) \
goto catch_except; \
}
/*
* #define H5_LEAVE(v) { \
* ret_value = v; \
* if(!past_catch) \
* goto catch_except; \
* }
* defined in H5Eprivate.h */
/*
* H5E_THROW macro, used to facilitate error reporting within a function body.
* H5TOOLS_THROW macro, used to facilitate error reporting within a function body.
* The arguments are the minor error number, and an error string.
* The return value is assigned to a variable `ret_value' and control branches
* to the `catch_except' label, if we're not already past it.
*/
#define H5E_THROW(fail_value, min_id, ...) { \
#define H5TOOLS_THROW(fail_value, min_id, ...) { \
H5Epush2(H5tools_ERR_STACK_g, __FILE__, FUNC, __LINE__, H5tools_ERR_CLS_g, H5E_tools_g, min_id, __VA_ARGS__); \
H5_LEAVE(fail_value) \
H5_LEAVE(fail_value) \
}
/*
* HGOTO_ERROR macro, used to facilitate error reporting within a function body. The arguments are
* H5TOOLS_GOTO_ERROR macro, used to facilitate error reporting within a function body. The arguments are
* the major error number, the minor error number, the return value, and an
* error string. The return value is assigned to a variable `ret_value' and
* control branches to the `done' label.
*/
#define HGOTO_ERROR(fail_value, min_id, ...) { \
HERROR(H5E_tools_g, min_id, __VA_ARGS__); \
HGOTO_DONE(fail_value) \
#define H5TOOLS_GOTO_ERROR(fail_value, min_id, ...) { \
H5TOOLS_ERROR(H5E_tools_g, min_id, __VA_ARGS__); \
HGOTO_DONE(fail_value) \
}
/*
@@ -124,7 +172,7 @@ H5TOOLS_DLLVAR hid_t H5E_tools_min_id_g;
* The argument is the return value which is assigned to the `ret_value'
* variable. Control branches to the `done' label.
*/
#define HGOTO_DONE(ret_val) {ret_value = ret_val; goto done;}
/* #define HGOTO_DONE(ret_val) {ret_value = ret_val; goto done;} defined in H5Eprivate.h */
#endif /* H5TOOLS_ERROR_H_ */
+6 -6
View File
@@ -51,7 +51,7 @@ h5tools_canreadf(const char* name, /* object name, serves also as boolean pr
/* get information about filters */
if ((nfilters = H5Pget_nfilters(dcpl_id)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_nfilters failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_nfilters failed");
/* if we do not have filters, we can read the dataset safely */
if (!nfilters)
@@ -60,7 +60,7 @@ h5tools_canreadf(const char* name, /* object name, serves also as boolean pr
/* check availability of filters */
for (i = 0; i < nfilters; i++) {
if ((filtn = H5Pget_filter2(dcpl_id, (unsigned) i, 0, 0, 0, (size_t) 0, 0, NULL)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_filter2 failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_filter2 failed");
switch (filtn) {
/*-------------------------------------------------------------------------
@@ -69,7 +69,7 @@ h5tools_canreadf(const char* name, /* object name, serves also as boolean pr
*/
default:
if ((udfilter_avail = H5Zfilter_avail(filtn)) < 0) {
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Zfilter_avail failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Zfilter_avail failed");
}
else if (!udfilter_avail) {
if (name)
@@ -164,11 +164,11 @@ h5tools_can_encode(H5Z_filter_t filtn)
unsigned int filter_config_flags;
if (H5Zget_filter_info(filtn, &filter_config_flags) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Zget_filter_info failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Zget_filter_info failed");
if ((filter_config_flags
& (H5Z_FILTER_CONFIG_ENCODE_ENABLED | H5Z_FILTER_CONFIG_DECODE_ENABLED)) == 0) {
/* filter present but neither encode nor decode is supported (???) */
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "neither encode nor decode is supported");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "neither encode nor decode is supported");
}
else if ((filter_config_flags
& (H5Z_FILTER_CONFIG_ENCODE_ENABLED | H5Z_FILTER_CONFIG_DECODE_ENABLED)) == H5Z_FILTER_CONFIG_DECODE_ENABLED) {
@@ -178,7 +178,7 @@ h5tools_can_encode(H5Z_filter_t filtn)
else if ((filter_config_flags
& (H5Z_FILTER_CONFIG_ENCODE_ENABLED | H5Z_FILTER_CONFIG_DECODE_ENABLED)) == H5Z_FILTER_CONFIG_ENCODE_ENABLED) {
/* encoder only: write but not read (???) */
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "encoder only: write but not read");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "encoder only: write but not read");
}
else if ((filter_config_flags
& (H5Z_FILTER_CONFIG_ENCODE_ENABLED | H5Z_FILTER_CONFIG_DECODE_ENABLED))
+185 -78
View File
@@ -289,19 +289,27 @@ char *
h5tools_str_prefix(h5tools_str_t *str/*in,out*/, const h5tool_format_t *info,
hsize_t elmtno, unsigned ndims, h5tools_context_t *ctx)
{
H5TOOLS_ERR_INIT(int, SUCCEED)
size_t i = 0;
hsize_t curr_pos = elmtno;
H5TOOLS_PUSH_STACK();
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "enter");
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "elmtno=%ld, ctx->ndims=%d", elmtno, ctx->ndims);
h5tools_str_reset(str);
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "ndims=%d", ndims);
if(ndims > 0) {
/*
* Calculate the number of elements represented by a unit change in a
* certain index position.
*/
for(i = 0; i < (size_t) ndims; i++) {
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "curr_pos=%ld - ctx->acc[%d]=%ld", curr_pos, i, ctx->acc[i]);
ctx->pos[i] = curr_pos / ctx->acc[i];
curr_pos -= ctx->acc[i] * ctx->pos[i];
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "curr_pos=%ld - ctx->pos[%d]=%ld - ctx->acc[%d]=%ld", curr_pos, i, ctx->pos[i], i, ctx->acc[i]);
}
HDassert(curr_pos == 0);
@@ -316,7 +324,11 @@ h5tools_str_prefix(h5tools_str_t *str/*in,out*/, const h5tool_format_t *info,
}
}
else /* Scalar */
h5tools_str_append(str, OPT(info->idx_n_fmt, HSIZE_T_FORMAT), (hsize_t) 0);
h5tools_str_append(str, OPT(info->idx_n_fmt, HSIZE_T_FORMAT), (hsize_t)elmtno);
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "str=%s", str->s);
H5TOOLS_ENDDEBUG(H5E_tools_min_dbg_id_g, "exit");
H5TOOLS_POP_STACK();
/* Add prefix and suffix to the index */
return h5tools_str_fmt(str, (size_t)0, OPT(info->idx_fmt, "%s: "));
@@ -672,6 +684,7 @@ char *
h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t container,
hid_t type, void *vp, h5tools_context_t *ctx)
{
H5TOOLS_ERR_INIT(char*, NULL);
size_t nsize, offset, size=0, nelmts, start;
H5T_sign_t nsign;
char *name = NULL;
@@ -683,6 +696,8 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
H5T_str_t pad;
H5T_class_t type_class;
H5TOOLS_PUSH_STACK();
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "enter");
/* Build default formats for long long types */
if(!fmt_llong[0]) {
HDsnprintf(fmt_llong, sizeof(fmt_llong), "%%%sd", H5_PRINTF_LL_WIDTH);
@@ -711,6 +726,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
return NULL;
switch (type_class) {
case H5T_FLOAT:
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "H5T_FLOAT");
if(sizeof(float) == nsize) {
/* if (H5Tequal(type, H5T_NATIVE_FLOAT)) */
float tempfloat;
@@ -742,6 +758,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
char quote = '\0';
char *s;
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "H5T_STRING");
quote = '\0';
if(H5Tis_variable_str(type)) {
/* cp_vp is the pointer into the struct where a `char*' is stored. So we have
@@ -814,6 +831,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
break;
case H5T_INTEGER:
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "H5T_INTEGER");
if(sizeof(char) == nsize) {
if(info->ascii)
h5tools_print_char(str, info, (char) (*ucp_vp));
@@ -951,6 +969,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
break;
case H5T_COMPOUND:
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "H5T_COMPOUND");
if(ctx->cmpd_listv) { /* there is <list_of_fields> */
unsigned save_indent_level; /* The indentation level */
size_t curr_field; /* Current field to display */
@@ -1052,6 +1071,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
{
char enum_name[1024];
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "H5T_ENUM");
if(H5Tenum_nameof(type, vp, enum_name, sizeof enum_name) >= 0)
h5tools_str_append(str, h5tools_escape(enum_name, sizeof(enum_name)));
else {
@@ -1066,61 +1086,119 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
break;
case H5T_REFERENCE:
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "H5T_REFERENCE");
if(h5tools_str_is_zero(vp, nsize))
h5tools_str_append(str, "NULL");
else {
if(nsize == H5R_DSET_REG_REF_BUF_SIZE) {
/* if (H5Tequal(type, H5T_STD_REF_DSETREG)) */
h5tools_str_sprint_region(str, info, container, vp);
if (H5Tequal(type, H5T_STD_REF)) {
char *obj_name = NULL;
H5O_type_t obj_type; /* Object type */
H5R_type_t ref_type; /* Reference type */
const H5R_ref_t *ref_vp = (const H5R_ref_t *)vp;
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "H5T_REFERENCE:H5T_STD_REF");
ref_type = H5Rget_type(ref_vp);
H5Rget_obj_type3(ref_vp, H5P_DEFAULT, &obj_type);
switch (ref_type) {
case H5R_OBJECT1:
{
/* Object references -- show the type and OID of the referenced object. */
H5O_info_t oi;
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "ref_type is H5R_OBJECT1");
if((obj = H5Ropen_object(ref_vp, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
H5Oget_info2(obj, &oi, H5O_INFO_BASIC);
if(H5Oclose(obj) < 0)
H5Epush2(H5tools_ERR_STACK_g, __FILE__, FUNC, __LINE__, H5tools_ERR_CLS_g, H5E_tools_g, H5E_tools_min_id_g,
"H5Oclose H5R_OBJECT1 failed");
}
else
H5Epush2(H5tools_ERR_STACK_g, __FILE__, FUNC, __LINE__, H5tools_ERR_CLS_g, H5E_tools_g, H5E_tools_min_id_g,
"H5Ropen_object H5R_OBJECT1 failed");
/* Print object type and close object */
switch (obj_type) {
case H5O_TYPE_GROUP:
h5tools_str_append(str, "%u-%s", (unsigned) oi.type, H5_TOOLS_GROUP);
break;
case H5O_TYPE_DATASET:
h5tools_str_append(str, "%u-%s", (unsigned) oi.type, H5_TOOLS_DATASET);
break;
case H5O_TYPE_NAMED_DATATYPE:
h5tools_str_append(str, "%u-%s", (unsigned) oi.type, H5_TOOLS_DATATYPE);
break;
case H5O_TYPE_MAP:
case H5O_TYPE_UNKNOWN:
case H5O_TYPE_NTYPES:
default:
h5tools_str_append(str, "%u-", (unsigned) oi.type);
break;
} /* end switch */
H5Oclose(obj);
h5tools_str_sprint_reference(str, info, container, ref_vp);
/* Print OID */
if(info->obj_hidefileno)
h5tools_str_append(str, info->obj_format, oi.addr);
else
h5tools_str_append(str, info->obj_format, oi.fileno, oi.addr);
}
break;
case H5R_DATASET_REGION1:
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "ref_type is H5R_DATASET_REGION1");
h5tools_str_append(str, H5_TOOLS_DATASET);
h5tools_str_sprint_reference(str, info, container, ref_vp);
break;
case H5R_OBJECT2:
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "ref_type is H5R_OBJECT2");
switch (obj_type) {
case H5O_TYPE_GROUP:
h5tools_str_append(str, H5_TOOLS_GROUP);
break;
case H5O_TYPE_DATASET:
h5tools_str_append(str, H5_TOOLS_DATASET);
break;
case H5O_TYPE_NAMED_DATATYPE:
h5tools_str_append(str, H5_TOOLS_DATATYPE);
break;
case H5O_TYPE_MAP:
case H5O_TYPE_UNKNOWN:
case H5O_TYPE_NTYPES:
default:
break;
} /* end switch */
h5tools_str_sprint_reference(str, info, container, ref_vp);
break;
case H5R_DATASET_REGION2:
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "ref_type is H5R_DATASET_REGION2");
h5tools_str_append(str, H5_TOOLS_DATASET);
h5tools_str_sprint_reference(str, info, container, ref_vp);
break;
case H5R_ATTR:
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "ref_type is H5R_ATTR");
h5tools_str_append(str, H5_TOOLS_ATTRIBUTE);
h5tools_str_sprint_reference(str, info, container, ref_vp);
break;
case H5R_BADTYPE:
case H5R_MAXTYPE:
default:
break;
} /* end switch */
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "H5T_REFERENCE:H5T_STD_REF end");
}
else if (nsize == H5R_OBJ_REF_BUF_SIZE) {
/* if (H5Tequal(type, H5T_STD_REF_OBJ)) */
/*
* Object references -- show the type and OID of the referenced
* object.
*/
H5O_info_t oi;
const char *path;
obj = H5Rdereference2(container, H5P_DEFAULT, H5R_OBJECT, vp);
H5Oget_info2(obj, &oi, H5O_INFO_BASIC);
/* Print object type and close object */
switch(oi.type) {
case H5O_TYPE_GROUP:
h5tools_str_append(str, H5_TOOLS_GROUP);
break;
case H5O_TYPE_DATASET:
h5tools_str_append(str, H5_TOOLS_DATASET);
break;
case H5O_TYPE_NAMED_DATATYPE:
h5tools_str_append(str, H5_TOOLS_DATATYPE);
break;
case H5O_TYPE_MAP:
case H5O_TYPE_UNKNOWN:
case H5O_TYPE_NTYPES:
default:
h5tools_str_append(str, "%u-", (unsigned) oi.type);
break;
} /* end switch */
H5Oclose(obj);
/* Print OID */
if(info->obj_hidefileno)
h5tools_str_append(str, info->obj_format, oi.addr);
else
h5tools_str_append(str, info->obj_format, oi.fileno, oi.addr);
/* Print name */
path = lookup_ref_path(*(haddr_t *) vp);
if(path) {
h5tools_str_append(str, " ");
h5tools_str_append(str, path);
h5tools_str_append(str, " ");
} /* end if */
else if (H5Tequal(type, H5T_STD_REF_DSETREG)) {
/* if(nsize == H5R_DSET_REG_REF_BUF_SIZE) */
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "H5T_REFERENCE:H5T_STD_REF_DSETREG");
}
else if (H5Tequal(type, H5T_STD_REF_OBJ)) {
/* if (nsize == H5R_OBJ_REF_BUF_SIZE) */
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "H5T_REFERENCE:H5T_STD_REF_OBJ");
} /* end else if (H5Tequal(type, H5T_STD_REF_OBJ)) */
}
break;
@@ -1131,6 +1209,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
hsize_t i, dims[H5S_MAX_RANK], temp_nelmts;
static int is_next_arry_elmt = 0;
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "H5T_ARRAY");
/* Get the array's base datatype for each element */
memb = H5Tget_super(type);
size = H5Tget_size(memb);
@@ -1192,6 +1271,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
{
unsigned int i;
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "H5T_VLEN");
/* Get the VL sequences's base datatype for each element */
memb = H5Tget_super(type);
size = H5Tget_size(memb);
@@ -1238,6 +1318,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
case H5T_BITFIELD:
case H5T_OPAQUE:
{
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "OTHER");
/* All other types get printed as hexadecimal */
size_t i;
if(1 == nsize)
@@ -1255,49 +1336,75 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
break;
} /* end switch */
}
return h5tools_str_fmt(str, start, OPT(info->elmt_fmt, "%s"));
CATCH
ret_value = h5tools_str_fmt(str, start, OPT(info->elmt_fmt, "%s"));
H5TOOLS_ENDDEBUG(H5E_tools_min_dbg_id_g, "exit with %s", ret_value);
H5TOOLS_POP_STACK();
return ret_value;
}
/*-------------------------------------------------------------------------
* Function: h5tools_str_sprint_region
* Function: h5tools_str_sprint_reference
*
* Purpose: Dataset region reference -- show the type and data of the referenced object.
* Purpose: Object reference -- show the name of the referenced object.
*
* Return: Nothing
*-------------------------------------------------------------------------
*/
void
h5tools_str_sprint_region(h5tools_str_t *str, const h5tool_format_t *info,
hid_t container, void *vp)
h5tools_str_sprint_reference(h5tools_str_t *str, const h5tool_format_t *info,
hid_t container, H5R_ref_t *ref_vp)
{
hid_t obj = -1;
hid_t region = -1;
char ref_name[1024];
H5S_sel_type region_type;
H5TOOLS_ERR_INIT(int, SUCCEED);
ssize_t buf_size, status;
obj = H5Rdereference2(container, H5P_DEFAULT, H5R_DATASET_REGION, vp);
if(obj >= 0) {
region = H5Rget_region(container, H5R_DATASET_REGION, vp);
if(region >= 0) {
H5Rget_name(obj, H5R_DATASET_REGION, vp, (char*) ref_name, 1024);
H5TOOLS_PUSH_STACK();
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "enter");
h5tools_str_append(str, info->dset_format, ref_name);
h5tools_str_append(str, " ");
buf_size = H5Rget_file_name(ref_vp, NULL, 0);
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "buf_size=%ld", buf_size);
if (buf_size) {
char *file_name = (char *)HDmalloc(sizeof(char) * (size_t)buf_size + 1);
status = H5Rget_file_name(ref_vp, file_name, buf_size + 1);
file_name[buf_size] = '\0';
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "name=%s", file_name);
h5tools_str_append(str, "{");
h5tools_str_append(str, "%s", file_name);
HDfree(file_name);
}
region_type = H5Sget_select_type(region);
if(region_type==H5S_SEL_POINTS)
h5tools_str_dump_space_points(str, region, info);
else
h5tools_str_dump_space_blocks(str, region, info);
buf_size = H5Rget_obj_name(ref_vp, H5P_DEFAULT, NULL, 0);
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "buf_size=%ld", buf_size);
if (buf_size) {
char *obj_name = (char *)HDmalloc(sizeof(char) * (size_t)buf_size + 1);
status = H5Rget_obj_name(ref_vp, H5P_DEFAULT, obj_name, buf_size + 1);
obj_name[buf_size] = '\0';
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "name=%s", obj_name);
h5tools_str_append(str, "}");
h5tools_str_append(str, "%s", obj_name);
HDfree(obj_name);
}
H5Sclose(region);
} /* end if (region >= 0) */
H5Dclose(obj);
} /* end if (obj >= 0) */
if (H5Rget_type(ref_vp) == H5R_ATTR) {
buf_size = H5Rget_attr_name(ref_vp, NULL, 0);
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "buf_size=%ld", buf_size);
if (buf_size) {
char *attr_name = (char *)HDmalloc(sizeof(char) * (size_t)buf_size + 1);
status = H5Rget_attr_name(ref_vp, attr_name, buf_size + 1);
attr_name[buf_size] = '\0';
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "name=%s", attr_name);
h5tools_str_append(str, "/%s", attr_name);
HDfree(attr_name);
}
}
CATCH
H5TOOLS_ENDDEBUG(H5E_tools_min_dbg_id_g, "exit");
H5TOOLS_POP_STACK();
}
/*-------------------------------------------------------------------------
+4 -5
View File
@@ -36,17 +36,16 @@ H5TOOLS_DLL char *h5tools_str_prefix(h5tools_str_t *str, const h5tool_format_
* new functions needed to display region reference data
*/
H5TOOLS_DLL char *h5tools_str_region_prefix(h5tools_str_t *str, const h5tool_format_t *info,
hsize_t elmtno, hsize_t *ptdata, unsigned ndims,
hsize_t elmtno, hsize_t *ptdata, unsigned ndims,
hsize_t max_idx[], h5tools_context_t *ctx);
H5TOOLS_DLL void h5tools_str_dump_space_slabs(h5tools_str_t *, hid_t, const h5tool_format_t *, h5tools_context_t *ctx);
H5TOOLS_DLL void h5tools_str_dump_space_blocks(h5tools_str_t *, hid_t, const h5tool_format_t *);
H5TOOLS_DLL void h5tools_str_dump_space_points(h5tools_str_t *, hid_t, const h5tool_format_t *);
H5TOOLS_DLL void h5tools_str_sprint_region(h5tools_str_t *str, const h5tool_format_t *info, hid_t container,
void *vp);
H5TOOLS_DLL void h5tools_str_sprint_reference(h5tools_str_t *str, const h5tool_format_t *info, hid_t container, H5R_ref_t *vp);
H5TOOLS_DLL char *h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info,
hid_t container, hid_t type, void *vp,
h5tools_context_t *ctx);
H5TOOLS_DLL char *h5tools_str_replace ( const char *string, const char *substr,
const char *replacement );
H5TOOLS_DLL char *h5tools_str_replace ( const char *string, const char *substr,
const char *replacement );
#endif /* H5TOOLS_STR_H__ */
+2 -2
View File
@@ -803,7 +803,7 @@ init_objs(hid_t fid, find_objs_t *info, table_t **group_table,
/* Find all shared objects */
if((ret_value = h5trav_visit(fid, "/", TRUE, TRUE, find_objs_cb, NULL, info, H5O_INFO_BASIC)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "finding shared objects failed")
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "finding shared objects failed")
done:
/* Release resources */
@@ -1056,7 +1056,7 @@ h5tools_getenv_update_hyperslab_bufsize(void)
errno = 0;
hyperslab_bufsize_mb = HDstrtol(env_str, (char**)NULL, 10);
if (errno != 0 || hyperslab_bufsize_mb <= 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "hyperslab buffer size failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "hyperslab buffer size failed");
/* convert MB to byte */
H5TOOLS_BUFSIZE = (hsize_t)hyperslab_bufsize_mb * 1024 * 1024;
+32 -42
View File
@@ -28,13 +28,13 @@ extern "C" {
/* ``parallel_print'' information */
#define PRINT_DATA_MAX_SIZE 512
#define OUTBUFF_SIZE (PRINT_DATA_MAX_SIZE*4)
#define OUTBUFF_SIZE (PRINT_DATA_MAX_SIZE*4)
H5TOOLS_DLLVAR int g_nTasks;
H5TOOLS_DLLVAR int g_nTasks;
H5TOOLS_DLLVAR unsigned char g_Parallel;
H5TOOLS_DLLVAR char outBuff[];
H5TOOLS_DLLVAR char outBuff[];
H5TOOLS_DLLVAR unsigned outBuffOffset;
H5TOOLS_DLLVAR FILE * overflow_file;
H5TOOLS_DLLVAR FILE *overflow_file;
/* Maximum size used in a call to malloc for a dataset */
H5TOOLS_DLLVAR hsize_t H5TOOLS_MALLOCSIZE;
@@ -88,8 +88,7 @@ typedef struct long_options {
* this gets returned from get_option */
} long_options;
H5TOOLS_DLL int get_option(int argc, const char **argv, const char *opt,
const struct long_options *l_opt);
H5TOOLS_DLL int get_option(int argc, const char **argv, const char *opt, const struct long_options *l_opt);
/*
* end get_option section
*/
@@ -97,7 +96,7 @@ H5TOOLS_DLL int get_option(int argc, const char **argv, const char *opt,
/*struct taken from the dumper. needed in table struct*/
typedef struct obj_t {
haddr_t objno;
char *objname;
char *objname;
hbool_t displayed; /* Flag to indicate that the object has been displayed */
hbool_t recorded; /* Flag for named datatypes to indicate they were found in the group hierarchy */
} obj_t;
@@ -111,7 +110,7 @@ typedef struct table_t {
/*this struct stores the information that is passed to the find_objs function*/
typedef struct find_objs_t {
hid_t fid;
hid_t fid;
table_t *group_table;
table_t *type_table;
table_t *dset_table;
@@ -120,26 +119,21 @@ typedef struct find_objs_t {
H5TOOLS_DLLVAR unsigned h5tools_nCols; /*max number of columns for outputting */
/* Definitions of useful routines */
H5TOOLS_DLL void indentation(unsigned);
H5TOOLS_DLL void print_version(const char *progname);
H5TOOLS_DLL void parallel_print(const char* format, ... );
H5TOOLS_DLL herr_t parse_tuple(const char *start,
int sep,
char **cpy_out,
unsigned *nelems,
char ***ptrs_out);
H5TOOLS_DLL void error_msg(const char *fmt, ...);
H5TOOLS_DLL void warn_msg(const char *fmt, ...);
H5TOOLS_DLL void help_ref_msg(FILE *output);
H5TOOLS_DLL void free_table(table_t *table);
H5TOOLS_DLL void indentation(unsigned);
H5TOOLS_DLL void print_version(const char *progname);
H5TOOLS_DLL void parallel_print(const char* format, ... );
H5TOOLS_DLL herr_t parse_tuple(const char *start, int sep, char **cpy_out, unsigned *nelems, char ***ptrs_out);
H5TOOLS_DLL void error_msg(const char *fmt, ...);
H5TOOLS_DLL void warn_msg(const char *fmt, ...);
H5TOOLS_DLL void help_ref_msg(FILE *output);
H5TOOLS_DLL void free_table(table_t *table);
#ifdef H5DUMP_DEBUG
H5TOOLS_DLL void dump_tables(find_objs_t *info)
H5TOOLS_DLL void dump_tables(find_objs_t *info)
#endif /* H5DUMP_DEBUG */
H5TOOLS_DLL herr_t init_objs(hid_t fid, find_objs_t *info, table_t **group_table,
table_t **dset_table, table_t **type_table);
H5TOOLS_DLL obj_t *search_obj(table_t *temp, haddr_t objno);
H5TOOLS_DLL herr_t init_objs(hid_t fid, find_objs_t *info, table_t **group_table, table_t **dset_table, table_t **type_table);
H5TOOLS_DLL obj_t *search_obj(table_t *temp, haddr_t objno);
#ifndef H5_HAVE_TMPFILE
H5TOOLS_DLL FILE * tmpfile(void);
H5TOOLS_DLL FILE *tmpfile(void);
#endif
/*************************************************************
@@ -161,30 +155,26 @@ typedef struct {
/* obtain link info from H5tools_get_symlink_info() */
typedef struct {
H5O_type_t trg_type; /* OUT: target type */
char *trg_path; /* OUT: target obj path. This must be freed
* when used with H5tools_get_symlink_info() */
haddr_t objno; /* OUT: target object address */
unsigned long fileno; /* OUT: File number that target object is located in */
H5L_info_t linfo; /* OUT: link info */
h5tool_opt_t opt; /* IN: options */
H5O_type_t trg_type; /* OUT: target type */
char *trg_path; /* OUT: target obj path. This must be freed
* when used with H5tools_get_symlink_info() */
haddr_t objno; /* OUT: target object address */
unsigned long fileno; /* OUT: File number that target object is located in */
H5L_info_t linfo; /* OUT: link info */
h5tool_opt_t opt; /* IN: options */
} h5tool_link_info_t;
/* Definitions of routines */
H5TOOLS_DLL int H5tools_get_symlink_info(hid_t file_id, const char * linkpath,
h5tool_link_info_t *link_info, hbool_t get_obj_type);
H5TOOLS_DLL int H5tools_get_symlink_info(hid_t file_id, const char * linkpath, h5tool_link_info_t *link_info, hbool_t get_obj_type);
H5TOOLS_DLL const char *h5tools_getprogname(void);
H5TOOLS_DLL void h5tools_setprogname(const char*progname);
H5TOOLS_DLL int h5tools_getstatus(void);
H5TOOLS_DLL void h5tools_setstatus(int d_status);
H5TOOLS_DLL void h5tools_setprogname(const char*progname);
H5TOOLS_DLL int h5tools_getstatus(void);
H5TOOLS_DLL void h5tools_setstatus(int d_status);
H5TOOLS_DLL int h5tools_getenv_update_hyperslab_bufsize(void);
H5TOOLS_DLL int h5tools_set_configured_fapl(hid_t fapl_id,
const char vfd_name[],
void *fapl_t_ptr);
H5TOOLS_DLL int h5tools_set_configured_fapl(hid_t fapl_id, const char vfd_name[], void *fapl_t_ptr);
#ifdef H5_HAVE_ROS3_VFD
H5TOOLS_DLL int h5tools_populate_ros3_fapl(H5FD_ros3_fapl_t *fa,
const char **values);
H5TOOLS_DLL int h5tools_populate_ros3_fapl(H5FD_ros3_fapl_t *fa, const char **values);
#endif /* H5_HAVE_ROS3_VFD */
#ifdef __cplusplus
+10 -10
View File
@@ -259,7 +259,7 @@ traverse(hid_t file_id, const char *grp_name, hbool_t visit_start,
/* Get info for starting object */
if(H5Oget_info_by_name2(file_id, grp_name, &oinfo, fields, H5P_DEFAULT) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Oget_info_by_name failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Oget_info_by_name failed");
/* Visit the starting object */
if(visit_start && visitor->visit_obj)
@@ -289,12 +289,12 @@ traverse(hid_t file_id, const char *grp_name, hbool_t visit_start,
if(recurse) {
/* Visit all links in group, recursively */
if(H5Lvisit_by_name(file_id, grp_name, trav_index_by, trav_index_order, traverse_cb, &udata, H5P_DEFAULT) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Lvisit_by_name failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Lvisit_by_name failed");
} /* end if */
else {
/* Iterate over links in group */
if(H5Literate_by_name(file_id, grp_name, trav_index_by, trav_index_order, NULL, traverse_cb, &udata, H5P_DEFAULT) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Literate_by_name failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Literate_by_name failed");
} /* end else */
/* Free visited addresses table */
@@ -439,7 +439,7 @@ h5trav_getinfo(hid_t file_id, trav_info_t *info)
/* Traverse all objects in the file, visiting each object & link */
if(traverse(file_id, "/", TRUE, TRUE, &info_visitor, H5O_INFO_BASIC) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "traverse failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "traverse failed");
done:
return ret_value;
@@ -605,7 +605,7 @@ h5trav_gettable(hid_t fid, trav_table_t *table)
/* Traverse all objects in the file, visiting each object & link */
if(traverse(fid, "/", TRUE, TRUE, &table_visitor, H5O_INFO_BASIC) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "traverse failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "traverse failed");
done:
return ret_value;
@@ -1031,7 +1031,7 @@ h5trav_print(hid_t fid)
/* Traverse all objects in the file, visiting each object & link */
if(traverse(fid, "/", TRUE, TRUE, &print_visitor, H5O_INFO_BASIC) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "traverse failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "traverse failed");
done:
return ret_value;
@@ -1062,7 +1062,7 @@ h5trav_visit(hid_t fid, const char *grp_name, hbool_t visit_start,
/* Traverse all objects in the file, visiting each object & link */
if(traverse(fid, grp_name, visit_start, recurse, &visitor, fields) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "traverse failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "traverse failed");
done:
return ret_value;
@@ -1089,7 +1089,7 @@ symlink_visit_add(symlink_trav_t *visited, H5L_type_t type, const char *file, co
visited->nalloc = MAX(1, visited->nalloc * 2);
if(NULL == (tmp_ptr = HDrealloc(visited->objs, visited->nalloc * sizeof(symlink_trav_path_t))))
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "visited data structure realloc failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "visited data structure realloc failed");
visited->objs = (symlink_trav_path_t *)tmp_ptr;
} /* end if */
@@ -1103,7 +1103,7 @@ symlink_visit_add(symlink_trav_t *visited, H5L_type_t type, const char *file, co
if(type == H5L_TYPE_EXTERNAL) {
if(NULL == (visited->objs[idx].file = HDstrdup(file))) {
visited->nused--;
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "visited data structure name allocation failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "visited data structure name allocation failed");
} /* end if */
} /* end if */
@@ -1111,7 +1111,7 @@ symlink_visit_add(symlink_trav_t *visited, H5L_type_t type, const char *file, co
visited->nused--;
if(visited->objs[idx].file)
HDfree (visited->objs[idx].file);
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "visited data structure path allocation failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "visited data structure path allocation failed");
} /* end if */
done:
+12 -12
View File
@@ -207,7 +207,7 @@ static int parse_flag(const char* s_flag, unsigned *flag)
int
main (int argc, const char *argv[])
{
int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */
int ret_value = 0; /*no need to LEAVE() on ERROR: H5TOOLS_ERR_INIT(int, SUCCEED) */
H5E_auto2_t func;
H5E_auto2_t tools_func;
void *edata;
@@ -395,18 +395,18 @@ main (int argc, const char *argv[])
/* create property to pass copy options */
if ( (ocpl_id = H5Pcreate(H5P_OBJECT_COPY)) < 0)
HGOTO_ERROR(EXIT_FAILURE, H5E_tools_min_id_g, "H5Pcreate failed");
H5TOOLS_GOTO_ERROR(EXIT_FAILURE, H5E_tools_min_id_g, "H5Pcreate failed");
/* set options for object copy */
if (flag) {
if ( H5Pset_copy_object(ocpl_id, flag) < 0)
HGOTO_ERROR(EXIT_FAILURE, H5E_tools_min_id_g, "H5Pset_copy_object failed");
H5TOOLS_GOTO_ERROR(EXIT_FAILURE, H5E_tools_min_id_g, "H5Pset_copy_object failed");
}
/* Create link creation property list */
if((lcpl_id = H5Pcreate(H5P_LINK_CREATE)) < 0) {
error_msg("Could not create link creation property list\n");
HGOTO_ERROR(EXIT_FAILURE, H5E_tools_min_id_g, "H5Pcreate failed");
H5TOOLS_GOTO_ERROR(EXIT_FAILURE, H5E_tools_min_id_g, "H5Pcreate failed");
} /* end if */
/* Check for creating intermediate groups */
@@ -414,7 +414,7 @@ main (int argc, const char *argv[])
/* Set the intermediate group creation property */
if(H5Pset_create_intermediate_group(lcpl_id, 1) < 0) {
error_msg("Could not set property for creating parent groups\n");
HGOTO_ERROR(EXIT_FAILURE, H5E_tools_min_id_g, "H5Pset_create_intermediate_group failed");
H5TOOLS_GOTO_ERROR(EXIT_FAILURE, H5E_tools_min_id_g, "H5Pset_create_intermediate_group failed");
} /* end if */
/* Display some output if requested */
@@ -438,7 +438,7 @@ main (int argc, const char *argv[])
if (H5Lexists(fid_dst, str_ptr, H5P_DEFAULT) <= 0) {
error_msg("group <%s> doesn't exist. Use -p to create parent groups.\n", str_ptr);
HDfree(str_ptr);
HGOTO_ERROR(EXIT_FAILURE, H5E_tools_min_id_g, "H5Lexists failed");
H5TOOLS_GOTO_ERROR(EXIT_FAILURE, H5E_tools_min_id_g, "H5Lexists failed");
}
HDfree(str_ptr);
}
@@ -458,7 +458,7 @@ main (int argc, const char *argv[])
if(H5Lcopy(fid_src, oname_src,
fid_dst, oname_dst,
H5P_DEFAULT, H5P_DEFAULT) < 0)
HGOTO_ERROR(EXIT_FAILURE, H5E_tools_min_id_g, "H5Lcopy failed");
H5TOOLS_GOTO_ERROR(EXIT_FAILURE, H5E_tools_min_id_g, "H5Lcopy failed");
}
else {
/* valid link */
@@ -468,7 +468,7 @@ main (int argc, const char *argv[])
oname_dst, /* Name of the destination object */
ocpl_id, /* Object copy property list */
lcpl_id)<0) /* Link creation property list */
HGOTO_ERROR(EXIT_FAILURE, H5E_tools_min_id_g, "H5Ocopy failed");
H5TOOLS_GOTO_ERROR(EXIT_FAILURE, H5E_tools_min_id_g, "H5Ocopy failed");
}
/* free link info path */
@@ -477,15 +477,15 @@ main (int argc, const char *argv[])
/* close propertis */
if(H5Pclose(ocpl_id)<0)
HGOTO_ERROR(EXIT_FAILURE, H5E_tools_min_id_g, "H5Pclose failed");
H5TOOLS_GOTO_ERROR(EXIT_FAILURE, H5E_tools_min_id_g, "H5Pclose failed");
if(H5Pclose(lcpl_id)<0)
HGOTO_ERROR(EXIT_FAILURE, H5E_tools_min_id_g, "H5Pclose failed");
H5TOOLS_GOTO_ERROR(EXIT_FAILURE, H5E_tools_min_id_g, "H5Pclose failed");
/* close files */
if (H5Fclose(fid_src)<0)
HGOTO_ERROR(EXIT_FAILURE, H5E_tools_min_id_g, "H5Fclose failed");
H5TOOLS_GOTO_ERROR(EXIT_FAILURE, H5E_tools_min_id_g, "H5Fclose failed");
if (H5Fclose(fid_dst)<0)
HGOTO_ERROR(EXIT_FAILURE, H5E_tools_min_id_g, "H5Fclose failed");
H5TOOLS_GOTO_ERROR(EXIT_FAILURE, H5E_tools_min_id_g, "H5Fclose failed");
leave(EXIT_SUCCESS);
+1 -2
View File
@@ -634,8 +634,7 @@ parse_hsize_list(const char *h_list, subset_d *d)
/*-------------------------------------------------------------------------
* Function: parse_subset_params
*
* Purpose: Parse the so-called "terse" syntax for specifying subsetting
* parameters.
* Purpose: Parse the so-called "terse" syntax for specifying subsetting parameters.
*
* Return: Success: struct subset_t object
* Failure: NULL
+47 -168
View File
@@ -41,11 +41,6 @@ static int dump_extlink(hid_t group, const char *linkname, const char *objn
* atomic datatype or committed/transient datatype.
*
* Return: void
*
* Programmer: Ruey-Hsia Li
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
void
@@ -70,11 +65,6 @@ dump_datatype(hid_t type)
* array, or others.
*
* Return: void
*
* Programmer: Ruey-Hsia Li
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
void
@@ -97,14 +87,7 @@ dump_dataspace(hid_t space)
* Purpose: attribute function callback called by H5Aiterate2, displays the attribute
*
* Return: Success: SUCCEED
*
* Failure: FAIL
*
* Programmer: Ruey-Hsia Li
*
* Modifications: Pedro Vicente, October 4, 2007
* Added H5A_info_t parameter to conform with H5Aiterate2
*
*-------------------------------------------------------------------------
*/
herr_t
@@ -120,6 +103,8 @@ dump_attr_cb(hid_t oid, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *
HDmemset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
ctx.display_index = display_ai;
ctx.display_char = display_char;
attr_id = H5Aopen(oid, attr_name, H5P_DEFAULT);
oid_output = display_oid;
@@ -144,7 +129,7 @@ dump_attr_cb(hid_t oid, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *
outputformat = &string_dataformat;
h5dump_type_table = type_table;
h5tools_dump_attribute(rawoutstream, outputformat, &ctx, attr_name, attr_id, display_ai, display_char);
h5tools_dump_attribute(rawoutstream, outputformat, &ctx, attr_name, attr_id);
h5dump_type_table = NULL;
if(attr_id < 0) {
@@ -163,18 +148,7 @@ dump_attr_cb(hid_t oid, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *
* displays everything in the specified object
*
* Return: Success: SUCCEED
*
* Failure: FAIL
*
* Programmer: Ruey-Hsia Li
*
* Modifications:
* RMcG, November 2000
* Added XML support. Also, optionally checks the op_data argument
*
* PVN, May 2008
* Dump external links
*
*-------------------------------------------------------------------------
*/
static herr_t
@@ -183,12 +157,12 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ATTR
hid_t obj;
hid_t dapl_id = H5P_DEFAULT; /* dataset access property list ID */
herr_t ret = SUCCEED;
char *obj_path = NULL; /* Full path of object */
h5tools_str_t buffer; /* string into which to render */
h5tools_context_t ctx; /* print context */
char *obj_path = NULL; /* Full path of object */
h5tools_str_t buffer; /* string into which to render */
h5tools_context_t ctx; /* print context */
h5tool_format_t *outputformat = &h5tools_dataformat;
h5tool_format_t string_dataformat;
hsize_t curr_pos = 0; /* total data element position */
hsize_t curr_pos = 0; /* total data element position */
/* setup */
HDmemset(&buffer, 0, sizeof(h5tools_str_t));
@@ -584,7 +558,6 @@ done:
* Purpose: Iterate and display attributes within the specified group
*
* Return: void
*
*-------------------------------------------------------------------------
*/
void
@@ -614,7 +587,6 @@ attr_iteration(hid_t gid, unsigned attr_crt_order_flags)
* Purpose: Iterate and display links within the specified group
*
* Return: void
*
*-------------------------------------------------------------------------
*/
void
@@ -635,15 +607,6 @@ link_iteration(hid_t gid, unsigned crt_order_flags)
* Purpose: Dump named datatype
*
* Return: void
*
* Programmer: Ruey-Hsia Li
*
* Modifications:
* Pedro Vicente, March 27, 2006
* added display of attributes
* Pedro Vicente, October 4, 2007, added parameters to H5Aiterate2() to allow for
* other iteration orders
*
*-------------------------------------------------------------------------
*/
void
@@ -651,10 +614,10 @@ dump_named_datatype(hid_t tid, const char *name)
{
H5O_info_t oinfo;
unsigned attr_crt_order_flags;
hid_t tcpl_id = -1; /* datatype creation property list ID */
hsize_t curr_pos = 0; /* total data element position */
hid_t tcpl_id = -1; /* datatype creation property list ID */
hsize_t curr_pos = 0; /* total data element position */
h5tools_str_t buffer; /* string into which to render */
h5tools_context_t ctx; /* print context */
h5tools_context_t ctx; /* print context */
h5tool_format_t *outputformat = &h5tools_dataformat;
h5tool_format_t string_dataformat;
@@ -771,16 +734,6 @@ done:
* Purpose: Dump everything within the specified group
*
* Return: void
*
* Programmer: Ruey-Hsia Li
*
* Modifications:
*
* Call to dump_all_cb -- add parameter to select everything.
*
* Pedro Vicente, October 1, 2007
* handle several iteration orders for attributes and groups
*
*-------------------------------------------------------------------------
*/
void
@@ -793,11 +746,11 @@ dump_group(hid_t gid, const char *name)
unsigned crt_order_flags;
unsigned attr_crt_order_flags;
char type_name[1024];
h5tools_str_t buffer; /* string into which to render */
h5tools_context_t ctx; /* print context */
h5tools_str_t buffer; /* string into which to render */
h5tools_context_t ctx; /* print context */
h5tool_format_t *outputformat = &h5tools_dataformat;
h5tool_format_t string_dataformat;
hsize_t curr_pos = 0; /* total data element position */
hsize_t curr_pos = 0; /* total data element position */
if ((gcpl_id = H5Gget_create_plist(gid)) < 0) {
error_msg("error in getting group creation property list ID\n");
@@ -935,14 +888,6 @@ dump_group(hid_t gid, const char *name)
* Purpose: Dump the specified data set
*
* Return: void
*
* Programmer: Ruey-Hsia Li
*
* Modifications:
* Pedro Vicente, 2004, added dataset creation property list display
* Pedro Vicente, October 4, 2007, added parameters to H5Aiterate2() to allow for
* other iteration orders
*
*-------------------------------------------------------------------------
*/
void
@@ -951,11 +896,11 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset)
h5tools_context_t ctx; /* print context */
h5tool_format_t *outputformat = &h5tools_dataformat;
h5tool_format_t string_dataformat;
hid_t type, space;
unsigned attr_crt_order_flags;
hid_t dcpl_id; /* dataset creation property list ID */
h5tools_str_t buffer; /* string into which to render */
hsize_t curr_pos = 0; /* total data element position */
hid_t type, space;
unsigned attr_crt_order_flags;
hid_t dcpl_id; /* dataset creation property list ID */
h5tools_str_t buffer; /* string into which to render */
hsize_t curr_pos = 0; /* total data element position */
HDmemset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
@@ -1027,6 +972,9 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset)
}
H5Pclose(dcpl_id);
ctx.sset = sset;
ctx.display_index = display_ai;
ctx.display_char = display_char;
if(display_data) {
unsigned data_loop = 1;
unsigned u;
@@ -1070,7 +1018,7 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset)
case H5T_VLEN:
case H5T_ARRAY:
{
h5tools_dump_data(rawoutstream, outputformat, &ctx, did, TRUE, sset, display_ai, display_char);
h5tools_dump_data(rawoutstream, outputformat, &ctx, did, TRUE);
}
break;
@@ -1113,13 +1061,6 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset)
* Purpose: Dump attribute or dataset data
*
* Return: void
*
* Programmer: Ruey-Hsia Li
*
* Modifications: pvn, print the matrix indices
* Albert Cheng, 2004/11/18
* Add --string printing for attributes too.
*
*-------------------------------------------------------------------------
*/
void
@@ -1150,10 +1091,13 @@ dump_data(hid_t obj_id, int obj_data, struct subset_t *sset, int display_index)
HDmemset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
ctx.sset = sset;
ctx.display_index = display_index;
ctx.display_char = display_char;
if(obj_data == DATASET_DATA)
print_dataset = TRUE;
h5tools_dump_data(rawoutstream, outputformat, &ctx, obj_id, print_dataset, sset, display_index, display_char);
h5tools_dump_data(rawoutstream, outputformat, &ctx, obj_id, print_dataset);
}
@@ -1163,11 +1107,6 @@ dump_data(hid_t obj_id, int obj_data, struct subset_t *sset, int display_index)
* Purpose: prints file creation property list information
*
* Return: void
*
* Programmer: pvn
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
void
@@ -1178,9 +1117,9 @@ dump_fcpl(hid_t fid)
size_t off_size; /* size of offsets in the file */
size_t len_size; /* size of lengths in the file */
H5F_fspace_strategy_t fs_strategy; /* file space strategy */
hbool_t fs_persist; /* Persisting free-space or not */
hsize_t fs_threshold; /* free-space section threshold */
hsize_t fsp_size; /* file space page size */
hbool_t fs_persist; /* Persisting free-space or not */
hsize_t fs_threshold; /* free-space section threshold */
hsize_t fsp_size; /* file space page size */
H5F_info2_t finfo; /* file information */
#ifdef SHOW_FILE_DRIVER
hid_t fapl; /* file access property list ID */
@@ -1261,13 +1200,17 @@ dump_fcpl(hid_t fid)
indentation(dump_indent + COL);
if(fs_strategy == H5F_FSPACE_STRATEGY_FSM_AGGR) {
PRINTSTREAM(rawoutstream, "%s %s\n", "FILE_SPACE_STRATEGY", "H5F_FSPACE_STRATEGY_FSM_AGGR");
} else if(fs_strategy == H5F_FSPACE_STRATEGY_PAGE) {
}
else if(fs_strategy == H5F_FSPACE_STRATEGY_PAGE) {
PRINTSTREAM(rawoutstream, "%s %s\n", "FILE_SPACE_STRATEGY", "H5F_FSPACE_STRATEGY_PAGE");
} else if(fs_strategy == H5F_FSPACE_STRATEGY_AGGR) {
}
else if(fs_strategy == H5F_FSPACE_STRATEGY_AGGR) {
PRINTSTREAM(rawoutstream, "%s %s\n", "FILE_SPACE_STRATEGY", "H5F_FSPACE_STRATEGY_AGGR");
} else if(fs_strategy == H5F_FSPACE_STRATEGY_NONE) {
}
else if(fs_strategy == H5F_FSPACE_STRATEGY_NONE) {
PRINTSTREAM(rawoutstream, "%s %s\n", "FILE_SPACE_STRATEGY", "H5F_FSPACE_STRATEGY_NONE");
} else
}
else
PRINTSTREAM(rawoutstream, "%s %s\n", "FILE_SPACE_STRATEGY", "Unknown strategy");
indentation(dump_indent + COL);
PRINTSTREAM(rawoutstream, "%s %s\n","FREE_SPACE_PERSIST", fs_persist ? "TRUE" : "FALSE");
@@ -1296,11 +1239,6 @@ dump_fcpl(hid_t fid)
* Purpose: prints all objects
*
* Return: void
*
* Programmer: pvn
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
void
@@ -1472,7 +1410,6 @@ lnk_search(const char *path, const H5L_info_t *li, void *_op_data)
* Purpose: Handle objects from the command.
*
* Return: void
*
*-------------------------------------------------------------------------
*/
void
@@ -1527,30 +1464,21 @@ handle_paths(hid_t fid, const char *path_name, void H5_ATTR_UNUSED * data, int H
* Purpose: Handle the attributes from the command.
*
* Return: void
*
* Programmer: Bill Wendling
* Tuesday, 9. January 2001
*
* Modifications:
*
* PVN, May 2008
* add an extra parameter PE, to allow printing/not printing of error messages
*
*-------------------------------------------------------------------------
*/
void
handle_attributes(hid_t fid, const char *attr, void H5_ATTR_UNUSED * data, int H5_ATTR_UNUSED pe, const char H5_ATTR_UNUSED *display_name)
handle_attributes(hid_t fid, const char *attr, void H5_ATTR_UNUSED *data, int H5_ATTR_UNUSED pe, const char H5_ATTR_UNUSED *display_name)
{
hid_t oid = -1;
hid_t attr_id = -1;
char *obj_name = NULL;
char *attr_name = NULL;
int j;
h5tools_str_t buffer; /* string into which to render */
h5tools_context_t ctx; /* print context */
h5tools_str_t buffer; /* string into which to render */
h5tools_context_t ctx; /* print context */
h5tool_format_t *outputformat = &h5tools_dataformat;
h5tool_format_t string_dataformat;
hsize_t curr_pos = 0; /* total data element position */
hsize_t curr_pos = 0; /* total data element position */
j = (int)HDstrlen(attr) - 1;
obj_name = (char *)HDmalloc((size_t)j + 2);
@@ -1576,6 +1504,8 @@ handle_attributes(hid_t fid, const char *attr, void H5_ATTR_UNUSED * data, int H
HDmemset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
ctx.display_index = display_ai;
ctx.display_char = display_char;
string_dataformat = *outputformat;
@@ -1635,7 +1565,7 @@ handle_attributes(hid_t fid, const char *attr, void H5_ATTR_UNUSED * data, int H
attr_data_output = display_attr_data;
h5dump_type_table = type_table;
h5tools_dump_attribute(rawoutstream, outputformat, &ctx, attr_name, attr_id, display_ai, display_char);
h5tools_dump_attribute(rawoutstream, outputformat, &ctx, attr_name, attr_id);
h5dump_type_table = NULL;
if(attr_id < 0) {
@@ -1673,19 +1603,6 @@ error:
* Purpose: Handle the datasets from the command.
*
* Return: void
*
* Programmer: Bill Wendling
* Tuesday, 9. January 2001
*
* Modifications:
* Pedro Vicente, Tuesday, January 15, 2008
* check for block overlap\
*
* Pedro Vicente, May 8, 2008
* added a flag PE that prints/not prints error messages
* added for cases of external links not found, to avoid printing of
* objects not found, since external links are dumped on a trial error basis
*
*-------------------------------------------------------------------------
*/
void
@@ -1846,18 +1763,6 @@ handle_datasets(hid_t fid, const char *dset, void *data, int pe, const char *dis
* Purpose: Handle the groups from the command.
*
* Return: void
*
* Programmer: Bill Wendling
* Tuesday, 9. January 2001
*
* Modifications: Pedro Vicente, September 26, 2007
* handle creation order
*
* Pedro Vicente, May 8, 2008
* added a flag PE that prints/not prints error messages
* added for cases of external links not found, to avoid printing of
* objects not found, since external links are dumped on a trial error basis
*
*-------------------------------------------------------------------------
*/
void
@@ -1902,12 +1807,6 @@ handle_groups(hid_t fid, const char *group, void H5_ATTR_UNUSED *data, int pe, c
* Purpose: Handle soft or UD links from the command.
*
* Return: void
*
* Programmer: Bill Wendling
* Tuesday, 9. January 2001
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
void
@@ -1988,17 +1887,6 @@ handle_links(hid_t fid, const char *links, void H5_ATTR_UNUSED * data, int H5_AT
* Purpose: Handle the datatypes from the command.
*
* Return: void
*
* Programmer: Bill Wendling
* Tuesday, 9. January 2001
*
* Modifications:
*
* Pedro Vicente, May 8, 2008
* added a flag PE that prints/not prints error messages
* added for cases of external links not found, to avoid printing of
* objects not found, since external links are dumped on a trial error basis
*
*-------------------------------------------------------------------------
*/
void
@@ -2063,19 +1951,10 @@ handle_datatypes(hid_t fid, const char *type, void H5_ATTR_UNUSED * data, int pe
/*-------------------------------------------------------------------------
* Function: dump_extlink
*
* made by: PVN
*
* Purpose: Dump an external link
* Since external links are soft links, they are dumped on a trial error
* basis, attempting to dump as a dataset, as a group and as a named datatype
* Error messages are supressed
*
* Modifications:
* Neil Fortner
* 13 October 2008
* Function basically rewritten. No longer directly opens the target file,
* now initializes a new set of tables for the external file. No longer
* dumps on a trial and error basis, but errors are still suppressed.
* Function does directly open the target file,
* it initializes a new set of tables for the external file.
* Errors are suppressed.
*
*-------------------------------------------------------------------------
*/
+3 -7
View File
@@ -1778,12 +1778,10 @@ xml_dump_dataspace(hid_t space)
* the h5tools library.
*
* Return: void
*
* Programmer: REMcG
*-------------------------------------------------------------------------
*/
void
xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED * sset, int H5_ATTR_UNUSED pindex)
xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED *sset, int H5_ATTR_UNUSED pindex)
{
hid_t space = -1;
hid_t type = -1;
@@ -1862,7 +1860,7 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED * sset,
datactx.need_prefix = TRUE;
datactx.indent_level = ctx.indent_level;
datactx.cur_column = ctx.cur_column;
status = h5tools_dump_dset(rawoutstream, outputformat, &datactx, obj_id, NULL);
status = h5tools_dump_dset(rawoutstream, outputformat, &datactx, obj_id);
}
}
else {
@@ -3579,12 +3577,10 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
* Purpose: Dump a description of an HDF5 dataset in XML.
*
* Return: void
*
* Programmer: REMcG
*-------------------------------------------------------------------------
*/
void
xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * sset)
xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *sset)
{
hid_t type;
hid_t space;
+539 -103
View File
@@ -91,7 +91,7 @@ static h5tool_format_t ls_dataformat = {
"", /*line_suf */
"", /*line_sep */
1, /*line_multi_new */
"", /*line_indent */
" ", /*line_indent */
0, /*skip_first */
@@ -918,6 +918,7 @@ print_enum_type(h5tools_str_t *buffer, hid_t type, int ind)
H5free_memory(name[i]);
HDfree(name);
HDfree(value);
H5Tclose(super);
return FALSE;
}
@@ -1082,7 +1083,10 @@ print_reference_type(h5tools_str_t *buffer, hid_t type, int H5_ATTR_UNUSED ind)
if (H5T_REFERENCE != H5Tget_class(type))
return FALSE;
if (H5Tequal(type, H5T_STD_REF_OBJ) == TRUE) {
if (H5Tequal(type, H5T_STD_REF) == TRUE) {
h5tools_str_append(buffer, "standard reference");
}
else if (H5Tequal(type, H5T_STD_REF_OBJ) == TRUE) {
h5tools_str_append(buffer, "object reference");
}
else if (H5Tequal(type, H5T_STD_REF_DSETREG) == TRUE) {
@@ -1285,6 +1289,233 @@ print_type(h5tools_str_t *buffer, hid_t type, int ind)
h5tools_str_append(buffer,"%lu-byte class-%u unknown", (unsigned long)H5Tget_size(type), (unsigned)data_class);
}
/*
*
*/
static void
dump_reference(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, hid_t container, H5R_ref_t *ref_buf, int ndims)
{
H5TOOLS_ERR_INIT(int, SUCCEED)
hid_t new_obj_id = H5I_INVALID_HID;
hid_t new_obj_sid = H5I_INVALID_HID;
hsize_t elmt_counter = 0; /*counts the # elements printed. */
size_t ncols = 80; /* available output width */
size_t i;
hsize_t curr_pos = 0; /* total data element position */
h5tools_str_t buffer; /* string into which to render */
h5tools_context_t datactx; /* print context */
H5TOOLS_PUSH_STACK();
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "enter");
datactx = *ctx; /* print context */
/* Assume entire data space to be printed */
if (datactx.ndims > 0)
for (i = 0; i < (size_t)datactx.ndims; i++)
datactx.p_min_idx[i] = 0;
datactx.need_prefix = TRUE;
HDmemset(&buffer, 0, sizeof(h5tools_str_t));
for(i = 0; i < ndims; i++, datactx.cur_elmt++, elmt_counter++) {
H5O_type_t obj_type; /* Object type */
H5R_type_t ref_type; /* Reference type */
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "reference loop:%d with curr_pos=%ld", i, curr_pos);
datactx.need_prefix = TRUE;
h5tools_str_reset(&buffer);
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "reference loop - h5tools_str_sprint with H5T_STD_REF:%d", i);
h5tools_str_sprint(&buffer, info, container, H5T_STD_REF, &ref_buf[i], &datactx);
h5tools_render_element(stream, info, &datactx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)i, (hsize_t)ndims);
ref_type = H5Rget_type((const H5R_ref_t *)&ref_buf[i]);
switch (ref_type) {
case H5R_OBJECT1:
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "ref_type is H5R_OBJECT1");
if (H5Rget_obj_type3((const H5R_ref_t *)&ref_buf[i], H5P_DEFAULT, &obj_type) >= 0) {
switch (obj_type) {
case H5O_TYPE_DATASET:
if((new_obj_id = H5Ropen_object((const H5R_ref_t *)&ref_buf[i], H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
datactx.indent_level++;
h5tools_dump_dset(stream, info, &datactx, new_obj_id);
datactx.indent_level--;
if(H5Dclose(new_obj_id) < 0)
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Dclose H5R_OBJECT1:H5O_TYPE_DATASET failed");
if(H5Rdestroy(&ref_buf[i]) < 0)
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Rdestroy H5R_OBJECT1:H5O_TYPE_DATASET failed");
}
else
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Ropen_object H5R_OBJECT1:H5O_TYPE_DATASET failed");
break;
case H5O_TYPE_GROUP:
case H5O_TYPE_NAMED_DATATYPE:
case H5O_TYPE_MAP:
case H5O_TYPE_UNKNOWN:
case H5O_TYPE_NTYPES:
default:
break;
} /* end switch */
}
else
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Rget_obj_type3 H5R_OBJECT1 failed");
break;
case H5R_DATASET_REGION1:
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "ref_type is H5R_DATASET_REGION1");
if((new_obj_id = H5Ropen_object((const H5R_ref_t *)&ref_buf[i], H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
datactx.indent_level++;
h5tools_dump_dset(stream, info, &datactx, new_obj_id);
datactx.indent_level--;
if(H5Dclose(new_obj_id) < 0)
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Dclose H5R_DATASET_REGION1 failed");
if(H5Rdestroy(&ref_buf[i]) < 0)
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Rdestroy H5R_DATASET_REGION1 failed");
}
else
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Ropen_object H5R_DATASET_REGION1 failed");
break;
case H5R_OBJECT2:
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "ref_type is H5R_OBJECT2");
if (H5Rget_obj_type3((const H5R_ref_t *)&ref_buf[i], H5P_DEFAULT, &obj_type) >= 0) {
switch (obj_type) {
case H5O_TYPE_GROUP:
break;
case H5O_TYPE_DATASET:
if((new_obj_id = H5Ropen_object((const H5R_ref_t *)&ref_buf[i], H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
datactx.indent_level++;
h5tools_dump_dset(stream, info, &datactx, new_obj_id);
datactx.indent_level--;
if(H5Oclose(new_obj_id) < 0)
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Oclose H5R_OBJECT2 failed");
if(H5Rdestroy(&ref_buf[i]) < 0)
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Rdestroy H5R_OBJECT2 failed");
}
else
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Ropen_object H5R_OBJECT2 failed");
break;
case H5O_TYPE_NAMED_DATATYPE:
break;
case H5O_TYPE_MAP:
case H5O_TYPE_UNKNOWN:
case H5O_TYPE_NTYPES:
default:
break;
} /* end switch */
}
else
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Rget_obj_type3 H5R_OBJECT2 failed");
break;
case H5R_DATASET_REGION2:
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "ref_type is H5R_DATASET_REGION2");
if (info->line_ncols > 0)
ncols = info->line_ncols;
/* if (new_obj_id < 0) - could mean that no reference was written do not throw failure */
if((new_obj_id = H5Ropen_object((const H5R_ref_t *)&ref_buf[i], H5P_DEFAULT, H5P_DEFAULT)) < 0)
H5Epush2(H5tools_ERR_STACK_g, __FILE__, FUNC, __LINE__, H5tools_ERR_CLS_g, H5E_tools_g, H5E_tools_min_id_g,
"H5Ropen_object H5R_DATASET_REGION2 failed");
else {
if((new_obj_sid = H5Ropen_region((const H5R_ref_t *)&ref_buf[i], H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
if (h5tools_is_zero(&ref_buf[i], H5Tget_size(H5T_STD_REF))) {
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "NULL H5R_DATASET_REGION2");
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, " {");
h5tools_render_element(stream, info, &datactx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
datactx.need_prefix = TRUE;
datactx.indent_level++;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "NULL");
h5tools_render_element(stream, info, &datactx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
datactx.indent_level--;
datactx.need_prefix = TRUE;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "}");
h5tools_render_element(stream, info, &datactx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
}
else {
H5S_sel_type region_type;
region_type = H5Sget_select_type(new_obj_sid);
if(region_type == H5S_SEL_POINTS) {
/* Print point information */
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "H5S_SEL_POINTS H5R_DATASET_REGION2");
h5tools_dump_region_data_points(new_obj_sid, new_obj_id, stream, info, &datactx,
&buffer, &curr_pos, ncols, i, elmt_counter);
}
else if(region_type == H5S_SEL_HYPERSLABS) {
/* Print block information */
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "H5S_SEL_HYPERSLABS H5R_DATASET_REGION2");
h5tools_dump_region_data_blocks(new_obj_sid, new_obj_id, stream, info, &datactx,
&buffer, &curr_pos, ncols, i, elmt_counter);
}
else
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "invalid region type");
} /* end else to if (h5tools_is_zero(... */
if(H5Sclose(new_obj_sid) < 0)
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Sclose H5R_DATASET_REGION2 failed");
}
else
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Ropen_region H5R_DATASET_REGION2 failed");
if(H5Dclose(new_obj_id) < 0)
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Dclose H5R_DATASET_REGION2 failed");
if(H5Rdestroy(&ref_buf[i]) < 0)
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Rdestroy H5R_DATASET_REGION2 failed");
}
break;
case H5R_ATTR:
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "ref_type is H5R_ATTR");
if((new_obj_id = H5Ropen_attr((const H5R_ref_t *)&ref_buf[i], H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
h5tools_dump_region_attribute(new_obj_id, stream, info, &datactx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
if(H5Aclose(new_obj_id) < 0)
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Aclose H5R_ATTR failed");
if(H5Rdestroy(&ref_buf[i]) < 0)
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Rdestroy H5R_ATTR failed");
}
else {
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "NULL H5R_ATTR");
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, " {");
h5tools_render_element(stream, info, &datactx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
datactx.need_prefix = TRUE;
datactx.indent_level++;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "NULL");
h5tools_render_element(stream, info, &datactx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
datactx.indent_level--;
datactx.need_prefix = TRUE;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "}");
h5tools_render_element(stream, info, &datactx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Ropen_attr H5R_ATTR failed");
}
break;
case H5R_BADTYPE:
case H5R_MAXTYPE:
default:
break;
} /* end switch */
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "finished reference loop:%d",i);
} /* end for(i = 0; i < ndims; i++, ctx->cur_elmt++, elmt_counter++) */
done:
h5tools_str_close(&buffer);
PRINTVALSTREAM(stream, "\n");
H5TOOLS_ENDDEBUG(H5E_tools_min_dbg_id_g, "exit");
H5TOOLS_POP_STACK();
}
/*-------------------------------------------------------------------------
* Function: dump_dataset_values
@@ -1297,23 +1528,39 @@ print_type(h5tools_str_t *buffer, hid_t type, int ind)
static void
dump_dataset_values(hid_t dset)
{
H5TOOLS_ERR_INIT(herr_t, SUCCEED)
hid_t f_type = H5I_INVALID_HID;
hid_t new_obj_id = H5I_INVALID_HID;
hid_t new_obj_sid = H5I_INVALID_HID;
hsize_t total_size[H5S_MAX_RANK];
hsize_t nelmts = 1;
hsize_t elmt_counter = 0; /*counts the # elements printed. */
int ndims;
size_t i;
size_t size;
char string_prefix[64];
static char fmt_double[16];
static char fmt_float[16];
size_t ncols = 80; /* available output width */
hsize_t curr_pos = 0; /* total data element position */
h5tools_str_t buffer; /* string into which to render */
h5tools_context_t ctx; /* print context */
h5tool_format_t outputformat;
h5tool_format_t *info = &ls_dataformat;
H5R_ref_t *ref_buf = NULL;
hid_t f_type = H5Dget_type(dset);
size_t size = H5Tget_size(f_type);
H5TOOLS_PUSH_STACK();
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "enter");
f_type = H5Dget_type(dset);
size = H5Tget_size(f_type);
HDmemset(&ctx, 0, sizeof(ctx));
HDmemset(&buffer, 0, sizeof(h5tools_str_t));
outputformat = *info;
outputformat.line_1st = NULL;
outputformat.idx_fmt = "";
if (simple_output_g) {
outputformat.idx_fmt = "";
outputformat.line_per_line = 1;
@@ -1345,7 +1592,188 @@ dump_dataset_values(hid_t dset)
else {
outputformat.line_ncols = (unsigned)width_g;
}
if (label_g) outputformat.cmpd_name = "%s=";
if (label_g)
outputformat.cmpd_name = "%s=";
outputformat.line_pre = " %s ";
outputformat.line_cont = " %s ";
outputformat.str_repeat = 8;
outputformat.arr_pre = NULL;
outputformat.arr_suf = NULL;
outputformat.arr_sep = NULL;
outputformat.cmpd_pre = NULL;
outputformat.cmpd_suf = NULL;
outputformat.cmpd_sep = NULL;
outputformat.vlen_sep = NULL;
outputformat.vlen_pre = NULL;
outputformat.vlen_suf = NULL;
outputformat.vlen_end = NULL;
}
outputformat.arr_linebreak = 0;
/* Floating point types should display full precision */
HDsnprintf(fmt_float, sizeof(fmt_float), "%%1.%dg", FLT_DIG);
outputformat.fmt_float = fmt_float;
HDsnprintf(fmt_double, sizeof(fmt_double), "%%1.%dg", DBL_DIG);
outputformat.fmt_double = fmt_double;
if (hexdump_g) {
/* Print all data in hexadecimal format if the `-x' or `--hexdump'
* command line switch was given. */
outputformat.raw = TRUE;
}
else if (string_g && 1 == size && H5T_INTEGER == H5Tget_class(f_type)) {
/* Print 1-byte integer data as an ASCI character string instead of
* integers if the `-s' or `--string' command-line option was given. */
outputformat.ascii = TRUE;
outputformat.elmt_suf1 = "";
outputformat.elmt_suf2 = "";
HDsnprintf(string_prefix, sizeof(string_prefix), "%s\"", outputformat.line_pre);
outputformat.line_pre = string_prefix;
outputformat.line_suf = "\"";
}
info = &outputformat;
ctx.indent_level = 1;
ctx.cur_column = (size_t)curr_pos;
/* Print all the values. */
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, " Data:\n");
h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos, (size_t)info->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.need_prefix = TRUE;
ctx.cur_column = (size_t)curr_pos;
if (H5Tget_class(f_type) == H5T_REFERENCE) {
hid_t space = H5Dget_space(dset);
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "reference class type");
if (!H5Tequal(f_type, H5T_STD_REF) && !H5Tequal(f_type, H5T_STD_REF_DSETREG) && !H5Tequal(f_type, H5T_STD_REF_OBJ)) {
HGOTO_DONE(SUCCEED);
}
ndims = (int)H5Sget_simple_extent_npoints(space);
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "ndims=%d - ctx.ndims=%d", ndims, ctx.ndims);
/* Assume entire data space to be printed */
if (ctx.ndims > 0)
for (i = 0; i < (size_t)ctx.ndims; i++)
ctx.p_min_idx[i] = 0;
H5Sget_simple_extent_dims(space, total_size, NULL);
H5Sclose(space);
if (ctx.ndims > 0)
init_acc_pos(&ctx, total_size);
ctx.need_prefix = TRUE;
if (NULL != (ref_buf = (H5R_ref_t *)HDcalloc(MAX(sizeof(unsigned), sizeof(H5R_ref_t)), ndims))) {
if(H5Dread(dset, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, ref_buf) < 0) {
HDfree(ref_buf);
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dread reference failed");
}
dump_reference(rawoutstream, info, &ctx, dset, ref_buf, ndims);
HDfree(ref_buf);
}
}
else {
if (h5tools_dump_dset(rawoutstream, info, &ctx, dset) < 0) {
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, " Unable to print data.");
h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos, (size_t)info->line_ncols, (hsize_t)0, (hsize_t)0);
}
}
done:
H5Tclose(f_type);
h5tools_str_close(&buffer);
PRINTVALSTREAM(rawoutstream, "\n");
H5TOOLS_ENDDEBUG(H5E_tools_min_dbg_id_g, "exit");
H5TOOLS_POP_STACK();
}
/*-------------------------------------------------------------------------
* Function: dump_attribute_values
*
* Purpose: Prints all values of a attribute.
*
* Return: void
*-------------------------------------------------------------------------
*/
static void
dump_attribute_values(hid_t attr, const char *attr_name)
{
H5TOOLS_ERR_INIT(herr_t, SUCCEED)
hid_t f_type = H5I_INVALID_HID;
hid_t p_type = H5I_INVALID_HID;
hid_t space = H5I_INVALID_HID;
hid_t new_obj_id = H5I_INVALID_HID;
hid_t new_obj_sid = H5I_INVALID_HID;
hsize_t total_size[H5S_MAX_RANK];
hsize_t nelmts = 1;
hsize_t elmt_counter = 0; /*counts the # elements printed. */
hsize_t temp_need;
size_t need;
int ndims;
size_t i;
size_t size;
void *buf;
char string_prefix[64];
static char fmt_double[16];
static char fmt_float[16];
size_t ncols = 80; /* available output width */
hsize_t curr_pos = 0; /* total data element position */
h5tools_str_t buffer; /* string into which to render */
h5tools_context_t ctx; /* print context */
h5tool_format_t outputformat;
h5tool_format_t *info = &ls_dataformat;
H5R_ref_t *ref_buf = NULL;
H5TOOLS_PUSH_STACK();
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "enter");
f_type = H5Aget_type(attr);
size = H5Tget_size(f_type);
HDmemset(&ctx, 0, sizeof(ctx));
HDmemset(&buffer, 0, sizeof(h5tools_str_t));
outputformat = *info;
outputformat.line_1st = NULL;
outputformat.idx_fmt = "";
if (simple_output_g) {
outputformat.idx_fmt = "";
outputformat.line_per_line = 1;
outputformat.line_multi_new = 0;
outputformat.line_pre = " ";
outputformat.line_cont = " ";
outputformat.arr_pre = "";
outputformat.arr_suf = "";
outputformat.arr_sep = " ";
if (!label_g) {
outputformat.cmpd_pre = "";
outputformat.cmpd_suf = "";
}
outputformat.cmpd_sep = " ";
if (label_g)
outputformat.cmpd_name = "%s=";
outputformat.elmt_suf1 = " ";
outputformat.str_locale = ESCAPE_HTML;
}
else {
if (no_line_wrap_g) {
outputformat.line_per_line = 1;
}
else {
outputformat.line_ncols = (unsigned)width_g;
}
if (label_g)
outputformat.cmpd_name = "%s=";
outputformat.line_pre = " %s ";
outputformat.line_cont = " %s ";
outputformat.str_repeat = 8;
@@ -1389,25 +1817,96 @@ dump_dataset_values(hid_t dset)
ctx.indent_level = 2;
ctx.cur_column = (size_t)curr_pos;
/* Print all the values. */
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, " Data:\n");
h5tools_str_append(&buffer, " Data:\n");
h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos, (size_t)info->line_ncols, (hsize_t)0, (hsize_t)0);
space = H5Aget_space(attr);
ctx.need_prefix = TRUE;
ctx.cur_column = (size_t)curr_pos;
if (h5tools_dump_dset(rawoutstream, info, &ctx, dset, NULL) < 0) {
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, " Unable to print data.");
h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos, (size_t)info->line_ncols, (hsize_t)0, (hsize_t)0);
}
if (H5Tget_class(f_type) == H5T_REFERENCE) {
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "reference class type");
if (!H5Tequal(f_type, H5T_STD_REF) && !H5Tequal(f_type, H5T_STD_REF_DSETREG) && !H5Tequal(f_type, H5T_STD_REF_OBJ)) {
HGOTO_DONE(SUCCEED);
}
ndims = (int)H5Sget_simple_extent_npoints(space);
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "ndims=%d - ctx.ndims=%d", ndims, ctx.ndims);
/* Assume entire data space to be printed */
if (ctx.ndims > 0)
for (i = 0; i < (size_t)ctx.ndims; i++)
ctx.p_min_idx[i] = 0;
H5Sget_simple_extent_dims(space, total_size, NULL);
H5Sclose(space);
if (ctx.ndims > 0)
init_acc_pos(&ctx, total_size);
if (NULL != (ref_buf = (H5R_ref_t *)HDcalloc(MAX(sizeof(unsigned), sizeof(H5R_ref_t)), ndims))) {
if(H5Aread(attr, H5T_STD_REF, ref_buf) >= 0) {
HDfree(ref_buf);
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dread reference failed");
}
ctx.indent_level++;
dump_reference(rawoutstream, info, &ctx, attr, ref_buf, ndims);
ctx.indent_level--;
HDfree(ref_buf);
}
}
else {
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "Attribute data read");
if (hexdump_g)
p_type = H5Tcopy(f_type);
else
p_type = H5Tget_native_type(f_type, H5T_DIR_DEFAULT);
if (p_type >= 0) {
/* VL data special information */
unsigned int vl_data = 0; /* contains VL datatypes */
/* Check if we have VL data in the dataset's datatype */
if (h5tools_detect_vlen(p_type) == TRUE)
vl_data = TRUE;
temp_need = nelmts * MAX(H5Tget_size(f_type), H5Tget_size(p_type));
need = (size_t)temp_need;
if((buf = HDmalloc(need)) != NULL) {
if(H5Aread(attr, p_type, buf) >= 0) {
ctx.indent_level++;
if (h5tools_dump_mem(rawoutstream, info, &ctx, attr, p_type, space, buf) < 0) {
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, " Unable to print data.");
h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos, (size_t)info->line_ncols, (hsize_t)0, (hsize_t)0);
}
ctx.indent_level--;
}
/* Reclaim any VL memory, if necessary */
if (vl_data)
H5Treclaim(p_type, space, H5P_DEFAULT, buf);
HDfree(buf);
}
H5Tclose(p_type);
} /* end if */
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "Attribute data read complete");
}
done:
H5Sclose(space);
H5Tclose(f_type);
h5tools_str_close(&buffer);
PRINTVALSTREAM(rawoutstream, "\n");
}
H5TOOLS_ENDDEBUG(H5E_tools_min_dbg_id_g, "exit");
H5TOOLS_POP_STACK();
}
/*-------------------------------------------------------------------------
* Function: list_attr
@@ -1422,27 +1921,33 @@ static herr_t
list_attr(hid_t obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ainfo,
void H5_ATTR_UNUSED *op_data)
{
H5TOOLS_ERR_INIT(herr_t, SUCCEED);
hid_t attr = H5I_INVALID_HID;
hid_t space = H5I_INVALID_HID;
hid_t type = H5I_INVALID_HID;
hid_t p_type = H5I_INVALID_HID;
hid_t new_obj_id = H5I_INVALID_HID;
hid_t new_obj_sid = H5I_INVALID_HID;
hsize_t size[H5S_MAX_RANK];
hsize_t nelmts = 1;
hsize_t temp_need;
size_t need;
int ndims;
int i;
void *buf;
H5S_class_t space_type;
hsize_t curr_pos = 0; /* total data element position */
hsize_t elmt_counter = 0; /*counts the # elements printed. */
h5tools_str_t buffer; /* string into which to render */
h5tools_context_t ctx; /* print context */
size_t ncols = 80; /* available output width */
h5tool_format_t *info = &ls_dataformat;
h5tool_format_t outputformat;
H5TOOLS_PUSH_STACK();
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "enter");
HDmemset(&ctx, 0, sizeof(ctx));
HDmemset(&buffer, 0, sizeof(h5tools_str_t));
ctx.indent_level = 2;
ctx.cur_column = (size_t)curr_pos;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, " Attribute: ");
@@ -1455,6 +1960,7 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ain
/* Data space */
ndims = H5Sget_simple_extent_dims(space, size, NULL);
space_type = H5Sget_simple_extent_type(space);
H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "Attribute ndims:%d", ndims);
switch(space_type) {
case H5S_SCALAR:
/* scalar dataspace */
@@ -1489,100 +1995,25 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ain
/* Data type */
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, " Type: ");
h5tools_str_append(&buffer, " %-10s ", "Type:");
print_type(&buffer, type, 15);
h5tools_str_append(&buffer, "\n");
h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos, (size_t)info->line_ncols, (hsize_t)0, (hsize_t)0);
/* Data */
outputformat = *info;
if (nelmts < 5) {
outputformat.idx_fmt = "";
outputformat.line_1st = " Data: ";
outputformat.line_pre = " ";
outputformat.line_cont = " ";
outputformat.str_repeat = 8;
}
else {
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, " Data:\n");
h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos, (size_t)info->line_ncols, (hsize_t)0, (hsize_t)0);
outputformat.line_1st = NULL;
outputformat.line_pre = " %s ";
outputformat.line_cont = " %s ";
outputformat.str_repeat = 8;
}
outputformat.line_ncols = (unsigned)width_g;
if (label_g)
outputformat.cmpd_name = "%s=";
if (string_g && 1 == H5Tget_size(type) && H5T_INTEGER == H5Tget_class(type)) {
outputformat.ascii = TRUE;
outputformat.elmt_suf1 = "";
outputformat.elmt_suf2 = "";
outputformat.line_pre = " %s \"";
outputformat.line_suf = "\"";
} /* end if */
outputformat.arr_pre = NULL;
outputformat.arr_suf = NULL;
outputformat.arr_sep = NULL;
outputformat.cmpd_pre = NULL;
outputformat.cmpd_suf = NULL;
outputformat.cmpd_sep = NULL;
outputformat.vlen_sep = NULL;
outputformat.vlen_pre = NULL;
outputformat.vlen_suf = NULL;
outputformat.vlen_end = NULL;
info = &outputformat;
if (space_type != H5S_NULL && space_type != H5S_NO_CLASS) {
if (hexdump_g)
p_type = H5Tcopy(type);
else
p_type = H5Tget_native_type(type, H5T_DIR_DEFAULT);
if (p_type >= 0) {
/* VL data special information */
unsigned int vl_data = 0; /* contains VL datatypes */
/* Check if we have VL data in the dataset's datatype */
if (h5tools_detect_vlen(p_type) == TRUE)
vl_data = TRUE;
temp_need = nelmts * MAX(H5Tget_size(type), H5Tget_size(p_type));
need = (size_t)temp_need;
if((buf = HDmalloc(need)) != NULL) {
if(H5Aread(attr, p_type, buf) >= 0) {
ctx.need_prefix = TRUE;
ctx.indent_level = 2;
ctx.cur_column = (size_t)curr_pos;
h5tools_dump_mem(rawoutstream, info, &ctx, attr, p_type, space, buf);
}
/* Reclaim any VL memory, if necessary */
if (vl_data)
H5Treclaim(p_type, space, H5P_DEFAULT, buf);
HDfree(buf);
}
H5Tclose(p_type);
} /* end if */
}
H5Sclose(space);
H5Tclose(type);
h5tools_str_close(&buffer);
if (data_g)
dump_attribute_values(attr, attr_name);
H5Aclose(attr);
}
h5tools_str_close(&buffer);
else
h5tools_str_close(&buffer);
PRINTVALSTREAM(rawoutstream, "\n");
H5TOOLS_ENDDEBUG(H5E_tools_min_dbg_id_g, "exit");
H5TOOLS_POP_STACK();
return 0;
}
@@ -1796,7 +2227,10 @@ dataset_list2(hid_t dset, const char H5_ATTR_UNUSED *name)
break;
case H5T_REFERENCE:
if (H5Tequal(type, H5T_STD_REF_DSETREG)) {
if (H5Tequal(dset, H5T_STD_REF)) {
h5tools_str_append(&buffer, "reference information not available");
}
else if (H5Tequal(dset, H5T_STD_REF_DSETREG)) {
h5tools_str_append(&buffer, "information not available");
}
break;
@@ -1835,8 +2269,10 @@ dataset_list2(hid_t dset, const char H5_ATTR_UNUSED *name)
h5tools_str_append(&buffer, "}\n");
} /* end for */
} /* end if */
h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos, (size_t)info->line_ncols, (hsize_t)0, (hsize_t)0);
/* Print data type */
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, " %-10s ", "Type:");
print_type(&buffer, type, 15);
h5tools_str_append(&buffer, "\n");
+48 -48
View File
@@ -228,7 +228,7 @@ copy_named_datatype(hid_t type_in, hid_t fidout, named_dt_t **named_dt_head_p, t
hid_t ret_value = -1; /* The identifier of the named dtype in the out file */
if (H5Oget_info2(type_in, &oinfo, H5O_INFO_BASIC) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Oget_info failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Oget_info failed");
if (*named_dt_head_p) {
/* Stack already exists, search for the datatype */
@@ -244,7 +244,7 @@ copy_named_datatype(hid_t type_in, hid_t fidout, named_dt_t **named_dt_head_p, t
if (travt->objs[i].type == H5TRAV_TYPE_NAMED_DATATYPE) {
/* Push onto the stack */
if (NULL == (dt = (named_dt_t *)HDmalloc(sizeof(named_dt_t))))
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "buffer allocation failed failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "buffer allocation failed failed");
dt->next = *named_dt_head_p;
*named_dt_head_p = dt;
@@ -266,7 +266,7 @@ copy_named_datatype(hid_t type_in, hid_t fidout, named_dt_t **named_dt_head_p, t
if (!dt_ret) {
/* Push the new datatype onto the stack */
if (NULL == (dt_ret = (named_dt_t *)HDmalloc(sizeof(named_dt_t))))
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "buffer allocation failed failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "buffer allocation failed failed");
dt_ret->next = *named_dt_head_p;
*named_dt_head_p = dt_ret;
@@ -284,9 +284,9 @@ copy_named_datatype(hid_t type_in, hid_t fidout, named_dt_t **named_dt_head_p, t
else
dt_ret->id_out = H5Tcopy(type_in);
if (dt_ret->id_out < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_native_type-H5Tcopy failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_native_type-H5Tcopy failed");
if (H5Tcommit_anon(fidout, dt_ret->id_out, H5P_DEFAULT, H5P_DEFAULT) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tcommit_anon failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tcommit_anon failed");
} /* end if named datatype not yet in output file */
/* Set return value */
@@ -296,7 +296,7 @@ copy_named_datatype(hid_t type_in, hid_t fidout, named_dt_t **named_dt_head_p, t
* to close it. (TODO: fix scope envy)
*/
if (H5Iinc_ref(ret_value) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Iinc_ref failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Iinc_ref failed");
done:
return ret_value;
@@ -317,7 +317,7 @@ named_datatype_free(named_dt_t **named_dt_head_p, int ignore_err)
while (dt) {
/* Pop the datatype off the stack and free it */
if (H5Tclose(dt->id_out) < 0 && !ignore_err)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed");
dt = dt->next;
HDfree(*named_dt_head_p);
*named_dt_head_p = dt;
@@ -363,7 +363,7 @@ copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p, trav_table_
H5T_class_t type_class = -1;
if (H5Oget_info2(loc_in, &oinfo, H5O_INFO_NUM_ATTRS) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Oget_info failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Oget_info failed");
/*-------------------------------------------------------------------------
* copy all attributes
@@ -372,33 +372,33 @@ copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p, trav_table_
for (u = 0; u < (unsigned) oinfo.num_attrs; u++) {
/* open attribute */
if ((attr_id = H5Aopen_by_idx(loc_in, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t) u, H5P_DEFAULT, H5P_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aopen_by_idx failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aopen_by_idx failed");
if (H5Aget_name(attr_id, (size_t) 255, name) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed");
/* get the file datatype */
if ((ftype_id = H5Aget_type(attr_id)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aget_type failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aget_type failed");
/* Check if the datatype is committed */
if ((is_named = H5Tcommitted(ftype_id)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tcommitted failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tcommitted failed");
if (is_named && travt) {
hid_t fidout = -1;
/* Create out file id */
if ((fidout = H5Iget_file_id(loc_out)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Iget_file_id failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Iget_file_id failed");
/* Copy named dt */
if ((wtype_id = copy_named_datatype(ftype_id, fidout, named_dt_head_p, travt, options)) < 0) {
H5Fclose(fidout);
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "copy_named_datatype failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "copy_named_datatype failed");
}
if (H5Fclose(fidout) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Fclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Fclose failed");
} /* end if datatype is committed and we have a traversal table */
else {
if (options->use_native == 1)
@@ -409,18 +409,18 @@ copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p, trav_table_
/* get the dataspace handle */
if ((space_id = H5Aget_space(attr_id)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aget_space failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aget_space failed");
/* get dimensions */
if ((rank = H5Sget_simple_extent_dims(space_id, dims, NULL)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_dims failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_dims failed");
nelmts = 1;
for (j = 0; j < rank; j++)
nelmts *= dims[j];
if ((msize = H5Tget_size(wtype_id)) == 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_size failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_size failed");
/*---------------------------------------------------------------------
* object references are a special case. We cannot just copy the
@@ -464,10 +464,10 @@ copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p, trav_table_
buf = (void *)HDmalloc((size_t)(nelmts * msize));
if (buf == NULL) {
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDmalloc failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDmalloc failed");
} /* end if */
if (H5Aread(attr_id, wtype_id, buf) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aread failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aread failed");
/*-----------------------------------------------------------------
* copy
@@ -475,13 +475,13 @@ copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p, trav_table_
*/
if ((attr_out = H5Acreate2(loc_out, name, wtype_id, space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Acreate2 failed on ,%s>", name);
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Acreate2 failed on ,%s>", name);
if (H5Awrite(attr_out, wtype_id, buf) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Awrite failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Awrite failed");
/*close*/
if (H5Aclose(attr_out) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aclose failed");
/* Check if we have VL data and string in the attribute's datatype that must
* be reclaimed */
@@ -499,16 +499,16 @@ copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p, trav_table_
*---------------------------------------------------------------------
*/
if (H5Sclose(space_id) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sclose failed");
space_id = -1;
if (H5Tclose(wtype_id) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed");
wtype_id = -1;
if (H5Tclose(ftype_id) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed");
ftype_id = -1;
if (H5Aclose(attr_id) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aclose failed");
attr_id = -1;
} /* for u (each attribute) */
@@ -546,7 +546,7 @@ done:
static int
check_options(pack_opt_t *options)
{
int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */
int ret_value = 0; /*no need to LEAVE() on ERROR: H5TOOLS_ERR_INIT(int, SUCCEED) */
unsigned int i;
int k, j, has_cp = 0, has_ck = 0;
char slayout[30];
@@ -573,7 +573,7 @@ check_options(pack_opt_t *options)
break;
case H5D_LAYOUT_ERROR:
case H5D_NLAYOUTS:
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "invalid layout");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "invalid layout");
default:
strcpy(slayout, "invalid layout\n");
HGOTO_DONE(FAIL);
@@ -611,7 +611,7 @@ check_options(pack_opt_t *options)
} /* end for each object in options */
if (options->all_layout == 1 && has_ck)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "invalid chunking input: 'all' option is present with other objects");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "invalid chunking input: 'all' option is present with other objects");
/*-------------------------------------------------------------------------
* Objects to filter
@@ -669,7 +669,7 @@ check_options(pack_opt_t *options)
} /* end for each object in options table */
if (options->all_filter == 1 && has_cp)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "invalid compression input: 'all' option is present with other objects");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "invalid compression input: 'all' option is present with other objects");
/*-------------------------------------------------------------------------
* Check options for the latest format
@@ -677,14 +677,14 @@ check_options(pack_opt_t *options)
*/
if (options->grp_compact < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "invalid maximum number of links to store as header messages");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "invalid maximum number of links to store as header messages");
if (options->grp_indexed < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "invalid minimum number of links to store in the indexed format");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "invalid minimum number of links to store in the indexed format");
if (options->grp_indexed > options->grp_compact)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "minimum indexed size is greater than the maximum compact size");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "minimum indexed size is greater than the maximum compact size");
for (i = 0; i < 8; i++)
if (options->msg_size[i] < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "invalid shared message size");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "invalid shared message size");
/*------------------------------------------------------------------------
* Verify new user userblock options; file name must be present
@@ -698,7 +698,7 @@ check_options(pack_opt_t *options)
}
if (options->ublock_filename == NULL && options->ublock_size != 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "file name missing for user block", options->ublock_filename);
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "file name missing for user block", options->ublock_filename);
/*------------------------------------------------------------------------
* Verify alignment options; threshold is zero default but alignment not
@@ -706,7 +706,7 @@ check_options(pack_opt_t *options)
*/
if (options->alignment == 0 && options->threshold != 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "alignment for H5Pset_alignment missing");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "alignment for H5Pset_alignment missing");
done:
return ret_value;
@@ -730,7 +730,7 @@ check_objects(const char* fname, pack_opt_t *options)
unsigned int i;
int ifil;
trav_table_t *travt = NULL;
int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */
int ret_value = 0; /*no need to LEAVE() on ERROR: H5TOOLS_ERR_INIT(int, SUCCEED) */
/* nothing to do */
if (options->op_tbl->nelems == 0)
@@ -741,7 +741,7 @@ check_objects(const char* fname, pack_opt_t *options)
*-------------------------------------------------------------------------
*/
if ((fid = h5tools_fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT, NULL, NULL, 0)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "h5tools_fopen failed <%s>: %s", fname, H5FOPENERROR);
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "h5tools_fopen failed <%s>: %s", fname, H5FOPENERROR);
/*-------------------------------------------------------------------------
* get the list of objects in the file
@@ -755,7 +755,7 @@ check_objects(const char* fname, pack_opt_t *options)
/* get the list of objects in the file */
if (h5trav_gettable(fid, travt) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "h5trav_gettable failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "h5trav_gettable failed");
/*-------------------------------------------------------------------------
* compare with user supplied list
@@ -774,14 +774,14 @@ check_objects(const char* fname, pack_opt_t *options)
/* the input object names are present in the file and are valid */
if (h5trav_getindext(name, travt) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "%s Could not find <%s> in file <%s>. Exiting...\n",
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "%s Could not find <%s> in file <%s>. Exiting...\n",
(options->verbose ? "\n" : ""), name, fname);
if (options->verbose)
HDprintf("...Found\n");
for (ifil = 0; ifil < obj.nfilters; ifil++) {
if (obj.filter[ifil].filtn < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "invalid filter");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "invalid filter");
/* check for extra filter conditions */
switch (obj.filter[ifil].filtn) {
/* chunk size must be smaller than pixels per block */
@@ -800,20 +800,20 @@ check_objects(const char* fname, pack_opt_t *options)
}
else {
if ((did = H5Dopen2(fid, name, H5P_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dopen2 failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dopen2 failed");
if ((sid = H5Dget_space(did)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_space failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_space failed");
if ((rank = H5Sget_simple_extent_ndims(sid)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed");
HDmemset(dims, 0, sizeof dims);
if (H5Sget_simple_extent_dims(sid, dims, NULL) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_dims failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_dims failed");
for (j = 0; j < rank; j++)
csize *= dims[j];
if (H5Sclose(sid) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sclose failed");
if (H5Dclose(did) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dclose failed");
}
if (csize < ppb) {
+109 -109
View File
@@ -86,59 +86,59 @@ copy_objects(const char* fnamein, const char* fnameout, pack_opt_t *options)
*-------------------------------------------------------------------------
*/
if ((fidin = h5tools_fopen(fnamein, H5F_ACC_RDONLY, H5P_DEFAULT, NULL, NULL, (size_t) 0)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "h5tools_fopen failed <%s>: %s", fnamein, H5FOPENERROR);
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "h5tools_fopen failed <%s>: %s", fnamein, H5FOPENERROR);
/* get user block size and file space strategy/persist/threshold */
{
if ((fcpl_in = H5Fget_create_plist(fidin)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Fget_create_plist failed to retrieve file creation property list");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Fget_create_plist failed to retrieve file creation property list");
if (H5Pget_userblock(fcpl_in, &ub_size) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_userblock failed to retrieve userblock size");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_userblock failed to retrieve userblock size");
/* If the -S option is not set, get "strategy" from the input file */
if(H5Pget_file_space_strategy(fcpl_in, &in_strategy, &in_persist, &in_threshold) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_file_space_strategy failed to retrieve file space strategy");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_file_space_strategy failed to retrieve file space strategy");
/* If the -G option is not set, get "pagesize" from the input file */
if(H5Pget_file_space_page_size(fcpl_in, &in_pagesize) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_file_space_page_size failed to retrieve file space threshold");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_file_space_page_size failed to retrieve file space threshold");
/* open root group */
if ((grp_in = H5Gopen2(fidin, "/", H5P_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gopen2 failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gopen2 failed");
/* get root group creation property list */
if ((gcpl_in = H5Gget_create_plist(grp_in)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gget_create_plist failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gget_create_plist failed");
/* query and set the group creation properties */
if (H5Pget_link_creation_order(gcpl_in, &crt_order_flags) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_link_creation_order failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_link_creation_order failed");
if (H5Pclose(fcpl_in) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed to close property list");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed to close property list");
}
if(options->latest)
options->low_bound = options->high_bound = H5F_LIBVER_LATEST;
/* Create file access property list */
if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcreate failed to create file access property list");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcreate failed to create file access property list");
/* It can be default, latest or other settings by users */
if(H5Pset_libver_bounds(fapl, options->low_bound, options->high_bound) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_libver_bounds failed to set format version bounds");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_libver_bounds failed to set format version bounds");
/* Check if we need to create a non-default file creation property list */
if (options->low_bound >= H5F_LIBVER_V18 || ub_size > 0) {
/* Create file creation property list */
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcreate failed to create a file creation property list");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcreate failed to create a file creation property list");
if (ub_size > 0)
if (H5Pset_userblock(fcpl, ub_size) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_userblock failed to set non-default userblock size");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_userblock failed to set non-default userblock size");
if (options->low_bound >= H5F_LIBVER_V18) {
unsigned i = 0, nindex = 0, mesg_type_flags[5], min_mesg_sizes[5];
@@ -146,7 +146,7 @@ copy_objects(const char* fnamein, const char* fnameout, pack_opt_t *options)
/* Adjust group creation parameters for root group */
/* (So that it is created in "dense storage" form) */
if (H5Pset_link_phase_change(fcpl, (unsigned) options->grp_compact, (unsigned) options->grp_indexed) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_link_phase_change failed to adjust group creation parameters for root group");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_link_phase_change failed to adjust group creation parameters for root group");
for (i = 0; i < 5; i++) {
if (options->msg_size[i] > 0) {
@@ -182,12 +182,12 @@ copy_objects(const char* fnamein, const char* fnameout, pack_opt_t *options)
if (nindex > 0) {
if (H5Pset_shared_mesg_nindexes(fcpl, nindex) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_shared_mesg_nindexes failed to set the number of shared object header message indexes");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_shared_mesg_nindexes failed to set the number of shared object header message indexes");
/* msg_size[0]=dataspace, 1=datatype, 2=file value, 3=filter pipleline, 4=attribute */
for (i = 0; i < (nindex - 1); i++)
if (H5Pset_shared_mesg_index(fcpl, i, mesg_type_flags[i], min_mesg_sizes[i]) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_shared_mesg_index failed to configure the specified shared object header message index");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_shared_mesg_index failed to configure the specified shared object header message index");
} /* if (nindex>0) */
} /* end if */
@@ -205,11 +205,11 @@ print_user_block(fnamein, fidin);
if (fcpl == H5P_DEFAULT)
/* create a file creation property list */
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcreate failed to create a file creation property list");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcreate failed to create a file creation property list");
/* set user block size */
if (H5Pset_userblock(fcpl, options->ublock_size) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_userblock failed to set userblock size");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_userblock failed to set userblock size");
}
/*-------------------------------------------------------------------------
@@ -221,10 +221,10 @@ print_user_block(fnamein, fidin);
if (fapl == H5P_DEFAULT)
/* create a file access property list */
if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcreate failed to create file access property list");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcreate failed to create file access property list");
if (H5Pset_alignment(fapl, options->threshold, options->alignment) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_alignment failed to set alignment");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_alignment failed to set alignment");
}
/*-------------------------------------------------------------------------
@@ -236,10 +236,10 @@ print_user_block(fnamein, fidin);
if (fapl == H5P_DEFAULT)
/* create a file access property list */
if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcreate failed to create file access property list");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcreate failed to create file access property list");
if (H5Pset_meta_block_size(fapl, options->meta_block_size) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_meta_block_size failed to set metadata block size");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_meta_block_size failed to set metadata block size");
}
/*-------------------------------------------------------------------------
@@ -251,10 +251,10 @@ print_user_block(fnamein, fidin);
if (fcpl == H5P_DEFAULT)
/* create a file creation property list */
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcreate failed to create a file creation property list");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcreate failed to create a file creation property list");
if(H5Pset_link_creation_order(fcpl, crt_order_flags ) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_link_creation_order failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_link_creation_order failed");
/* Set file space info to those from input file */
set_strategy = in_strategy;
@@ -279,7 +279,7 @@ print_user_block(fnamein, fidin);
/* Set file space information as specified */
if(H5Pset_file_space_strategy(fcpl, set_strategy, set_persist, set_threshold) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_file_space_strategy failed to set file space strategy");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_file_space_strategy failed to set file space strategy");
if(options->fs_pagesize == -1) /* A "0" file space page size is specified by user */
set_pagesize = (hsize_t)0;
@@ -288,7 +288,7 @@ print_user_block(fnamein, fidin);
if(set_pagesize != FS_PAGESIZE_DEF) /* Set non-default file space page size as specified */
if(H5Pset_file_space_page_size(fcpl, set_pagesize) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_file_space_page_size failed to set file space page size");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_file_space_page_size failed to set file space page size");
/*-------------------------------------------------------------------------
* create the output file
@@ -298,7 +298,7 @@ print_user_block(fnamein, fidin);
HDprintf("Making new file ...\n");
if ((fidout = H5Fcreate(fnameout, H5F_ACC_TRUNC, fcpl, fapl)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Fcreate could not create file <%s>:", fnameout);
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Fcreate could not create file <%s>:", fnameout);
/*-------------------------------------------------------------------------
* write a new user block if requested
@@ -306,7 +306,7 @@ print_user_block(fnamein, fidin);
*/
if (options->ublock_size > 0)
if (copy_user_block(options->ublock_filename, fnameout, options->ublock_size) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Could not copy user block. Exiting...");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "Could not copy user block. Exiting...");
/*-------------------------------------------------------------------------
* get list of objects
@@ -321,14 +321,14 @@ print_user_block(fnamein, fidin);
if (travt) {
/* get the list of objects in the file */
if (h5trav_gettable(fidin, travt) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "h5trav_gettable failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "h5trav_gettable failed");
/*-------------------------------------------------------------------------
* do the copy
*-------------------------------------------------------------------------
*/
if (do_copy_objects(fidin, fidout, travt, options) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "do_copy_objects from <%s> could not copy data to <%s>", fnamein, fnameout);
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "do_copy_objects from <%s> could not copy data to <%s>", fnamein, fnameout);
/*-------------------------------------------------------------------------
* do the copy of referenced objects
@@ -336,7 +336,7 @@ print_user_block(fnamein, fidin);
*-------------------------------------------------------------------------
*/
if (do_copy_refobjs(fidin, fidout, travt, options) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "do_copy_refobjs from <%s> could not copy data to <%s>", fnamein, fnameout);
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "do_copy_refobjs from <%s> could not copy data to <%s>", fnamein, fnameout);
}
/*-------------------------------------------------------------------------
@@ -346,7 +346,7 @@ print_user_block(fnamein, fidin);
if (ub_size > 0 && options->ublock_size == 0)
if (copy_user_block(fnamein, fnameout, ub_size) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Could not copy user block. Exiting...");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "Could not copy user block. Exiting...");
done:
H5E_BEGIN_TRY {
@@ -425,7 +425,7 @@ get_hyperslab(hid_t dcpl_id, int rank_dset, hsize_t dims_dset[],
/* get chunk dims */
rank_chunk = H5Pget_chunk(dcpl_id, rank_dset, dims_chunk);
if (rank_chunk < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_chunk failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_chunk failed");
for (k = rank_dset; k > 0; --k)
size_chunk *= dims_chunk[k - 1];
@@ -487,7 +487,7 @@ get_hyperslab(hid_t dcpl_id, int rank_dset, hsize_t dims_dset[],
hslab_nbytes *= dims_hslab[k - 1];
if (hslab_nbytes <= 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "calculate total size for the hyperslab failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "calculate total size for the hyperslab failed");
}
}
}
@@ -511,7 +511,7 @@ get_hyperslab(hid_t dcpl_id, int rank_dset, hsize_t dims_dset[],
hslab_nbytes *= dims_hslab[k - 1];
if (hslab_nbytes <= 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "calculate total size for the hyperslab failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "calculate total size for the hyperslab failed");
}
}
@@ -649,22 +649,22 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt,
/* open input group */
if ((grp_in = H5Gopen2(fidin, travt->objs[i].name, H5P_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gopen2 failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gopen2 failed");
/* get input group creation property list */
if ((gcpl_in = H5Gget_create_plist(grp_in)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gget_create_plist failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gget_create_plist failed");
/* query and set the group creation properties */
if (H5Pget_link_creation_order(gcpl_in, &crt_order_flags) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_link_creation_order failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_link_creation_order failed");
/* set up group creation property list */
if ((gcpl_out = H5Pcreate(H5P_GROUP_CREATE)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcreate failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcreate failed");
if (H5Pset_link_creation_order(gcpl_out, crt_order_flags) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_link_creation_order failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_link_creation_order failed");
/*-------------------------------------------------------------------------
* the root is a special case, we get an ID for the root group
@@ -673,15 +673,15 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt,
*/
if (HDstrcmp(travt->objs[i].name, "/") == 0) {
if ((grp_out = H5Gopen2(fidout, "/", H5P_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gopen2 failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gopen2 failed");
}
else {
if (options->grp_compact > 0 || options->grp_indexed > 0)
if (H5Pset_link_phase_change(gcpl_out, (unsigned) options->grp_compact, (unsigned) options->grp_indexed) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_link_phase_change failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_link_phase_change failed");
if ((grp_out = H5Gcreate2(fidout, travt->objs[i].name, H5P_DEFAULT, gcpl_out, H5P_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gcreate2 failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gcreate2 failed");
}
/*-------------------------------------------------------------------------
@@ -689,16 +689,16 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt,
*-------------------------------------------------------------------------
*/
if (copy_attr(grp_in, grp_out, &named_dt_head, travt, options) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "copy_attr failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "copy_attr failed");
if (H5Pclose(gcpl_out) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed");
if (H5Pclose(gcpl_in) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed");
if (H5Gclose(grp_out) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gclose failed");
if (H5Gclose(grp_in) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gclose failed");
break;
@@ -740,23 +740,23 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt,
/* early detection of references */
if ((dset_in = H5Dopen2(fidin, travt->objs[i].name, H5P_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dopen2 failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dopen2 failed");
if ((ftype_id = H5Dget_type(dset_in)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_type failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_type failed");
if (H5T_REFERENCE == H5Tget_class(ftype_id))
is_ref = 1;
/* Check if the datatype is committed */
if ((is_named = H5Tcommitted(ftype_id)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tcommitted failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tcommitted failed");
if (is_named)
if ((wtype_id = copy_named_datatype(ftype_id, fidout, &named_dt_head, travt, options)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "copy_named_datatype failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "copy_named_datatype failed");
if (H5Tclose(ftype_id) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed");
if (H5Dclose(dset_in) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dclose failed");
/*-------------------------------------------------------------------------
* check if we should use H5Ocopy or not
@@ -770,20 +770,20 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt,
int j;
if ((dset_in = H5Dopen2(fidin, travt->objs[i].name, H5P_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dopen2 failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dopen2 failed");
if ((f_space_id = H5Dget_space(dset_in)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_space failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_space failed");
if ((ftype_id = H5Dget_type(dset_in)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_type failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_type failed");
if ((dcpl_in = H5Dget_create_plist(dset_in)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_create_plist failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_create_plist failed");
if ((rank = H5Sget_simple_extent_ndims(f_space_id)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed");
HDmemset(dims, 0, sizeof dims);
if (H5Sget_simple_extent_dims(f_space_id, dims, NULL) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_dims failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_dims failed");
if (H5Dget_space_status(dset_in, &space_status) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_space_status failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_space_status failed");
/* If the input dataset has external storage, it must be contiguous.
* Accordingly, there would be no filter or chunk properties to preserve,
@@ -792,10 +792,10 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt,
*/
if (H5Pget_external_count(dcpl_in)) {
if ((dcpl_out = H5Pcreate(H5P_DATASET_CREATE)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcreate failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcreate failed");
}
else if ((dcpl_out = H5Pcopy(dcpl_in)) < 0) {
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcopy failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcopy failed");
}
nelmts = 1;
@@ -811,7 +811,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt,
}
if ((msize = H5Tget_size(wtype_id)) == 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_size failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_size failed");
/* size of current dset */
size_dset = nelmts * msize;
@@ -848,7 +848,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt,
/* apply the filter */
if (apply_s)
if (apply_filters(travt->objs[i].name, rank, dims, msize, dcpl_out, options, &has_filter) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "apply_filters failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "apply_filters failed");
/* only if layout change requested for entire file or
* individual obj */
@@ -894,7 +894,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt,
HDprintf(" warning: could not create dataset <%s>. Applying original settings\n", travt->objs[i].name);
if ((dset_out = H5Dcreate2(fidout, travt->objs[i].name, wtype_id, f_space_id, H5P_DEFAULT, dcpl_in, H5P_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dcreate2 failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dcreate2 failed");
apply_f = 0;
} /* end if retry dataset create */
@@ -911,15 +911,15 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt,
if (buf != NULL) {
if(H5Dread(dset_in, wtype_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dread failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dread failed");
if(H5Dwrite(dset_out, wtype_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dwrite failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dwrite failed");
/* Check if we have VL data in the dataset's
* datatype that must be reclaimed */
if (TRUE == H5Tdetect_class(wtype_id, H5T_VLEN))
if (H5Treclaim(wtype_id, f_space_id, H5P_DEFAULT, buf) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Treclaim failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Treclaim failed");
if (buf != NULL) { /* TODO: is buf potentially released by H5Dvlen_reclaim()? */
HDfree(buf);
@@ -965,11 +965,11 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt,
/* get hyperslab dims and size in byte */
if (get_hyperslab(dcpl_tmp, rank, dims, p_type_nbytes, hslab_dims, &hslab_nbytes) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "get_hyperslab failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "get_hyperslab failed");
hslab_buf = HDmalloc((size_t)hslab_nbytes);
if (hslab_buf == NULL)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "can't allocate space for hyperslab");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "can't allocate space for hyperslab");
hslab_nelmts = hslab_nbytes / p_type_nbytes;
hslab_space = H5Screate_simple(1, &hslab_nelmts, NULL);
@@ -993,9 +993,9 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt,
}
if (H5Sselect_hyperslab(f_space_id, H5S_SELECT_SET, hs_sel_offset, NULL, hs_sel_count, NULL) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sselect_hyperslab failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sselect_hyperslab failed");
if (H5Sselect_hyperslab(hslab_space, H5S_SELECT_SET, zero, NULL, &hs_select_nelmts, NULL) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sselect_hyperslab failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sselect_hyperslab failed");
} /* end if rank > 0 */
else {
H5Sselect_all(f_space_id);
@@ -1004,9 +1004,9 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt,
} /* end (else) rank == 0 */
if(H5Dread(dset_in, wtype_id, hslab_space, f_space_id, H5P_DEFAULT, hslab_buf) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dread failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dread failed");
if(H5Dwrite(dset_out, wtype_id, hslab_space, f_space_id, H5P_DEFAULT, hslab_buf) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dwrite failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dwrite failed");
/* reclaim any VL memory, if necessary */
if (vl_data)
@@ -1066,10 +1066,10 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt,
*-------------------------------------------------------------------------
*/
if (copy_attr(dset_in, dset_out, &named_dt_head, travt, options) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "copy_attr failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "copy_attr failed");
if (H5Dclose(dset_out) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dclose failed");
} /* end if not a reference */
} /* end if h5tools_canreadf (filter availability check) */
@@ -1078,17 +1078,17 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt,
*-------------------------------------------------------------------------
*/
if (H5Tclose(ftype_id) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed");
if (H5Tclose(wtype_id) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed");
if (H5Pclose(dcpl_in) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed");
if (H5Pclose(dcpl_out) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed");
if (H5Sclose(f_space_id) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sclose failed");
if (H5Dclose(dset_in) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dclose failed");
}
/*-------------------------------------------------------------------------
* We do not have request for filter/chunking; use H5Ocopy instead
@@ -1099,11 +1099,11 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt,
/* create property to pass copy options */
if ((pid = H5Pcreate(H5P_OBJECT_COPY)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcreate failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcreate failed");
/* set options for object copy */
if (H5Pset_copy_object(pid, H5O_COPY_WITHOUT_ATTR_FLAG) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_copy_object failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_copy_object failed");
if (H5Ocopy(fidin, /* Source file or group identifier */
travt->objs[i].name, /* Name of the source object to be copied */
@@ -1111,25 +1111,25 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt,
travt->objs[i].name, /* Name of the destination object */
pid, /* Properties which apply to the copy */
H5P_DEFAULT) < 0) /* Properties which apply to the new hard link */
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Ocopy failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Ocopy failed");
if (H5Pclose(pid) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed");
/*-------------------------------------------------------------------------
* Copy attrs manually
*-------------------------------------------------------------------------
*/
if ((dset_in = H5Dopen2(fidin, travt->objs[i].name, H5P_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dopen2 failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dopen2 failed");
if ((dset_out = H5Dopen2(fidout, travt->objs[i].name, H5P_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dopen2 failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dopen2 failed");
if (copy_attr(dset_in, dset_out, &named_dt_head, travt, options) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "copy_attr failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "copy_attr failed");
if (H5Dclose(dset_in) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dclose failed");
if (H5Dclose(dset_out) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dclose failed");
if (options->verbose)
HDprintf(FORMAT_OBJ, "dset", travt->objs[i].name);
@@ -1146,27 +1146,27 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt,
HDprintf(FORMAT_OBJ, "type", travt->objs[i].name);
if ((type_in = H5Topen2(fidin, travt->objs[i].name, H5P_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Topen2 failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Topen2 failed");
/* Copy the datatype anonymously */
if ((type_out = copy_named_datatype(type_in, fidout, &named_dt_head, travt, options)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "copy_named_datatype failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "copy_named_datatype failed");
/* Link in to group structure */
if (H5Lcreate_hard(type_out, ".", fidout, travt->objs[i].name, H5P_DEFAULT, H5P_DEFAULT) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Lcreate_hard failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Lcreate_hard failed");
/*-------------------------------------------------------------------------
* copy attrs
*-------------------------------------------------------------------------
*/
if (copy_attr(type_in, type_out, &named_dt_head, travt, options) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "copy_attr failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "copy_attr failed");
if (H5Tclose(type_in) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed");
if (H5Tclose(type_out) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed");
type_out = -1; /* named datatypes stack, named_dt_head, manages allocation */
break;
@@ -1185,14 +1185,14 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt,
HDprintf(FORMAT_OBJ, "link", travt->objs[i].name);
if (H5Lcopy(fidin, travt->objs[i].name, fidout, travt->objs[i].name, H5P_DEFAULT, H5P_DEFAULT) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Lcopy failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Lcopy failed");
if (options->verbose)
HDprintf(FORMAT_OBJ, "link", travt->objs[i].name);
break;
default:
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Object type not found");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "Object type not found");
} /* switch */
} /* end for each object to traverse */
} /* end if there are objects */
@@ -1361,9 +1361,9 @@ copy_user_block(const char *infile, const char *outfile, hsize_t size)
/* Open files */
if ((infid = HDopen(infile, O_RDONLY)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDopen failed input file <%s>", infile);
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDopen failed input file <%s>", infile);
if ((outfid = HDopen(outfile, O_WRONLY)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDopen failed output file <%s>", outfile);
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDopen failed output file <%s>", outfile);
/* Copy the userblock from the input file to the output file */
while (size > 0) {
@@ -1377,7 +1377,7 @@ copy_user_block(const char *infile, const char *outfile, hsize_t size)
else
nread = HDread(infid, rbuf, (size_t)size);
if (nread < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDread failed to read userblock");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDread failed to read userblock");
/* Write buffer to destination file */
/* (compensating for interrupted writes & checking for errors, etc.) */
@@ -1390,7 +1390,7 @@ copy_user_block(const char *infile, const char *outfile, hsize_t size)
nwritten = HDwrite(outfid, wbuf, (size_t)nbytes);
} while (-1 == nwritten && EINTR == errno);
if (-1 == nwritten) /* error */
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDwrite failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDwrite failed");
HDassert(nwritten > 0);
HDassert(nwritten <= nbytes);
@@ -1435,20 +1435,20 @@ print_user_block(const char *filename, hid_t fid)
/* get user block size */
if ((fcpl = H5Fget_create_plist(fid)) < 0) {
HGOTO_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Fget_create_plist failed to retrieve file creation property list");
H5TOOLS_GOTO_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Fget_create_plist failed to retrieve file creation property list");
}
if (H5Pget_userblock(fcpl, &ub_size) < 0) {
HGOTO_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Pget_userblock failed to retrieve userblock size");
H5TOOLS_GOTO_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Pget_userblock failed to retrieve userblock size");
}
if (H5Pclose(fcpl) < 0) {
HGOTO_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Pclose failed to close property list");
H5TOOLS_GOTO_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Pclose failed to close property list");
}
/* open file */
if ((fh = HDopen(filename, O_RDONLY)) < 0) {
HGOTO_ERROR(H5E_tools_g, H5E_tools_min_id_g, "HDopen failed to open file <%s>", filename);
H5TOOLS_GOTO_ERROR(H5E_tools_g, H5E_tools_min_id_g, "HDopen failed to open file <%s>", filename);
}
size = ub_size;
@@ -1472,7 +1472,7 @@ print_user_block(const char *filename, hid_t fid)
HDprintf("\n");
if (nread < 0) {
HGOTO_ERROR(H5E_tools_g, H5E_tools_min_id_g, "nread < 0");
H5TOOLS_GOTO_ERROR(H5E_tools_g, H5E_tools_min_id_g, "nread < 0");
}
/* update size of userblock left to transfer */
+33 -33
View File
@@ -36,7 +36,7 @@ static int aux_copy_obj(hid_t dcpl_id, /* dataset creation property list */
const char* name, /* object name from traverse list */
pack_info_t *objout /*OUT*/) /* info about object to filter */
{
int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */
int ret_value = 0; /*no need to LEAVE() on ERROR: H5TOOLS_ERR_INIT(int, SUCCEED) */
int nfilters; /* number of filters in DCPL */
char f_objname[256]; /* filter objname */
H5D_layout_t layout;
@@ -47,24 +47,24 @@ static int aux_copy_obj(hid_t dcpl_id, /* dataset creation property list */
/* get information about input filters */
if ((nfilters = H5Pget_nfilters(dcpl_id)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_nfilters failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_nfilters failed");
/* copy filter_info_t structure */
for (i = 0; i < nfilters; i++) {
if ((objout->filter[i].filtn = H5Pget_filter2(dcpl_id, (unsigned) i, &objout->filter[i].filt_flag, &objout->filter[i].cd_nelmts,
objout->filter[i].cd_values, sizeof(f_objname), f_objname, NULL)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_filter2 failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_filter2 failed");
}
objout->nfilters = nfilters;
HDstrcpy(objout->path, name);
if ((layout = H5Pget_layout(dcpl_id)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_layout failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_layout failed");
objout->layout = layout;
if (layout == H5D_CHUNKED) {
if ((rank = H5Pget_chunk(dcpl_id, NELMTS(chsize), chsize/*out*/)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_chunk failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_chunk failed");
objout->chunk.rank = rank;
for (u = 0; u < (unsigned)rank; u++)
objout->chunk.chunk_lengths[u] = chsize[u];
@@ -238,7 +238,7 @@ int apply_filters(const char* name, /* object name from traverse list */
pack_opt_t *options, /* repack options */
int *has_filter) /* (OUT) object NAME has a filter */
{
int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */
int ret_value = 0; /*no need to LEAVE() on ERROR: H5TOOLS_ERR_INIT(int, SUCCEED) */
int nfilters; /* number of filters in DCPL */
hsize_t chsize[64]; /* chunk size in elements */
H5D_layout_t layout;
@@ -267,7 +267,7 @@ int apply_filters(const char* name, /* object name from traverse list */
/* get information about input filters */
if ((nfilters = H5Pget_nfilters(dcpl_id)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_nfilters failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_nfilters failed");
/*-------------------------------------------------------------------------
@@ -279,12 +279,12 @@ int apply_filters(const char* name, /* object name from traverse list */
if (nfilters && obj.nfilters) {
*has_filter = 1;
if (H5Premove_filter(dcpl_id, H5Z_FILTER_ALL) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Premove_filter failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Premove_filter failed");
}
else if(nfilters) {
*has_filter = 1;
if (aux_copy_obj(dcpl_id, name, &filtobj) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "aux_copy_obj failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "aux_copy_obj failed");
}
/*-------------------------------------------------------------------------
@@ -294,11 +294,11 @@ int apply_filters(const char* name, /* object name from traverse list */
*/
if (obj.layout == -1) {
if ((layout = H5Pget_layout(dcpl_id)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_layout failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_layout failed");
if (layout == H5D_CHUNKED) {
if ((rank = H5Pget_chunk(dcpl_id, NELMTS(chsize), chsize/*out*/)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_chunk failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_chunk failed");
obj.layout = H5D_CHUNKED;
obj.chunk.rank = rank;
for (i = 0; i < rank; i++)
@@ -340,7 +340,7 @@ int apply_filters(const char* name, /* object name from traverse list */
for (i = rank; i > 0; --i) {
hsize_t size = 0;
if(sm_nbytes == 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "number of bytes per stripmine must be > 0");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "number of bytes per stripmine must be > 0");
size = H5TOOLS_BUFSIZE / sm_nbytes;
if (size == 0) /* datum size > H5TOOLS_BUFSIZE */
size = 1;
@@ -355,7 +355,7 @@ int apply_filters(const char* name, /* object name from traverse list */
for (i = 0; i < obj.nfilters; i++) {
if (obj.filter[i].filtn < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "invalid filter");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "invalid filter");
switch (obj.filter[i].filtn) {
/*-------------------------------------------------------------------------
@@ -376,9 +376,9 @@ int apply_filters(const char* name, /* object name from traverse list */
aggression = obj.filter[i].cd_values[0];
/* set up for deflated data */
if (H5Pset_chunk(dcpl_id, obj.chunk.rank, obj.chunk.chunk_lengths) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_chunk failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_chunk failed");
if (H5Pset_deflate(dcpl_id, aggression) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_deflate failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_deflate failed");
}
break;
@@ -396,9 +396,9 @@ int apply_filters(const char* name, /* object name from traverse list */
/* set up for szip data */
if (H5Pset_chunk(dcpl_id, obj.chunk.rank, obj.chunk.chunk_lengths) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_chunk failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_chunk failed");
if (H5Pset_szip(dcpl_id, options_mask, pixels_per_block) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_szip failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_szip failed");
}
break;
@@ -408,9 +408,9 @@ int apply_filters(const char* name, /* object name from traverse list */
*/
case H5Z_FILTER_SHUFFLE:
if (H5Pset_chunk(dcpl_id, obj.chunk.rank, obj.chunk.chunk_lengths) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_chunk failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_chunk failed");
if (H5Pset_shuffle(dcpl_id) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_shuffle failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_shuffle failed");
break;
/*-------------------------------------------------------------------------
@@ -419,9 +419,9 @@ int apply_filters(const char* name, /* object name from traverse list */
*/
case H5Z_FILTER_FLETCHER32:
if (H5Pset_chunk(dcpl_id, obj.chunk.rank, obj.chunk.chunk_lengths) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_chunk failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_chunk failed");
if (H5Pset_fletcher32(dcpl_id) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_fletcher32 failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_fletcher32 failed");
break;
/*----------- -------------------------------------------------------------
* H5Z_FILTER_NBIT , NBIT compression
@@ -429,9 +429,9 @@ int apply_filters(const char* name, /* object name from traverse list */
*/
case H5Z_FILTER_NBIT:
if (H5Pset_chunk(dcpl_id, obj.chunk.rank, obj.chunk.chunk_lengths) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_chunk failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_chunk failed");
if (H5Pset_nbit(dcpl_id) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_nbit failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_nbit failed");
break;
/*----------- -------------------------------------------------------------
* H5Z_FILTER_SCALEOFFSET , scale+offset compression
@@ -446,19 +446,19 @@ int apply_filters(const char* name, /* object name from traverse list */
scale_factor = (int) obj.filter[i].cd_values[1];
if (H5Pset_chunk(dcpl_id, obj.chunk.rank, obj.chunk.chunk_lengths) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_chunk failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_chunk failed");
if (H5Pset_scaleoffset(dcpl_id, scale_type, scale_factor) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_scaleoffset failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_scaleoffset failed");
}
break;
default:
{
if (H5Pset_chunk(dcpl_id, obj.chunk.rank, obj.chunk.chunk_lengths) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_chunk failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_chunk failed");
if (H5Pset_filter(dcpl_id, obj.filter[i].filtn,
obj.filter[i].filt_flag, obj.filter[i].cd_nelmts,
obj.filter[i].cd_values) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_filter failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_filter failed");
}
break;
} /* switch */
@@ -469,10 +469,10 @@ int apply_filters(const char* name, /* object name from traverse list */
if (filtobj.nfilters) {
for (i = 0; i < filtobj.nfilters; i++) {
if (filtobj.filter[i].filtn < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "invalid filter");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "invalid filter");
if (H5Zfilter_avail(filtobj.filter[i].filtn) <= 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "%d filter unavailable", filtobj.filter[i].filtn);
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "%d filter unavailable", filtobj.filter[i].filtn);
} /* for */
} /* nfilters */
@@ -484,20 +484,20 @@ int apply_filters(const char* name, /* object name from traverse list */
if (obj.layout >= 0) {
/* a layout was defined */
if (H5Pset_layout(dcpl_id, obj.layout) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_layout failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_layout failed");
if (H5D_CHUNKED == obj.layout) {
if (H5Pset_chunk(dcpl_id, obj.chunk.rank, obj.chunk.chunk_lengths) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_chunk failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_chunk failed");
}
else if (H5D_COMPACT == obj.layout) {
if (H5Pset_alloc_time(dcpl_id, H5D_ALLOC_TIME_EARLY) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_alloc_time failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_alloc_time failed");
}
/* remove filters for the H5D_CONTIGUOUS case */
else if (H5D_CONTIGUOUS == obj.layout) {
if (H5Premove_filter(dcpl_id, H5Z_FILTER_ALL) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Premove_filter failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Premove_filter failed");
}
}
+3 -3
View File
@@ -111,7 +111,7 @@ aux_inctable(pack_opttbl_t *table, unsigned n_objs)
return 0;
}
/*-------------------------------------------------------------------------
* Function: options_table_init
*
@@ -144,7 +144,7 @@ int options_table_init(pack_opttbl_t **tbl) {
return 0;
}
/*-------------------------------------------------------------------------
* Function: options_table_free
*
@@ -190,7 +190,7 @@ options_add_layout(obj_list_t *obj_list, unsigned n_objs, pack_info_t *pack, pa
if (HDstrcmp(obj_list[j].obj,table->objs[i].path) == 0) {
/* already chunk info inserted for this one; exit */
if (table->objs[i].chunk.rank > 0) {
H5TOOLS_INFO(H5E_tools_min_id_g, "chunk information already inserted for <%s>\n", obj_list[j].obj);
H5TOOLS_INFO(H5E_tools_min_info_id_g, "chunk information already inserted for <%s>\n", obj_list[j].obj);
HDexit(EXIT_FAILURE);
}
/* insert the layout info */
+74 -74
View File
@@ -22,7 +22,7 @@
*/
static const char* MapIdToName(hid_t refobj_id,trav_table_t *travt);
static int copy_refs_attr(hid_t loc_in, hid_t loc_out,
static int copy_refs_attr(hid_t loc_in, hid_t loc_out,
trav_table_t *travt, hid_t fidout);
static herr_t update_ref_value(hid_t obj_id, H5R_type_t ref_type, void *ref_in,
hid_t fid_out, void *ref_out, trav_table_t *travt);
@@ -42,7 +42,7 @@ int do_copy_refobjs(hid_t fidin,
trav_table_t *travt,
pack_opt_t *options) /* repack options */
{
int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */
int ret_value = 0; /*no need to LEAVE() on ERROR: H5TOOLS_ERR_INIT(int, SUCCEED) */
hid_t grp_in = -1; /* read group ID */
hid_t grp_out = -1; /* write group ID */
hid_t dset_in = -1; /* read dataset ID */
@@ -76,18 +76,18 @@ int do_copy_refobjs(hid_t fidin,
*-------------------------------------------------------------------------
*/
if((grp_out = H5Gopen2(fidout, travt->objs[i].name, H5P_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gopen2 failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gopen2 failed");
if((grp_in = H5Gopen2(fidin, travt->objs[i].name, H5P_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gopen2 failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gopen2 failed");
if(copy_refs_attr(grp_in, grp_out, travt, fidout) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "copy_refs_attr failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "copy_refs_attr failed");
if(H5Gclose(grp_out) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gclose failed");
if(H5Gclose(grp_in) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gclose failed");
/*-------------------------------------------------------------------------
* check for hard links
@@ -104,26 +104,26 @@ int do_copy_refobjs(hid_t fidin,
*/
case H5TRAV_TYPE_DATASET:
if((dset_in = H5Dopen2(fidin, travt->objs[i].name, H5P_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dopen2 failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dopen2 failed");
if((space_id = H5Dget_space(dset_in)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_space failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_space failed");
if((ftype_id = H5Dget_type(dset_in)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_type failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_type failed");
if((dcpl_id = H5Dget_create_plist(dset_in)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_create_plist failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_create_plist failed");
if((rank = H5Sget_simple_extent_ndims(space_id)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed");
if(H5Sget_simple_extent_dims(space_id, dims, NULL) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_dims failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_dims failed");
nelmts = 1;
for(k = 0; k < rank; k++)
nelmts *= dims[k];
if((mtype_id = H5Tget_native_type(ftype_id, H5T_DIR_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_native_type failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_native_type failed");
if((msize = H5Tget_size(mtype_id)) == 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_size failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_size failed");
/*-------------------------------------------------------------------------
* check if the dataset creation property list has filters that
@@ -159,15 +159,15 @@ int do_copy_refobjs(hid_t fidin,
buf = (hobj_ref_t *)HDmalloc((unsigned)(nelmts * msize));
if(buf==NULL) {
HDprintf("cannot read into memory\n" );
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDmalloc failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDmalloc failed");
} /* end if */
if(H5Dread(dset_in, mtype_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dread failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dread failed");
refbuf = (hobj_ref_t*) HDcalloc((unsigned)nelmts, msize);
if(refbuf == NULL){
HDprintf("cannot allocate memory\n" );
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDcalloc failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDcalloc failed");
} /* end if */
for(u = 0; u < nelmts; u++) {
H5E_BEGIN_TRY {
@@ -181,7 +181,7 @@ int do_copy_refobjs(hid_t fidin,
if((refname = MapIdToName(refobj_id, travt)) != NULL) {
/* create the reference, -1 parameter for objects */
if(H5Rcreate(&refbuf[u], fidout, refname, H5R_OBJECT, (hid_t)-1) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Rcreate failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Rcreate failed");
if(options->verbose) {
HDprintf(FORMAT_OBJ,"dset",travt->objs[i].name );
HDprintf("object <%s> object reference created to <%s>\n",
@@ -199,10 +199,10 @@ int do_copy_refobjs(hid_t fidin,
*-------------------------------------------------------------------------
*/
if((dset_out = H5Dcreate2(fidout, travt->objs[i].name, mtype_id, space_id, H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dcreate2 failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dcreate2 failed");
if(nelmts)
if(H5Dwrite(dset_out, mtype_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, refbuf) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dwrite failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dwrite failed");
if(buf)
HDfree(buf);
@@ -213,7 +213,7 @@ int do_copy_refobjs(hid_t fidin,
* copy attrs
*----------------------------------------------------*/
if(copy_attr(dset_in, dset_out, &named_dt_head, travt, options) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "copy_attr failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "copy_attr failed");
} /*H5T_STD_REF_OBJ*/
/*-------------------------------------------------------------------------
@@ -235,10 +235,10 @@ int do_copy_refobjs(hid_t fidin,
buf = (hdset_reg_ref_t *)HDmalloc((unsigned)(nelmts * msize));
if(buf == NULL) {
HDprintf("cannot read into memory\n");
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDmalloc failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDmalloc failed");
} /* end if */
if(H5Dread(dset_in, mtype_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dread failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dread failed");
/*-------------------------------------------------------------------------
* create output
@@ -247,7 +247,7 @@ int do_copy_refobjs(hid_t fidin,
refbuf = (hdset_reg_ref_t *)HDcalloc(sizeof(hdset_reg_ref_t), (size_t)nelmts); /*init to zero */
if(refbuf == NULL) {
HDprintf("cannot allocate memory\n");
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDcalloc failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDcalloc failed");
} /* end if */
for(u = 0; u < nelmts; u++) {
@@ -263,13 +263,13 @@ int do_copy_refobjs(hid_t fidin,
hid_t region_id = -1; /* region id of the referenced dataset */
if((region_id = H5Rget_region(dset_in, H5R_DATASET_REGION, &buf[u])) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Rget_region failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Rget_region failed");
/* create the reference, we need the space_id */
if(H5Rcreate(&refbuf[u], fidout, refname, H5R_DATASET_REGION, region_id) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Rcreate failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Rcreate failed");
if(H5Sclose(region_id) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sclose failed");
if(options->verbose) {
HDprintf(FORMAT_OBJ,"dset",travt->objs[i].name );
HDprintf("object <%s> region reference created to <%s>\n",
@@ -287,10 +287,10 @@ int do_copy_refobjs(hid_t fidin,
*-------------------------------------------------------------------------
*/
if((dset_out = H5Dcreate2(fidout, travt->objs[i].name, mtype_id, space_id, H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dcreate2 failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dcreate2 failed");
if(nelmts)
if(H5Dwrite(dset_out, mtype_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, refbuf) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dwrite failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dwrite failed");
if(buf)
HDfree(buf);
@@ -301,7 +301,7 @@ int do_copy_refobjs(hid_t fidin,
* copy attrs
*----------------------------------------------------*/
if(copy_attr(dset_in, dset_out, &named_dt_head, travt, options) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "copy_attr failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "copy_attr failed");
} /* H5T_STD_REF_DSETREG */
/*-------------------------------------------------------------------------
* not references, open previously created object in 1st traversal
@@ -309,7 +309,7 @@ int do_copy_refobjs(hid_t fidin,
*/
else {
if((dset_out = H5Dopen2(fidout, travt->objs[i].name, H5P_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dopen2 failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dopen2 failed");
} /* end else */
/*-------------------------------------------------------------------------
@@ -317,7 +317,7 @@ int do_copy_refobjs(hid_t fidin,
*-------------------------------------------------------------------------
*/
if(copy_refs_attr(dset_in, dset_out, travt, fidout) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "copy_refs_attr failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "copy_refs_attr failed");
/*-------------------------------------------------------------------------
* check for hard links
@@ -328,7 +328,7 @@ int do_copy_refobjs(hid_t fidin,
H5Lcreate_hard(fidout, travt->objs[i].name, H5L_SAME_LOC, travt->objs[i].links[j].new_name, H5P_DEFAULT, H5P_DEFAULT);
if(H5Dclose(dset_out) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dclose failed");
} /*can_read*/
/*-------------------------------------------------------------------------
@@ -336,15 +336,15 @@ int do_copy_refobjs(hid_t fidin,
*-------------------------------------------------------------------------
*/
if(H5Tclose(ftype_id) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed");
if(H5Tclose(mtype_id) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed");
if(H5Pclose(dcpl_id) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed");
if(H5Sclose(space_id) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sclose failed");
if(H5Dclose(dset_in) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dclose failed");
break;
/*-------------------------------------------------------------------------
@@ -353,9 +353,9 @@ int do_copy_refobjs(hid_t fidin,
*/
case H5TRAV_TYPE_NAMED_DATATYPE:
if((type_in = H5Topen2(fidin, travt->objs[i].name, H5P_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Topen2 failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Topen2 failed");
if(H5Tclose(type_in) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed");
break;
/*-------------------------------------------------------------------------
@@ -368,7 +368,7 @@ int do_copy_refobjs(hid_t fidin,
case H5TRAV_TYPE_UNKNOWN:
case H5TRAV_TYPE_UDLINK:
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5TRAV invalid type");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5TRAV invalid type");
default:
break;
@@ -429,7 +429,7 @@ static int copy_refs_attr(hid_t loc_in,
trav_table_t *travt,
hid_t fidout) /* for saving references */
{
int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */
int ret_value = 0; /*no need to LEAVE() on ERROR: H5TOOLS_ERR_INIT(int, SUCCEED) */
hid_t attr_id = -1; /* attr ID */
hid_t attr_out = -1; /* attr ID */
hid_t space_id = -1; /* space ID */
@@ -455,26 +455,26 @@ static int copy_refs_attr(hid_t loc_in,
if(H5Oget_info2(loc_in, &oinfo, H5O_INFO_NUM_ATTRS) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Oget_info failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Oget_info failed");
for(u = 0; u < (unsigned)oinfo.num_attrs; u++) {
is_ref = is_ref_vlen = is_ref_array = is_ref_comp = 0;
/* open attribute */
if((attr_id = H5Aopen_by_idx(loc_in, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)u, H5P_DEFAULT, H5P_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aopen_by_idx failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aopen_by_idx failed");
/* get the file datatype */
if((ftype_id = H5Aget_type(attr_id)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aget_type failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aget_type failed");
type_class = H5Tget_class(ftype_id);
if((mtype_id = H5Tget_native_type(ftype_id, H5T_DIR_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_native_type failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_native_type failed");
if((msize = H5Tget_size(mtype_id)) == 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_size failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_size failed");
is_ref = (type_class == H5T_REFERENCE);
@@ -498,7 +498,7 @@ static int copy_refs_attr(hid_t loc_in,
int nmembers = H5Tget_nmembers(ftype_id) ;
if (nmembers < 1)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_nmembers failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_nmembers failed");
ref_comp_index = (unsigned *)HDmalloc((size_t)nmembers*sizeof(unsigned));
ref_comp_size = (size_t *)HDmalloc((size_t)nmembers*sizeof(ref_comp_size));
@@ -546,15 +546,15 @@ static int copy_refs_attr(hid_t loc_in,
/* get name */
if(H5Aget_name(attr_id, 255, name) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aget_name failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aget_name failed");
/* get the dataspace handle */
if((space_id = H5Aget_space(attr_id)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aget_space failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aget_space failed");
/* get dimensions */
if((rank = H5Sget_simple_extent_dims(space_id, dims, NULL)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_dims failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_dims failed");
/*-------------------------------------------------------------------------
@@ -583,7 +583,7 @@ static int copy_refs_attr(hid_t loc_in,
}
if((attr_out = H5Acreate2(loc_out, name, ftype_id, space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Acreate2 failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Acreate2 failed");
if (nelmts>0) {
/* handle object references */
@@ -591,15 +591,15 @@ static int copy_refs_attr(hid_t loc_in,
buf = (hobj_ref_t *)HDmalloc((unsigned)(nelmts * msize));
if(buf == NULL) {
HDprintf("cannot read into memory\n");
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDmalloc failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDmalloc failed");
} /* end if */
if(H5Aread(attr_id, mtype_id, buf) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aread failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aread failed");
refbuf = (hobj_ref_t *)HDcalloc((unsigned)nelmts, msize);
if(refbuf == NULL) {
HDprintf("cannot allocate memory\n");
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDcalloc failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDcalloc failed");
} /* end if */
for(i = 0; i < (unsigned)nelmts; i++)
@@ -612,10 +612,10 @@ static int copy_refs_attr(hid_t loc_in,
if(buf == NULL) {
HDprintf( "cannot read into memory\n" );
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDmalloc failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDmalloc failed");
} /* end if */
if(H5Aread(attr_id, mtype_id, buf) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aread failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aread failed");
/*-------------------------------------------------------------------------
* create output
@@ -624,7 +624,7 @@ static int copy_refs_attr(hid_t loc_in,
refbuf = (hdset_reg_ref_t *)HDcalloc(sizeof(hdset_reg_ref_t), (size_t)nelmts); /*init to zero */
if(refbuf == NULL) {
HDprintf( "cannot allocate memory\n" );
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDcalloc failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDcalloc failed");
} /* end if */
for(i = 0; i < (unsigned)nelmts; i++)
@@ -639,11 +639,11 @@ static int copy_refs_attr(hid_t loc_in,
if(buf == NULL) {
HDprintf( "cannot read into memory\n" );
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDmalloc failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDmalloc failed");
} /* end if */
if(H5Aread(attr_id, mtype_id, buf) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aread failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aread failed");
if (H5R_OBJ_REF_BUF_SIZE==msize) {
hobj_ref_t ref_out;
@@ -680,11 +680,11 @@ static int copy_refs_attr(hid_t loc_in,
if(buf == NULL) {
HDprintf( "cannot read into memory\n" );
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDmalloc failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDmalloc failed");
} /* end if */
if(H5Aread(attr_id, mtype_id, buf) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aread failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aread failed");
for (i=0; i<(unsigned)nelmts; i++) {
for (j=0; j<(unsigned)ref_comp_field_n; j++) {
@@ -709,7 +709,7 @@ static int copy_refs_attr(hid_t loc_in,
} /* else if (is_ref_comp) */
if(H5Awrite(attr_out, mtype_id, refbuf) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Awrite failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Awrite failed");
if (is_ref_vlen && buf)
H5Treclaim (mtype_id, space_id, H5P_DEFAULT, buf);
@@ -739,20 +739,20 @@ static int copy_refs_attr(hid_t loc_in,
}
if(H5Aclose(attr_out) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aclose failed");
/*-------------------------------------------------------------------------
* close
*-------------------------------------------------------------------------
*/
if(H5Tclose(ftype_id) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed");
if(H5Tclose(mtype_id) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed");
if(H5Sclose(space_id) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sclose failed");
if(H5Aclose(attr_id) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aclose failed");
} /* for(u = 0; u < (unsigned)oinfo.num_attrs; u++) */
done:
@@ -822,27 +822,27 @@ out:
static herr_t update_ref_value(hid_t obj_id, H5R_type_t ref_type, void *ref_in,
hid_t fid_out, void *ref_out, trav_table_t *travt)
{
int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */
int ret_value = 0; /*no need to LEAVE() on ERROR: H5TOOLS_ERR_INIT(int, SUCCEED) */
const char *ref_obj_name;
hid_t space_id = -1;
hid_t ref_obj_id = -1;
ref_obj_id = H5Rdereference2(obj_id, H5P_DEFAULT, ref_type, ref_in);
if (ref_obj_id < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Rdereference2 failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Rdereference2 failed");
ref_obj_name = MapIdToName(ref_obj_id, travt);
if (ref_obj_name == NULL)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "MapIdToName failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "MapIdToName failed");
if (ref_type == H5R_DATASET_REGION) {
space_id = H5Rget_region(obj_id, H5R_DATASET_REGION, ref_in);
if (space_id < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Rget_region failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Rget_region failed");
}
if(H5Rcreate(ref_out, fid_out, ref_obj_name, ref_type, space_id) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Rcreate failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Rcreate failed");
done:
H5E_BEGIN_TRY {
+59 -59
View File
@@ -39,7 +39,7 @@ 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) */
int ret_value = 0; /*no need to LEAVE() on ERROR: H5TOOLS_ERR_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 */
@@ -58,7 +58,7 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options
/* open the output file */
if((fidout = H5Fopen(out_fname, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0 )
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Fopen failed on <%s>", out_fname);
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Fopen failed on <%s>", out_fname);
for(i = 0; i < options->op_tbl->nelems; i++) {
char *name = options->op_tbl->objs[i].path;
@@ -69,13 +69,13 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options
*-------------------------------------------------------------------------
*/
if((did = H5Dopen2(fidout, name, H5P_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dopen2 failed on <%s>", name);
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dopen2 failed on <%s>", name);
if((sid = H5Dget_space(did)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_space failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_space failed");
if((pid = H5Dget_create_plist(did)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_create_plist failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_create_plist failed");
if((tid = H5Dget_type(did)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_type failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_type failed");
/*-------------------------------------------------------------------------
* filter check
@@ -96,13 +96,13 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options
*-------------------------------------------------------------------------
*/
if(H5Pclose(pid) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed");
if (H5Sclose(sid) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sclose failed");
if (H5Dclose(did) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dclose failed");
if (H5Tclose(tid) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed");
}
/*-------------------------------------------------------------------------
@@ -118,7 +118,7 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options
/* get the list of objects in the file */
if(h5trav_gettable(fidout, travt) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "h5trav_gettable failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "h5trav_gettable failed");
for(i = 0; i < travt->nobjs; i++) {
char *name = travt->objs[i].name;
@@ -129,13 +129,13 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options
*-------------------------------------------------------------------------
*/
if((did = H5Dopen2(fidout, name, H5P_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dopen2 failed on <%s>", name);
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dopen2 failed on <%s>", name);
if((sid = H5Dget_space(did)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_space failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_space failed");
if((pid = H5Dget_create_plist(did)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_create_plist failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_create_plist failed");
if((tid = H5Dget_type(did)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_type failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_type failed");
/*-------------------------------------------------------------------------
* filter check
@@ -165,13 +165,13 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options
*-------------------------------------------------------------------------
*/
if (H5Pclose(pid) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed");
if (H5Sclose(sid) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sclose failed");
if (H5Dclose(did) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dclose failed");
if (H5Tclose(tid) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed");
} /* if */
} /* i */
@@ -187,32 +187,32 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options
/* open the input file */
if((fidin = H5Fopen(in_fname, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Fopen failed on file <%s>", in_fname);
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Fopen failed on file <%s>", in_fname);
/* Get file creation property list for input file */
if((fcpl_in = H5Fget_create_plist(fidin)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Fget_create_plist failed to retrieve file creation property list");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Fget_create_plist failed to retrieve file creation property list");
/* Get file space info for input file */
if(H5Pget_file_space_strategy(fcpl_in, &in_strategy, &in_persist, &in_threshold) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_file_space_strategy failed to retrieve file space strategy & threshold");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_file_space_strategy failed to retrieve file space strategy & threshold");
/* Get file space page size for input file */
if(H5Pget_file_space_page_size(fcpl_in, &in_pagesize) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_file_space_page_size failed to retrieve file space page size");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_file_space_page_size failed to retrieve file space page size");
/* Output file is already opened */
/* Get file creation property list for output file */
if((fcpl_out = H5Fget_create_plist(fidout)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Fget_create_plist failed to retrieve file creation property list");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Fget_create_plist failed to retrieve file creation property list");
/* Get file space info for output file */
if(H5Pget_file_space_strategy(fcpl_out, &out_strategy, &out_persist, &out_threshold) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_file_space_strategy failed to retrieve file space strategy & threshold");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_file_space_strategy failed to retrieve file space strategy & threshold");
/* Get file space page size for output file */
if(H5Pget_file_space_page_size(fcpl_out, &out_pagesize) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_file_space_page_size failed to retrieve file space page size");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_file_space_page_size failed to retrieve file space page size");
/*
* If -S option is set, the file space handling strategy should be set as specified.
@@ -221,11 +221,11 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options
*/
if(options->fs_strategy) {
if(out_strategy != (options->fs_strategy == (H5F_fspace_strategy_t)-1 ? 0 : options->fs_strategy))
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "file space strategy not set as unexpected");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "file space strategy not set as unexpected");
}
else {
if(out_strategy != in_strategy)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "file space strategy not set as unexpected");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "file space strategy not set as unexpected");
}
/*
@@ -235,11 +235,11 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options
*/
if(options->fs_persist) {
if(out_persist != (hbool_t)(options->fs_persist == (-1) ? FALSE : options->fs_persist))
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "free-space persist status not set as unexpected");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "free-space persist status not set as unexpected");
}
else {
if(out_persist != in_persist)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "free-space persist status not set as unexpected");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "free-space persist status not set as unexpected");
}
/*
@@ -249,11 +249,11 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options
*/
if(options->fs_threshold) {
if(out_threshold != (hsize_t)(options->fs_threshold == (-1) ? 0 : options->fs_threshold))
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "threshold not set as unexpected");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "threshold not set as unexpected");
}
else {
if(out_threshold != in_threshold)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "threshold not set as unexpected");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "threshold not set as unexpected");
}
/*
@@ -263,11 +263,11 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options
*/
if(options->fs_pagesize) {
if(out_pagesize != (hsize_t)(options->fs_pagesize == (-1) ? 0 : options->fs_pagesize))
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "file space page size not set as unexpected");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "file space page size not set as unexpected");
}
else { /* "-G" is not set */
if(out_pagesize != in_pagesize)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "file space page size not set as unexpected");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "file space page size not set as unexpected");
}
@@ -355,7 +355,7 @@ int verify_layout(hid_t pid, pack_info_t *obj)
int h5repack_cmp_pl(const char *fname1, const char *fname2)
{
int ret_value = 1; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */
int ret_value = 1; /*no need to LEAVE() on ERROR: H5TOOLS_ERR_INIT(int, SUCCEED) */
hid_t fid1 =-1; /* file ID */
hid_t fid2 =-1; /* file ID */
hid_t dset1 =-1; /* dataset ID */
@@ -375,9 +375,9 @@ int h5repack_cmp_pl(const char *fname1, const char *fname2)
*/
/* Open the files */
if ((fid1 = H5Fopen(fname1, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "h5tools_fopen failed <%s>: %s", fname1, H5FOPENERROR);
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "h5tools_fopen failed <%s>: %s", fname1, H5FOPENERROR);
if ((fid2 = H5Fopen(fname2, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "h5tools_fopen failed <%s>: %s", fname2, H5FOPENERROR);
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "h5tools_fopen failed <%s>: %s", fname2, H5FOPENERROR);
/*-------------------------------------------------------------------------
* get file table list of objects
@@ -388,7 +388,7 @@ int h5repack_cmp_pl(const char *fname1, const char *fname2)
/* init table */
trav_table_init(&trav);
if(h5trav_gettable(fid1, trav) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "h5trav_gettable failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "h5trav_gettable failed");
/*-------------------------------------------------------------------------
* traverse the suppplied object list
@@ -397,62 +397,62 @@ int h5repack_cmp_pl(const char *fname1, const char *fname2)
for(i = 0; i < trav->nobjs; i++) {
if(trav->objs[i].type == H5TRAV_TYPE_GROUP) {
if ((gid = H5Gopen2(fid1, trav->objs[i].name, H5P_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gopen2 failed on first <%s>", trav->objs[i].name);
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gopen2 failed on first <%s>", trav->objs[i].name);
if ((gcplid = H5Gget_create_plist(gid)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gget_create_plist failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gget_create_plist failed");
if (H5Pget_link_creation_order(gcplid, &crt_order_flag1) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_link_creation_order failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_link_creation_order failed");
if (H5Pclose(gcplid) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed");
if (H5Gclose(gid) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gclose failed");
if ((gid = H5Gopen2(fid2, trav->objs[i].name, H5P_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gopen2 failed on second <%s>", trav->objs[i].name);
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gopen2 failed on second <%s>", trav->objs[i].name);
if ((gcplid = H5Gget_create_plist(gid)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gget_create_plist failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gget_create_plist failed");
if (H5Pget_link_creation_order(gcplid, &crt_order_flag2) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_link_creation_order failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_link_creation_order failed");
if (H5Pclose(gcplid) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed");
if (H5Gclose(gid) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gclose failed");
if (crt_order_flag1 != crt_order_flag2)
HGOTO_ERROR(0, H5E_tools_min_id_g, "property lists failed for <%s> are different", trav->objs[i].name);
H5TOOLS_GOTO_ERROR(0, H5E_tools_min_id_g, "property lists failed for <%s> are different", trav->objs[i].name);
}
else if(trav->objs[i].type == H5TRAV_TYPE_DATASET) {
if((dset1 = H5Dopen2(fid1, trav->objs[i].name, H5P_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dopen2 failed on first <%s>", trav->objs[i].name);
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dopen2 failed on first <%s>", trav->objs[i].name);
if((dset2 = H5Dopen2(fid2, trav->objs[i].name, H5P_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dopen2 failed on second <%s>", trav->objs[i].name);
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dopen2 failed on second <%s>", trav->objs[i].name);
if((dcpl1 = H5Dget_create_plist(dset1)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_create_plist failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_create_plist failed");
if((dcpl2 = H5Dget_create_plist(dset2)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_create_plist failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_create_plist failed");
/*-------------------------------------------------------------------------
* compare the property lists
*-------------------------------------------------------------------------
*/
if((ret_value = H5Pequal(dcpl1, dcpl2)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pequal failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pequal failed");
if(ret_value == 0)
HGOTO_ERROR(0, H5E_tools_min_id_g, "property lists failed for <%s> are different", trav->objs[i].name);
H5TOOLS_GOTO_ERROR(0, H5E_tools_min_id_g, "property lists failed for <%s> are different", trav->objs[i].name);
/*-------------------------------------------------------------------------
* close
*-------------------------------------------------------------------------
*/
if(H5Pclose(dcpl1) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed");
if(H5Pclose(dcpl2) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed");
if(H5Dclose(dset1) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dclose failed");
if(H5Dclose(dset2) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dclose failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dclose failed");
} /*if*/
} /*for*/
+22 -22
View File
@@ -455,7 +455,7 @@ group_stats(iter_t *iter, const char *name, const H5O_info_t *oi)
/* Get group information */
if((ret_value = H5Gget_info_by_name(iter->fid, name, &ginfo, H5P_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gget_info_by_name() failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gget_info_by_name() failed");
/* Update link stats */
/* Collect statistics for small groups */
@@ -470,7 +470,7 @@ group_stats(iter_t *iter, const char *name, const H5O_info_t *oi)
if((bin + 1) > iter->group_nbins) {
/* Allocate more storage for info about dataset's datatype */
if((iter->group_bins = (unsigned long *)HDrealloc(iter->group_bins, (bin + 1) * sizeof(unsigned long))) == NULL)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Drealloc() failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Drealloc() failed");
/* Initialize counts for intermediate bins */
while(iter->group_nbins < bin)
@@ -489,7 +489,7 @@ group_stats(iter_t *iter, const char *name, const H5O_info_t *oi)
/* Update attribute metadata info */
if((ret_value = attribute_stats(iter, oi)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "attribute_stats failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "attribute_stats failed");
done:
return ret_value;
@@ -537,7 +537,7 @@ dataset_stats(iter_t *iter, const char *name, const H5O_info_t *oi)
iter->dset_ohdr_info.free_size += oi->hdr.space.free;
if((did = H5Dopen2(iter->fid, name, H5P_DEFAULT)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dopen() failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dopen() failed");
/* Update dataset metadata info */
iter->datasets_index_storage_size += oi->meta_size.obj.index_size;
@@ -545,7 +545,7 @@ dataset_stats(iter_t *iter, const char *name, const H5O_info_t *oi)
/* Update attribute metadata info */
if((ret_value = attribute_stats(iter, oi)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "attribute_stats() failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "attribute_stats() failed");
/* Get storage info */
/* Failure 0 indistinguishable from no-data-stored 0 */
@@ -553,10 +553,10 @@ dataset_stats(iter_t *iter, const char *name, const H5O_info_t *oi)
/* Gather layout statistics */
if((dcpl = H5Dget_create_plist(did)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_create_plist() failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_create_plist() failed");
if((lout = H5Pget_layout(dcpl)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_layout() failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_layout() failed");
/* Object header's total size for H5D_COMPACT layout includes raw data size */
/* "storage" also includes H5D_COMPACT raw data size */
@@ -568,7 +568,7 @@ dataset_stats(iter_t *iter, const char *name, const H5O_info_t *oi)
/* Get the number of external files for the dataset */
if((num_ext = H5Pget_external_count(dcpl)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_external_count() failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_external_count() failed");
/* Accumulate raw data size accordingly */
if(num_ext) {
@@ -580,10 +580,10 @@ dataset_stats(iter_t *iter, const char *name, const H5O_info_t *oi)
/* Gather dataspace statistics */
if((sid = H5Dget_space(did)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sget_space() failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sget_space() failed");
if((ndims = H5Sget_simple_extent_dims(sid, dims, NULL)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_dims() failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_dims() failed");
/* Check for larger rank of dataset */
if((unsigned)ndims > iter->max_dset_rank)
@@ -606,7 +606,7 @@ dataset_stats(iter_t *iter, const char *name, const H5O_info_t *oi)
if((bin + 1) > iter->dset_dim_nbins) {
/* Allocate more storage for info about dataset's datatype */
if((iter->dset_dim_bins = (unsigned long *)HDrealloc(iter->dset_dim_bins, (bin + 1) * sizeof(unsigned long))) == NULL)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Drealloc() failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Drealloc() failed");
/* Initialize counts for intermediate bins */
while(iter->dset_dim_nbins < bin)
@@ -621,11 +621,11 @@ dataset_stats(iter_t *iter, const char *name, const H5O_info_t *oi)
} /* end if */
if(H5Sclose(sid) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sclose() failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sclose() failed");
/* Gather datatype statistics */
if((tid = H5Dget_type(did)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_type() failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_type() failed");
type_found = FALSE;
for(u = 0; u < iter->dset_ntypes; u++)
@@ -644,11 +644,11 @@ dataset_stats(iter_t *iter, const char *name, const H5O_info_t *oi)
/* Allocate more storage for info about dataset's datatype */
if((iter->dset_type_info = (dtype_info_t *)HDrealloc(iter->dset_type_info, iter->dset_ntypes * sizeof(dtype_info_t))) == NULL)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Drealloc() failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Drealloc() failed");
/* Initialize information about datatype */
if((iter->dset_type_info[curr_ntype].tid = H5Tcopy(tid)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tcopy() failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tcopy() failed");
iter->dset_type_info[curr_ntype].count = 1;
iter->dset_type_info[curr_ntype].named = 0;
@@ -661,7 +661,7 @@ dataset_stats(iter_t *iter, const char *name, const H5O_info_t *oi)
(iter->dset_type_info[u].named)++;
if(H5Tclose(tid) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose() failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose() failed");
/* Track different filters */
if((nfltr = H5Pget_nfilters(dcpl)) >= 0) {
@@ -679,10 +679,10 @@ dataset_stats(iter_t *iter, const char *name, const H5O_info_t *oi)
} /* endif nfltr */
if(H5Pclose(dcpl) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose() failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose() failed");
if(H5Dclose(did) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dclose() failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dclose() failed");
done:
return ret_value;
@@ -715,7 +715,7 @@ datatype_stats(iter_t *iter, const H5O_info_t *oi)
/* Update attribute metadata info */
if((ret_value = attribute_stats(iter, oi)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "attribute_stats() failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "attribute_stats() failed");
done:
return ret_value;
} /* end datatype_stats() */
@@ -750,17 +750,17 @@ obj_stats(const char *path, const H5O_info_t *oi, const char *already_visited,
switch(oi->type) {
case H5O_TYPE_GROUP:
if(group_stats(iter, path, oi) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "group_stats failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "group_stats failed");
break;
case H5O_TYPE_DATASET:
if(dataset_stats(iter, path, oi) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "dataset_stats failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "dataset_stats failed");
break;
case H5O_TYPE_NAMED_DATATYPE:
if(datatype_stats(iter, oi) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "datatype_stats failed");
H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "datatype_stats failed");
break;
case H5O_TYPE_MAP:
+8 -10
View File
@@ -3,15 +3,14 @@
/g1/g1.1 Group
/g1/g1.1/dset1.1.1 Dataset {10, 10}
Data:
(0,0) 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 2,
(2,2) 4, 6, 8, 10, 12, 14, 16, 18, 0, 3, 6, 9, 12, 15, 18, 21, 24, 27,
(4,0) 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 0, 5, 10, 15, 20, 25, 30, 35,
(5,8) 40, 45, 0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 0, 7, 14, 21, 28,
(7,5) 35, 42, 49, 56, 63, 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 0, 9,
(9,2) 18, 27, 36, 45, 54, 63, 72, 81
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 2, 4, 6,
8, 10, 12, 14, 16, 18, 0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 0, 4, 8, 12,
16, 20, 24, 28, 32, 36, 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 0, 6, 12,
18, 24, 30, 36, 42, 48, 54, 0, 7, 14, 21, 28, 35, 42, 49, 56, 63, 0, 8,
16, 24, 32, 40, 48, 56, 64, 72, 0, 9, 18, 27, 36, 45, 54, 63, 72, 81
/g1/g1.1/dset1.1.2 Dataset {20}
Data:
(0) 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19
/g1/g1.2 Group
/g1/g1.2/extlink External Link {somefile//somepath}
/g1/g1.2/g1.2.1 Group
@@ -19,9 +18,8 @@
/g2 Group
/g2/dset2.1 Dataset {10}
Data:
(0) 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9
1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9
/g2/dset2.2 Dataset {3, 5}
Data:
(0,0) 0, 0.1, 0.2, 0.3, 0.4, 0, 0.2, 0.4, 0.6, 0.8, 0, 0.3, 0.6, 0.9,
(2,4) 1.2
0, 0.1, 0.2, 0.3, 0.4, 0, 0.2, 0.4, 0.6, 0.8, 0, 0.3, 0.6, 0.9, 1.2
/g2/udlink UD Link {cannot follow UD links}
+1 -1
View File
@@ -1,4 +1,4 @@
/ Group
/Dataset1 Dataset {4}
Data:
(0) [0,1,2,3], [10,11,12,13], [20,21,22,23], [30,31,32,33]
[0,1,2,3], [10,11,12,13], [20,21,22,23], [30,31,32,33]
+13 -10
View File
@@ -2,9 +2,12 @@ Opened "tattrreg.h5" with sec2 driver.
Dataset1 Dataset {NULL}
Attribute: Attribute1 {4}
Type: dataset region reference
Data: DSET-/Dataset2 {Blk0: (2,2)-(7,7)}, DSET-/Dataset2 {Pt0: (6,9),
Pt1: (2,2), Pt2: (8,4), Pt3: (1,6), Pt4: (2,8), Pt5: (3,2),
Pt6: (0,4), Pt7: (9,0), Pt8: (7,1), Pt9: (3,3)}, NULL, NULL
Data: DSET-/Dataset2 {Blk0: (2,2)-(7,7)}
DSET-/Dataset2 {Pt0: (6,9), Pt1: (2,2), Pt2: (8,4), Pt3: (1,6),
Pt4: (2,8), Pt5: (3,2), Pt6: (0,4), Pt7: (9,0), Pt8: (7,1),
Pt9: (3,3)}
NULL
NULL
Location: 1:1400
Links: 1
Storage: 0 logical bytes, 0 allocated bytes
@@ -17,10 +20,10 @@ Dataset2 Dataset {10/10, 10/10}
Storage: 100 logical bytes, 100 allocated bytes, 100.00% utilization
Type: native unsigned char
Data:
(0,0) 0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48,
(1,7) 51, 54, 57, 60, 63, 66, 69, 72, 75, 78, 81, 84, 87, 90, 93, 96,
(3,3) 99, 102, 105, 108, 111, 114, 117, 120, 123, 126, 129, 132, 135,
(4,6) 138, 141, 144, 147, 150, 153, 156, 159, 162, 165, 168, 171, 174,
(5,9) 177, 180, 183, 186, 189, 192, 195, 198, 201, 204, 207, 210, 213,
(7,2) 216, 219, 222, 225, 228, 231, 234, 237, 240, 243, 246, 249, 252,
(8,5) 255, 2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41
0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 51, 54,
57, 60, 63, 66, 69, 72, 75, 78, 81, 84, 87, 90, 93, 96, 99, 102, 105,
108, 111, 114, 117, 120, 123, 126, 129, 132, 135, 138, 141, 144, 147,
150, 153, 156, 159, 162, 165, 168, 171, 174, 177, 180, 183, 186, 189,
192, 195, 198, 201, 204, 207, 210, 213, 216, 219, 222, 225, 228, 231,
234, 237, 240, 243, 246, 249, 252, 255, 2, 5, 8, 11, 14, 17, 20, 23,
26, 29, 32, 35, 38, 41
+13 -10
View File
@@ -2,9 +2,12 @@ Opened "tattrreg.h5" with sec2 driver.
Dataset1 Dataset {NULL}
Attribute: Attribute1 {4}
Type: dataset region reference
Data: DSET-/Dataset2 {Blk0: (2,2)-(7,7)}, DSET-/Dataset2 {Pt0: (6,9),
Pt1: (2,2), Pt2: (8,4), Pt3: (1,6), Pt4: (2,8), Pt5: (3,2),
Pt6: (0,4), Pt7: (9,0), Pt8: (7,1), Pt9: (3,3)}, NULL, NULL
Data: DSET-/Dataset2 {Blk0: (2,2)-(7,7)}
DSET-/Dataset2 {Pt0: (6,9), Pt1: (2,2), Pt2: (8,4), Pt3: (1,6),
Pt4: (2,8), Pt5: (3,2), Pt6: (0,4), Pt7: (9,0), Pt8: (7,1),
Pt9: (3,3)}
NULL
NULL
Location: 1:1400
Links: 1
Storage: 0 logical bytes, 0 allocated bytes
@@ -17,10 +20,10 @@ Dataset2 Dataset {10/10, 10/10}
Storage: 100 logical bytes, 100 allocated bytes, 100.00% utilization
Type: 8-bit unsigned integer
Data:
(0,0) 0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48,
(1,7) 51, 54, 57, 60, 63, 66, 69, 72, 75, 78, 81, 84, 87, 90, 93, 96,
(3,3) 99, 102, 105, 108, 111, 114, 117, 120, 123, 126, 129, 132, 135,
(4,6) 138, 141, 144, 147, 150, 153, 156, 159, 162, 165, 168, 171, 174,
(5,9) 177, 180, 183, 186, 189, 192, 195, 198, 201, 204, 207, 210, 213,
(7,2) 216, 219, 222, 225, 228, 231, 234, 237, 240, 243, 246, 249, 252,
(8,5) 255, 2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41
0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 51, 54,
57, 60, 63, 66, 69, 72, 75, 78, 81, 84, 87, 90, 93, 96, 99, 102, 105,
108, 111, 114, 117, 120, 123, 126, 129, 132, 135, 138, 141, 144, 147,
150, 153, 156, 159, 162, 165, 168, 171, 174, 177, 180, 183, 186, 189,
192, 195, 198, 201, 204, 207, 210, 213, 216, 219, 222, 225, 228, 231,
234, 237, 240, 243, 246, 249, 252, 255, 2, 5, 8, 11, 14, 17, 20, 23,
26, 29, 32, 35, 38, 41
+41 -41
View File
@@ -1,57 +1,57 @@
/ Group
/dset1 Dataset {5}
Data:
(0) {0, 0, 1}, {1, 1, 0.5}, {2, 4, 0.333333333333333}, {3, 9, 0.25},
(4) {4, 16, 0.2}
{0, 0, 1}, {1, 1, 0.5}, {2, 4, 0.333333333333333}, {3, 9, 0.25},
{4, 16, 0.2}
/group1 Group
/group1/dset2 Dataset {5}
Data:
(0) {0, 0}, {1, 1.1}, {2, 2.2}, {3, 3.3}, {4, 4.4}
{0, 0}, {1, 1.1}, {2, 2.2}, {3, 3.3}, {4, 4.4}
/group1/dset3 Dataset {3, 6}
Data:
(0,0) {[0,1,2,3], [1,2,3,4,5,6,2,3,4,5,6,7,3,4,5,6,7,8,4,5,6,7,8,9,5,6,
(0,0) 7,8,9,10]},
(0,1) {[1,2,3,4], [2,3,4,5,6,7,3,4,5,6,7,8,4,5,6,7,8,9,5,6,7,8,9,10,6,
(0,1) 7,8,9,10,11]},
(0,2) {[2,3,4,5], [3,4,5,6,7,8,4,5,6,7,8,9,5,6,7,8,9,10,6,7,8,9,10,11,
(0,2) 7,8,9,10,11,12]},
(0,3) {[3,4,5,6], [4,5,6,7,8,9,5,6,7,8,9,10,6,7,8,9,10,11,7,8,9,10,11,
(0,3) 12,8,9,10,11,12,13]},
(0,4) {[4,5,6,7], [5,6,7,8,9,10,6,7,8,9,10,11,7,8,9,10,11,12,8,9,10,11,
(0,4) 12,13,9,10,11,12,13,14]},
(0,5) {[5,6,7,8], [6,7,8,9,10,11,7,8,9,10,11,12,8,9,10,11,12,13,9,10,
(0,5) 11,12,13,14,10,11,12,13,14,15]},
(1,0) {[1,2,3,4], [2,3,4,5,6,7,3,4,5,6,7,8,4,5,6,7,8,9,5,6,7,8,9,10,6,
(1,0) 7,8,9,10,11]},
(1,1) {[2,3,4,5], [3,4,5,6,7,8,4,5,6,7,8,9,5,6,7,8,9,10,6,7,8,9,10,11,
(1,1) 7,8,9,10,11,12]},
(1,2) {[3,4,5,6], [4,5,6,7,8,9,5,6,7,8,9,10,6,7,8,9,10,11,7,8,9,10,11,
(1,2) 12,8,9,10,11,12,13]},
(1,3) {[4,5,6,7], [5,6,7,8,9,10,6,7,8,9,10,11,7,8,9,10,11,12,8,9,10,11,
(1,3) 12,13,9,10,11,12,13,14]},
(1,4) {[5,6,7,8], [6,7,8,9,10,11,7,8,9,10,11,12,8,9,10,11,12,13,9,10,
(1,4) 11,12,13,14,10,11,12,13,14,15]},
(1,5) {[6,7,8,9], [7,8,9,10,11,12,8,9,10,11,12,13,9,10,11,12,13,14,10,
(1,5) 11,12,13,14,15,11,12,13,14,15,16]},
(2,0) {[2,3,4,5], [3,4,5,6,7,8,4,5,6,7,8,9,5,6,7,8,9,10,6,7,8,9,10,11,
(2,0) 7,8,9,10,11,12]},
(2,1) {[3,4,5,6], [4,5,6,7,8,9,5,6,7,8,9,10,6,7,8,9,10,11,7,8,9,10,11,
(2,1) 12,8,9,10,11,12,13]},
(2,2) {[4,5,6,7], [5,6,7,8,9,10,6,7,8,9,10,11,7,8,9,10,11,12,8,9,10,11,
(2,2) 12,13,9,10,11,12,13,14]},
(2,3) {[5,6,7,8], [6,7,8,9,10,11,7,8,9,10,11,12,8,9,10,11,12,13,9,10,
(2,3) 11,12,13,14,10,11,12,13,14,15]},
(2,4) {[6,7,8,9], [7,8,9,10,11,12,8,9,10,11,12,13,9,10,11,12,13,14,10,
(2,4) 11,12,13,14,15,11,12,13,14,15,16]},
(2,5) {[7,8,9,10], [8,9,10,11,12,13,9,10,11,12,13,14,10,11,12,13,14,15,
(2,5) 11,12,13,14,15,16,12,13,14,15,16,17]}
{[0,1,2,3], [1,2,3,4,5,6,2,3,4,5,6,7,3,4,5,6,7,8,4,5,6,7,8,9,5,6,7,8,
9,10]},
{[1,2,3,4], [2,3,4,5,6,7,3,4,5,6,7,8,4,5,6,7,8,9,5,6,7,8,9,10,6,7,8,9,
10,11]},
{[2,3,4,5], [3,4,5,6,7,8,4,5,6,7,8,9,5,6,7,8,9,10,6,7,8,9,10,11,7,8,9,
10,11,12]},
{[3,4,5,6], [4,5,6,7,8,9,5,6,7,8,9,10,6,7,8,9,10,11,7,8,9,10,11,12,8,
9,10,11,12,13]},
{[4,5,6,7], [5,6,7,8,9,10,6,7,8,9,10,11,7,8,9,10,11,12,8,9,10,11,12,
13,9,10,11,12,13,14]},
{[5,6,7,8], [6,7,8,9,10,11,7,8,9,10,11,12,8,9,10,11,12,13,9,10,11,12,
13,14,10,11,12,13,14,15]},
{[1,2,3,4], [2,3,4,5,6,7,3,4,5,6,7,8,4,5,6,7,8,9,5,6,7,8,9,10,6,7,8,9,
10,11]},
{[2,3,4,5], [3,4,5,6,7,8,4,5,6,7,8,9,5,6,7,8,9,10,6,7,8,9,10,11,7,8,9,
10,11,12]},
{[3,4,5,6], [4,5,6,7,8,9,5,6,7,8,9,10,6,7,8,9,10,11,7,8,9,10,11,12,8,
9,10,11,12,13]},
{[4,5,6,7], [5,6,7,8,9,10,6,7,8,9,10,11,7,8,9,10,11,12,8,9,10,11,12,
13,9,10,11,12,13,14]},
{[5,6,7,8], [6,7,8,9,10,11,7,8,9,10,11,12,8,9,10,11,12,13,9,10,11,12,
13,14,10,11,12,13,14,15]},
{[6,7,8,9], [7,8,9,10,11,12,8,9,10,11,12,13,9,10,11,12,13,14,10,11,12,
13,14,15,11,12,13,14,15,16]},
{[2,3,4,5], [3,4,5,6,7,8,4,5,6,7,8,9,5,6,7,8,9,10,6,7,8,9,10,11,7,8,9,
10,11,12]},
{[3,4,5,6], [4,5,6,7,8,9,5,6,7,8,9,10,6,7,8,9,10,11,7,8,9,10,11,12,8,
9,10,11,12,13]},
{[4,5,6,7], [5,6,7,8,9,10,6,7,8,9,10,11,7,8,9,10,11,12,8,9,10,11,12,
13,9,10,11,12,13,14]},
{[5,6,7,8], [6,7,8,9,10,11,7,8,9,10,11,12,8,9,10,11,12,13,9,10,11,12,
13,14,10,11,12,13,14,15]},
{[6,7,8,9], [7,8,9,10,11,12,8,9,10,11,12,13,9,10,11,12,13,14,10,11,12,
13,14,15,11,12,13,14,15,16]},
{[7,8,9,10], [8,9,10,11,12,13,9,10,11,12,13,14,10,11,12,13,14,15,11,
12,13,14,15,16,12,13,14,15,16,17]}
/group1/dset4 Dataset {5}
Data:
(0) {0, 3}, {1, 4}, {2, 5}, {3, 6}, {4, 7}
{0, 3}, {1, 4}, {2, 5}, {3, 6}, {4, 7}
/group1/type3 Type
/group2 Group
/group2/dset5 Dataset {5}
Data:
(0) {0, 0}, {1, 0.1}, {2, 0.2}, {3, 0.3}, {4, 0.4}
{0, 0}, {1, 0.1}, {2, 0.2}, {3, 0.3}, {4, 0.4}
/type1 Type
/type2 Type
+1 -1
View File
@@ -2,7 +2,7 @@ Opened "tdatareg.h5" with sec2 driver.
Dataset1 Dataset {4/4}
Location: 1:1284
Links: 1
Storage: information not available
Storage: reference information not available
Type: dataset region reference
Dataset2 Dataset {10/10, 10/10}
Location: 1:744
+1 -1
View File
@@ -2,7 +2,7 @@ Opened "tdatareg.h5" with sec2 driver.
Dataset1 Dataset {4/4}
Location: 1:1284
Links: 1
Storage: information not available
Storage: reference information not available
Type: dataset region reference
Dataset2 Dataset {10/10, 10/10}
Location: 1:744
+27 -30
View File
@@ -1,36 +1,33 @@
dset_btree Dataset {20/200, 10/100}
Data:
(0,0) 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1,
(2,2) 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3,
(4,4) 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5,
(6,6) 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7,
(8,8) 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
(11,0) 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1,
(13,2) 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3,
(15,4) 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5,
(17,6) 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7,
(19,8) 8, 9
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3,
4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7,
8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1,
2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5,
6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3,
4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7,
8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1,
2, 3, 4, 5, 6, 7, 8, 9
dset_filter Dataset {20, 10}
Data:
(0,0) 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1,
(2,2) 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3,
(4,4) 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5,
(6,6) 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7,
(8,8) 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
(11,0) 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1,
(13,2) 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3,
(15,4) 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5,
(17,6) 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7,
(19,8) 8, 9
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3,
4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7,
8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1,
2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5,
6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3,
4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7,
8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1,
2, 3, 4, 5, 6, 7, 8, 9
dset_fixed Dataset {20, 10}
Data:
(0,0) 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1,
(2,2) 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3,
(4,4) 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5,
(6,6) 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7,
(8,8) 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
(11,0) 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1,
(13,2) 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3,
(15,4) 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5,
(17,6) 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7,
(19,8) 8, 9
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3,
4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7,
8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1,
2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5,
6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3,
4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7,
8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1,
2, 3, 4, 5, 6, 7, 8, 9
+5 -5
View File
@@ -1,15 +1,15 @@
Dataset1.0 Dataset {4}
Data:
(0) (), (), (), ()
(), (), (), ()
Dataset2.0 Dataset {4}
Data:
(0) 0, 0, 0, 0
0, 0, 0, 0
Dataset3.0 Dataset {4}
Data:
(0) 0, 0, 0, 0
0, 0, 0, 0
Dataset4.0 Dataset {4}
Data:
(0) [0,0,0,0], [0,0,0,0], [0,0,0,0], [0,0,0,0]
[0,0,0,0], [0,0,0,0], [0,0,0,0], [0,0,0,0]
Dataset5.0 Dataset {4}
Data:
(0) {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}
{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}
-1
View File
@@ -2,6 +2,5 @@ Opened "tgrpnullspace.h5" with sec2 driver.
g1 Group
Attribute: attr null
Type: 32-bit little-endian unsigned integer
Location: 1:800
Links: 1
+8 -8
View File
@@ -1,11 +1,11 @@
/ Group
/ArrayOfStructures Dataset {10}
Data:
(0) {0, 0, 1, {"A", [-100,100]}}, {1, 1, 0.5, {"B", [-100,100]}},
(2) {2, 4, 0.333333333333333, {"C", [-100,100]}},
(3) {3, 9, 0.25, {"D", [-100,100]}}, {4, 16, 0.2, {"E", [-100,100]}},
(5) {5, 25, 0.166666666666667, {"F", [-100,100]}},
(6) {6, 36, 0.142857142857143, {"G", [-100,100]}},
(7) {7, 49, 0.125, {"H", [-100,100]}},
(8) {8, 64, 0.111111111111111, {"I", [-100,100]}},
(9) {9, 81, 0.1, {"J", [-100,100]}}
{0, 0, 1, {"A", [-100,100]}}, {1, 1, 0.5, {"B", [-100,100]}},
{2, 4, 0.333333333333333, {"C", [-100,100]}},
{3, 9, 0.25, {"D", [-100,100]}}, {4, 16, 0.2, {"E", [-100,100]}},
{5, 25, 0.166666666666667, {"F", [-100,100]}},
{6, 36, 0.142857142857143, {"G", [-100,100]}},
{7, 49, 0.125, {"H", [-100,100]}},
{8, 64, 0.111111111111111, {"I", [-100,100]}},
{9, 81, 0.1, {"J", [-100,100]}}
+20 -20
View File
@@ -1,23 +1,23 @@
/ Group
/ArrayOfStructures Dataset {10}
Data:
(0) {a_name=0, b_name=0, c_name=1, d_name={char_name="A",
(0) array_name=[-100,100]}},
(1) {a_name=1, b_name=1, c_name=0.5, d_name={char_name="B",
(1) array_name=[-100,100]}},
(2) {a_name=2, b_name=4, c_name=0.333333333333333,
(2) d_name={char_name="C", array_name=[-100,100]}},
(3) {a_name=3, b_name=9, c_name=0.25, d_name={char_name="D",
(3) array_name=[-100,100]}},
(4) {a_name=4, b_name=16, c_name=0.2, d_name={char_name="E",
(4) array_name=[-100,100]}},
(5) {a_name=5, b_name=25, c_name=0.166666666666667,
(5) d_name={char_name="F", array_name=[-100,100]}},
(6) {a_name=6, b_name=36, c_name=0.142857142857143,
(6) d_name={char_name="G", array_name=[-100,100]}},
(7) {a_name=7, b_name=49, c_name=0.125, d_name={char_name="H",
(7) array_name=[-100,100]}},
(8) {a_name=8, b_name=64, c_name=0.111111111111111,
(8) d_name={char_name="I", array_name=[-100,100]}},
(9) {a_name=9, b_name=81, c_name=0.1, d_name={char_name="J",
(9) array_name=[-100,100]}}
{a_name=0, b_name=0, c_name=1, d_name={char_name="A",
array_name=[-100,100]}},
{a_name=1, b_name=1, c_name=0.5, d_name={char_name="B",
array_name=[-100,100]}},
{a_name=2, b_name=4, c_name=0.333333333333333, d_name={char_name="C",
array_name=[-100,100]}},
{a_name=3, b_name=9, c_name=0.25, d_name={char_name="D",
array_name=[-100,100]}},
{a_name=4, b_name=16, c_name=0.2, d_name={char_name="E",
array_name=[-100,100]}},
{a_name=5, b_name=25, c_name=0.166666666666667,
d_name={char_name="F", array_name=[-100,100]}},
{a_name=6, b_name=36, c_name=0.142857142857143,
d_name={char_name="G", array_name=[-100,100]}},
{a_name=7, b_name=49, c_name=0.125, d_name={char_name="H",
array_name=[-100,100]}},
{a_name=8, b_name=64, c_name=0.111111111111111,
d_name={char_name="I", array_name=[-100,100]}},
{a_name=9, b_name=81, c_name=0.1, d_name={char_name="J",
array_name=[-100,100]}}
+256 -32
View File
@@ -847,34 +847,146 @@ GROUP "/" {
DATATYPE H5T_REFERENCE { H5T_STD_REF_OBJECT }
DATASPACE SIMPLE { ( 2 ) / ( 2 ) }
DATA {
(0): DATASET 976 /dset , DATASET 976 /dset
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
}
}
ATTRIBUTE "reference2D" {
DATATYPE H5T_REFERENCE { H5T_STD_REF_OBJECT }
DATASPACE SIMPLE { ( 3, 2 ) / ( 3, 2 ) }
DATA {
(0,0): DATASET 976 /dset , DATASET 976 /dset ,
(1,0): DATASET 976 /dset , DATASET 976 /dset ,
(2,0): DATASET 976 /dset , DATASET 976 /dset
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
}
}
ATTRIBUTE "reference3D" {
DATATYPE H5T_REFERENCE { H5T_STD_REF_OBJECT }
DATASPACE SIMPLE { ( 4, 3, 2 ) / ( 4, 3, 2 ) }
DATA {
(0,0,0): DATASET 976 /dset , DATASET 976 /dset ,
(0,1,0): DATASET 976 /dset , DATASET 976 /dset ,
(0,2,0): DATASET 976 /dset , DATASET 976 /dset ,
(1,0,0): DATASET 976 /dset , DATASET 976 /dset ,
(1,1,0): DATASET 976 /dset , DATASET 976 /dset ,
(1,2,0): DATASET 976 /dset , DATASET 976 /dset ,
(2,0,0): DATASET 976 /dset , DATASET 976 /dset ,
(2,1,0): DATASET 976 /dset , DATASET 976 /dset ,
(2,2,0): DATASET 976 /dset , DATASET 976 /dset ,
(3,0,0): DATASET 976 /dset , DATASET 976 /dset ,
(3,1,0): DATASET 976 /dset , DATASET 976 /dset ,
(3,2,0): DATASET 976 /dset , DATASET 976 /dset
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
}
}
ATTRIBUTE "string" {
@@ -1805,34 +1917,146 @@ GROUP "/" {
DATATYPE H5T_REFERENCE { H5T_STD_REF_OBJECT }
DATASPACE SIMPLE { ( 2 ) / ( 2 ) }
DATA {
(0): DATASET 976 /dset , DATASET 976 /dset
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
}
}
DATASET "reference2D" {
DATATYPE H5T_REFERENCE { H5T_STD_REF_OBJECT }
DATASPACE SIMPLE { ( 3, 2 ) / ( 3, 2 ) }
DATA {
(0,0): DATASET 976 /dset , DATASET 976 /dset ,
(1,0): DATASET 976 /dset , DATASET 976 /dset ,
(2,0): DATASET 976 /dset , DATASET 976 /dset
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
}
}
DATASET "reference3D" {
DATATYPE H5T_REFERENCE { H5T_STD_REF_OBJECT }
DATASPACE SIMPLE { ( 4, 3, 2 ) / ( 4, 3, 2 ) }
DATA {
(0,0,0): DATASET 976 /dset , DATASET 976 /dset ,
(0,1,0): DATASET 976 /dset , DATASET 976 /dset ,
(0,2,0): DATASET 976 /dset , DATASET 976 /dset ,
(1,0,0): DATASET 976 /dset , DATASET 976 /dset ,
(1,1,0): DATASET 976 /dset , DATASET 976 /dset ,
(1,2,0): DATASET 976 /dset , DATASET 976 /dset ,
(2,0,0): DATASET 976 /dset , DATASET 976 /dset ,
(2,1,0): DATASET 976 /dset , DATASET 976 /dset ,
(2,2,0): DATASET 976 /dset , DATASET 976 /dset ,
(3,0,0): DATASET 976 /dset , DATASET 976 /dset ,
(3,1,0): DATASET 976 /dset , DATASET 976 /dset ,
(3,2,0): DATASET 976 /dset , DATASET 976 /dset
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
DATASET tattr2.h5/dset
DATA {
(0): 0, 0
}
}
}
DATASET "string" {
+543 -586
View File
@@ -1,661 +1,618 @@
/ Group
/.DSL_METADATA Dataset {5919/Inf}
Data:
(0) 47, 32, 67, 79, 78, 84, 65, 73, 78, 69, 82, 10, 47, 46, 97, 116,
(16) 116, 114, 105, 98, 117, 116, 101, 115, 32, 67, 79, 78, 84, 65, 73,
(31) 78, 69, 82, 10, 47, 46, 97, 116, 116, 114, 105, 98, 117, 116, 101,
(46) 115, 47, 100, 97, 116, 97, 98, 97, 115, 101, 32, 67, 79, 78, 84,
(61) 65, 73, 78, 69, 82, 10, 47, 46, 97, 116, 116, 114, 105, 98, 117,
(76) 116, 101, 115, 47, 100, 97, 116, 97, 98, 97, 115, 101, 47, 46, 83,
(91) 65, 70, 95, 68, 98, 80, 114, 111, 112, 115, 32, 68, 65, 84, 65, 83,
(107) 69, 84, 32, 115, 116, 114, 117, 99, 116, 32, 83, 65, 70, 95, 68,
(122) 98, 80, 114, 111, 112, 115, 123, 105, 110, 116, 32, 109, 97, 103,
(136) 105, 99, 59, 99, 104, 97, 114, 32, 83, 70, 105, 108, 101, 68, 105,
(151) 114, 91, 49, 48, 50, 52, 93, 59, 99, 104, 97, 114, 32, 73, 109,
(166) 112, 111, 114, 116, 70, 105, 108, 101, 91, 49, 48, 50, 52, 93, 59,
(181) 105, 110, 116, 32, 112, 97, 114, 97, 108, 108, 101, 108, 59, 115,
(195) 116, 114, 117, 99, 116, 32, 83, 65, 70, 95, 86, 101, 114, 115,
(209) 105, 111, 110, 73, 110, 102, 111, 123, 105, 110, 116, 32, 118,
(222) 109, 97, 106, 111, 114, 59, 105, 110, 116, 32, 118, 109, 105, 110,
(236) 111, 114, 59, 105, 110, 116, 32, 114, 101, 108, 59, 99, 104, 97,
(250) 114, 32, 97, 110, 110, 111, 116, 91, 49, 48, 93, 59, 125, 115, 97,
(265) 102, 97, 112, 105, 59, 115, 116, 114, 117, 99, 116, 32, 83, 65,
(279) 70, 95, 86, 101, 114, 115, 105, 111, 110, 73, 110, 102, 111, 123,
(293) 105, 110, 116, 32, 118, 109, 97, 106, 111, 114, 59, 105, 110, 116,
(307) 32, 118, 109, 105, 110, 111, 114, 59, 105, 110, 116, 32, 114, 101,
(321) 108, 59, 99, 104, 97, 114, 32, 97, 110, 110, 111, 116, 91, 49, 48,
(336) 93, 59, 125, 115, 97, 102, 108, 105, 98, 59, 115, 116, 114, 117,
(350) 99, 116, 32, 83, 65, 70, 95, 86, 101, 114, 115, 105, 111, 110, 73,
(365) 110, 102, 111, 123, 105, 110, 116, 32, 118, 109, 97, 106, 111,
(378) 114, 59, 105, 110, 116, 32, 118, 109, 105, 110, 111, 114, 59, 105,
(392) 110, 116, 32, 114, 101, 108, 59, 99, 104, 97, 114, 32, 97, 110,
(406) 110, 111, 116, 91, 49, 48, 93, 59, 125, 118, 98, 116, 59, 115,
(420) 116, 114, 117, 99, 116, 32, 83, 65, 70, 95, 86, 101, 114, 115,
(434) 105, 111, 110, 73, 110, 102, 111, 123, 105, 110, 116, 32, 118,
(447) 109, 97, 106, 111, 114, 59, 105, 110, 116, 32, 118, 109, 105, 110,
(461) 111, 114, 59, 105, 110, 116, 32, 114, 101, 108, 59, 99, 104, 97,
(475) 114, 32, 97, 110, 110, 111, 116, 91, 49, 48, 93, 59, 125, 100,
(489) 115, 108, 59, 115, 116, 114, 117, 99, 116, 32, 83, 65, 70, 95, 86,
(504) 101, 114, 115, 105, 111, 110, 73, 110, 102, 111, 123, 105, 110,
(517) 116, 32, 118, 109, 97, 106, 111, 114, 59, 105, 110, 116, 32, 118,
(531) 109, 105, 110, 111, 114, 59, 105, 110, 116, 32, 114, 101, 108, 59,
(545) 99, 104, 97, 114, 32, 97, 110, 110, 111, 116, 91, 49, 48, 93, 59,
(560) 125, 104, 100, 102, 53, 59, 115, 116, 114, 117, 99, 116, 32, 83,
(574) 65, 70, 95, 86, 101, 114, 115, 105, 111, 110, 73, 110, 102, 111,
(588) 123, 105, 110, 116, 32, 118, 109, 97, 106, 111, 114, 59, 105, 110,
(602) 116, 32, 118, 109, 105, 110, 111, 114, 59, 105, 110, 116, 32, 114,
(616) 101, 108, 59, 99, 104, 97, 114, 32, 97, 110, 110, 111, 116, 91,
(630) 49, 48, 93, 59, 125, 109, 112, 105, 59, 105, 110, 116, 32, 68,
(644) 111, 84, 111, 99, 59, 105, 110, 116, 32, 82, 101, 97, 100, 79,
(658) 110, 108, 121, 59, 105, 110, 116, 32, 67, 108, 111, 98, 98, 101,
(672) 114, 59, 105, 110, 116, 32, 79, 83, 77, 111, 100, 101, 115, 59,
(686) 125, 59, 10, 47, 115, 115, 114, 101, 108, 45, 95, 48, 48, 48, 48,
(701) 32, 68, 65, 84, 65, 83, 69, 84, 32, 105, 110, 116, 59, 10, 47,
(716) 115, 115, 114, 101, 108, 45, 95, 48, 48, 48, 49, 32, 68, 65, 84,
(731) 65, 83, 69, 84, 32, 105, 110, 116, 59, 10, 47, 115, 115, 114, 101,
(746) 108, 45, 95, 48, 48, 48, 50, 32, 68, 65, 84, 65, 83, 69, 84, 32,
(762) 105, 110, 116, 59, 10, 47, 115, 115, 114, 101, 108, 45, 95, 48,
(776) 48, 48, 51, 32, 68, 65, 84, 65, 83, 69, 84, 32, 105, 110, 116, 59,
(792) 10, 47, 115, 115, 114, 101, 108, 45, 95, 48, 48, 48, 52, 32, 68,
(807) 65, 84, 65, 83, 69, 84, 32, 105, 110, 116, 59, 10, 47, 115, 115,
(822) 114, 101, 108, 45, 95, 48, 48, 48, 53, 32, 68, 65, 84, 65, 83, 69,
(838) 84, 32, 105, 110, 116, 59, 10, 47, 115, 115, 114, 101, 108, 45,
(852) 95, 48, 48, 48, 54, 32, 68, 65, 84, 65, 83, 69, 84, 32, 105, 110,
(868) 116, 59, 10, 47, 115, 115, 114, 101, 108, 45, 95, 48, 48, 48, 55,
(883) 32, 68, 65, 84, 65, 83, 69, 84, 32, 105, 110, 116, 59, 10, 47,
(898) 115, 115, 114, 101, 108, 45, 95, 48, 48, 48, 56, 32, 68, 65, 84,
(913) 65, 83, 69, 84, 32, 105, 110, 116, 59, 10, 47, 115, 115, 114, 101,
(928) 108, 45, 95, 48, 48, 48, 57, 32, 68, 65, 84, 65, 83, 69, 84, 32,
(944) 105, 110, 116, 59, 10, 47, 115, 115, 114, 101, 108, 45, 95, 48,
(958) 48, 49, 48, 32, 68, 65, 84, 65, 83, 69, 84, 32, 105, 110, 116, 59,
(974) 10, 47, 115, 115, 114, 101, 108, 45, 95, 48, 48, 49, 49, 32, 68,
(989) 65, 84, 65, 83, 69, 84, 32, 105, 110, 116, 59, 10, 47, 115, 115,
(1004) 114, 101, 108, 45, 95, 48, 48, 49, 50, 32, 68, 65, 84, 65, 83,
(1019) 69, 84, 32, 105, 110, 116, 59, 10, 47, 116, 111, 112, 111, 114,
(1033) 101, 108, 45, 95, 48, 48, 49, 55, 32, 68, 65, 84, 65, 83, 69, 84,
(1049) 32, 105, 110, 116, 59, 10, 47, 116, 111, 112, 111, 114, 101, 108,
(1063) 45, 95, 48, 48, 49, 56, 32, 68, 65, 84, 65, 83, 69, 84, 32, 105,
(1079) 110, 116, 59, 10, 47, 116, 111, 112, 111, 114, 101, 108, 45, 95,
(1093) 48, 48, 49, 57, 32, 68, 65, 84, 65, 83, 69, 84, 32, 105, 110,
(1108) 116, 59, 10, 47, 116, 111, 112, 111, 114, 101, 108, 45, 95, 48,
(1122) 48, 50, 48, 32, 68, 65, 84, 65, 83, 69, 84, 32, 105, 110, 116,
(1137) 59, 10, 47, 102, 105, 101, 108, 100, 45, 99, 111, 111, 114, 100,
(1151) 115, 95, 48, 48, 48, 50, 32, 68, 65, 84, 65, 83, 69, 84, 32, 102,
(1167) 108, 111, 97, 116, 59, 10, 47, 102, 105, 101, 108, 100, 45, 100,
(1181) 105, 115, 116, 114, 105, 98, 117, 116, 105, 111, 110, 95, 102,
(1194) 97, 99, 116, 111, 114, 115, 95, 48, 48, 48, 51, 32, 68, 65, 84,
(1209) 65, 83, 69, 84, 32, 102, 108, 111, 97, 116, 59, 10, 47, 102, 105,
(1224) 101, 108, 100, 45, 116, 101, 109, 112, 101, 114, 97, 116, 117,
(1237) 114, 101, 95, 48, 48, 48, 52, 32, 68, 65, 84, 65, 83, 69, 84, 32,
(1253) 102, 108, 111, 97, 116, 59, 10, 47, 102, 105, 101, 108, 100, 45,
(1267) 100, 105, 115, 112, 108, 97, 99, 101, 109, 101, 110, 116, 115,
(1280) 95, 48, 48, 48, 55, 32, 68, 65, 84, 65, 83, 69, 84, 32, 102, 108,
(1296) 111, 97, 116, 59, 10, 47, 102, 105, 101, 108, 100, 45, 115, 116,
(1310) 114, 101, 115, 115, 95, 48, 48, 49, 49, 32, 68, 65, 84, 65, 83,
(1325) 69, 84, 32, 102, 108, 111, 97, 116, 59, 10, 47, 102, 105, 101,
(1339) 108, 100, 45, 116, 101, 109, 112, 101, 114, 97, 116, 117, 114,
(1352) 101, 95, 48, 48, 49, 50, 32, 68, 65, 84, 65, 83, 69, 84, 32, 102,
(1368) 108, 111, 97, 116, 59, 10, 47, 102, 105, 101, 108, 100, 45, 112,
(1382) 114, 101, 115, 115, 117, 114, 101, 95, 48, 48, 49, 51, 32, 68,
(1396) 65, 84, 65, 83, 69, 84, 32, 102, 108, 111, 97, 116, 59, 10, 47,
(1411) 66, 108, 111, 98, 32, 68, 65, 84, 65, 83, 69, 84, 32, 115, 116,
(1426) 114, 117, 99, 116, 32, 66, 108, 111, 98, 123, 68, 83, 76, 95, 79,
(1441) 102, 102, 115, 101, 116, 32, 102, 105, 108, 101, 95, 105, 100,
(1454) 59, 68, 83, 76, 95, 79, 102, 102, 115, 101, 116, 32, 100, 97,
(1468) 116, 97, 115, 101, 116, 95, 105, 100, 59, 68, 83, 76, 95, 79,
(1482) 102, 102, 115, 101, 116, 32, 111, 102, 102, 115, 101, 116, 59,
(1495) 68, 83, 76, 95, 79, 102, 102, 115, 101, 116, 32, 115, 116, 114,
(1509) 105, 100, 101, 59, 68, 83, 76, 95, 79, 102, 102, 115, 101, 116,
(1523) 32, 99, 111, 117, 110, 116, 59, 68, 83, 76, 95, 79, 102, 102,
(1537) 115, 101, 116, 32, 98, 97, 115, 101, 95, 105, 100, 59, 68, 83,
(1551) 76, 95, 79, 102, 102, 115, 101, 116, 32, 110, 117, 109, 95, 114,
(1565) 101, 99, 115, 59, 125, 59, 10, 47, 73, 110, 100, 101, 120, 83,
(1579) 112, 101, 99, 32, 68, 65, 84, 65, 83, 69, 84, 32, 115, 116, 114,
(1594) 117, 99, 116, 32, 73, 110, 100, 101, 120, 83, 112, 101, 99, 123,
(1608) 105, 110, 116, 32, 110, 100, 105, 109, 115, 59, 105, 110, 116,
(1621) 32, 111, 114, 105, 103, 105, 110, 115, 91, 56, 93, 59, 105, 110,
(1635) 116, 32, 115, 105, 122, 101, 115, 91, 56, 93, 59, 105, 110, 116,
(1649) 32, 111, 114, 100, 101, 114, 91, 56, 93, 59, 101, 110, 117, 109,
(1663) 32, 73, 110, 100, 101, 120, 84, 121, 112, 101, 123, 86, 66, 84,
(1677) 95, 73, 78, 68, 69, 88, 95, 84, 89, 80, 69, 95, 67, 95, 79, 82,
(1693) 68, 69, 82, 61, 48, 44, 86, 66, 84, 95, 73, 78, 68, 69, 88, 95,
(1709) 84, 89, 80, 69, 95, 70, 95, 79, 82, 68, 69, 82, 61, 49, 44, 86,
(1725) 66, 84, 95, 73, 78, 68, 69, 88, 95, 84, 89, 80, 69, 95, 65, 78,
(1741) 89, 61, 45, 49, 44, 86, 66, 84, 95, 73, 78, 68, 69, 88, 95, 84,
(1757) 89, 80, 69, 95, 73, 78, 86, 65, 76, 73, 68, 61, 45, 50, 44, 86,
(1773) 66, 84, 95, 73, 78, 68, 69, 88, 95, 84, 89, 80, 69, 95, 78, 65,
(1789) 61, 45, 51, 44, 86, 66, 84, 95, 73, 78, 68, 69, 88, 95, 84, 89,
(1805) 80, 69, 95, 85, 78, 75, 78, 79, 87, 78, 61, 45, 52, 125, 105,
(1820) 110, 100, 101, 120, 95, 116, 121, 112, 101, 59, 68, 83, 76, 95,
(1834) 79, 102, 102, 115, 101, 116, 32, 98, 97, 115, 101, 95, 105, 100,
(1848) 59, 68, 83, 76, 95, 79, 102, 102, 115, 101, 116, 32, 110, 117,
(1862) 109, 95, 114, 101, 99, 115, 59, 125, 59, 10, 47, 67, 97, 116, 32,
(1877) 68, 65, 84, 65, 83, 69, 84, 32, 115, 116, 114, 117, 99, 116, 32,
(1892) 67, 97, 116, 123, 99, 104, 97, 114, 32, 110, 97, 109, 101, 91,
(1906) 54, 52, 93, 59, 101, 110, 117, 109, 32, 82, 111, 108, 101, 123,
(1920) 86, 66, 84, 95, 82, 79, 76, 69, 95, 84, 79, 80, 79, 61, 48, 44,
(1936) 86, 66, 84, 95, 82, 79, 76, 69, 95, 66, 78, 68, 61, 49, 44, 86,
(1952) 66, 84, 95, 82, 79, 76, 69, 95, 80, 82, 79, 67, 61, 50, 44, 86,
(1968) 66, 84, 95, 82, 79, 76, 69, 95, 68, 79, 77, 78, 61, 51, 44, 86,
(1984) 66, 84, 95, 82, 79, 76, 69, 95, 66, 76, 79, 67, 75, 61, 52, 44,
(2000) 86, 66, 84, 95, 82, 79, 76, 69, 95, 65, 83, 83, 89, 61, 53, 44,
(2016) 86, 66, 84, 95, 82, 79, 76, 69, 95, 77, 65, 84, 61, 54, 44, 86,
(2032) 66, 84, 95, 82, 79, 76, 69, 95, 88, 80, 82, 79, 68, 61, 55, 44,
(2048) 86, 66, 84, 95, 82, 79, 76, 69, 95, 85, 83, 69, 82, 68, 61, 56,
(2064) 44, 86, 66, 84, 95, 82, 79, 76, 69, 95, 65, 78, 89, 61, 45, 49,
(2080) 44, 86, 66, 84, 95, 82, 79, 76, 69, 95, 73, 78, 86, 65, 76, 73,
(2096) 68, 61, 45, 50, 44, 86, 66, 84, 95, 82, 79, 76, 69, 95, 78, 65,
(2112) 61, 45, 51, 44, 86, 66, 84, 95, 82, 79, 76, 69, 95, 85, 78, 75,
(2128) 78, 79, 87, 78, 61, 45, 52, 125, 114, 111, 108, 101, 59, 105,
(2142) 110, 116, 32, 116, 100, 105, 109, 59, 68, 83, 76, 95, 79, 102,
(2156) 102, 115, 101, 116, 32, 98, 97, 115, 101, 95, 105, 100, 59, 68,
(2170) 83, 76, 95, 79, 102, 102, 115, 101, 116, 32, 110, 117, 109, 95,
(2184) 114, 101, 99, 115, 59, 125, 59, 10, 47, 83, 101, 116, 32, 68, 65,
(2199) 84, 65, 83, 69, 84, 32, 115, 116, 114, 117, 99, 116, 32, 83, 101,
(2214) 116, 123, 105, 110, 116, 32, 117, 115, 101, 114, 95, 105, 100,
(2227) 59, 99, 104, 97, 114, 32, 110, 97, 109, 101, 91, 54, 52, 93, 59,
(2242) 105, 110, 116, 32, 116, 100, 105, 109, 59, 101, 110, 117, 109,
(2255) 32, 83, 105, 108, 82, 111, 108, 101, 123, 86, 66, 84, 95, 83, 82,
(2270) 79, 76, 69, 95, 84, 73, 77, 69, 61, 48, 44, 86, 66, 84, 95, 83,
(2286) 82, 79, 76, 69, 95, 83, 80, 65, 67, 69, 61, 49, 44, 86, 66, 84,
(2302) 95, 83, 82, 79, 76, 69, 95, 83, 84, 65, 84, 69, 61, 50, 44, 86,
(2318) 66, 84, 95, 83, 82, 79, 76, 69, 95, 80, 65, 82, 65, 77, 61, 51,
(2334) 44, 86, 66, 84, 95, 83, 82, 79, 76, 69, 95, 67, 84, 89, 80, 69,
(2350) 61, 52, 44, 86, 66, 84, 95, 83, 82, 79, 76, 69, 95, 65, 84, 89,
(2366) 80, 69, 61, 53, 44, 86, 66, 84, 95, 83, 82, 79, 76, 69, 95, 85,
(2382) 83, 69, 82, 68, 61, 54, 44, 86, 66, 84, 95, 83, 82, 79, 76, 69,
(2398) 95, 65, 78, 89, 61, 45, 49, 44, 86, 66, 84, 95, 83, 82, 79, 76,
(2414) 69, 95, 73, 78, 86, 65, 76, 73, 68, 61, 45, 50, 44, 86, 66, 84,
(2430) 95, 83, 82, 79, 76, 69, 95, 78, 65, 61, 45, 51, 44, 86, 66, 84,
(2446) 95, 83, 82, 79, 76, 69, 95, 85, 78, 75, 78, 79, 87, 78, 61, 45,
(2462) 52, 125, 115, 114, 111, 108, 101, 59, 68, 83, 76, 95, 79, 102,
(2476) 102, 115, 101, 116, 32, 99, 111, 108, 108, 95, 105, 100, 115, 91,
(2490) 49, 54, 93, 59, 105, 110, 116, 32, 105, 115, 95, 116, 111, 112,
(2504) 59, 105, 110, 116, 32, 105, 115, 95, 101, 120, 116, 101, 110,
(2517) 100, 105, 98, 108, 101, 59, 68, 83, 76, 95, 79, 102, 102, 115,
(2531) 101, 116, 32, 100, 102, 108, 116, 95, 99, 111, 111, 114, 100,
(2544) 102, 108, 100, 95, 105, 100, 59, 68, 83, 76, 95, 79, 102, 102,
(2558) 115, 101, 116, 32, 98, 110, 100, 95, 115, 101, 116, 95, 105, 100,
(2572) 59, 68, 83, 76, 95, 79, 102, 102, 115, 101, 116, 32, 98, 97, 115,
(2587) 101, 95, 105, 100, 59, 68, 83, 76, 95, 79, 102, 102, 115, 101,
(2601) 116, 32, 110, 117, 109, 95, 114, 101, 99, 115, 59, 125, 59, 10,
(2615) 47, 67, 111, 108, 108, 101, 99, 116, 105, 111, 110, 32, 68, 65,
(2629) 84, 65, 83, 69, 84, 32, 115, 116, 114, 117, 99, 116, 32, 67, 111,
(2644) 108, 108, 101, 99, 116, 105, 111, 110, 123, 68, 83, 76, 95, 79,
(2658) 102, 102, 115, 101, 116, 32, 99, 111, 110, 116, 97, 105, 110,
(2671) 105, 110, 103, 95, 115, 101, 116, 95, 105, 100, 59, 68, 83, 76,
(2685) 95, 79, 102, 102, 115, 101, 116, 32, 99, 97, 116, 95, 105, 100,
(2699) 59, 101, 110, 117, 109, 32, 67, 101, 108, 108, 84, 121, 112, 101,
(2713) 123, 86, 66, 84, 95, 67, 69, 76, 76, 95, 84, 89, 80, 69, 95, 78,
(2729) 79, 78, 69, 61, 48, 44, 86, 66, 84, 95, 67, 69, 76, 76, 95, 84,
(2745) 89, 80, 69, 95, 80, 79, 73, 78, 84, 61, 49, 44, 86, 66, 84, 95,
(2761) 67, 69, 76, 76, 95, 84, 89, 80, 69, 95, 76, 73, 78, 69, 61, 50,
(2777) 44, 86, 66, 84, 95, 67, 69, 76, 76, 95, 84, 89, 80, 69, 95, 84,
(2793) 82, 73, 61, 51, 44, 86, 66, 84, 95, 67, 69, 76, 76, 95, 84, 89,
(2809) 80, 69, 95, 81, 85, 65, 68, 61, 52, 44, 86, 66, 84, 95, 67, 69,
(2825) 76, 76, 95, 84, 89, 80, 69, 95, 84, 69, 84, 61, 53, 44, 86, 66,
(2841) 84, 95, 67, 69, 76, 76, 95, 84, 89, 80, 69, 95, 80, 89, 82, 65,
(2857) 77, 73, 68, 61, 54, 44, 86, 66, 84, 95, 67, 69, 76, 76, 95, 84,
(2873) 89, 80, 69, 95, 80, 82, 73, 83, 77, 61, 55, 44, 86, 66, 84, 95,
(2889) 67, 69, 76, 76, 95, 84, 89, 80, 69, 95, 72, 69, 88, 61, 56, 44,
(2905) 86, 66, 84, 95, 67, 69, 76, 76, 95, 84, 89, 80, 69, 95, 77, 73,
(2921) 88, 69, 68, 61, 57, 44, 86, 66, 84, 95, 67, 69, 76, 76, 95, 84,
(2937) 89, 80, 69, 95, 65, 82, 66, 61, 49, 48, 44, 86, 66, 84, 95, 67,
(2953) 69, 76, 76, 95, 84, 89, 80, 69, 95, 49, 66, 65, 76, 76, 61, 49,
(2969) 49, 44, 86, 66, 84, 95, 67, 69, 76, 76, 95, 84, 89, 80, 69, 95,
(2985) 50, 66, 65, 76, 76, 61, 49, 50, 44, 86, 66, 84, 95, 67, 69, 76,
(3001) 76, 95, 84, 89, 80, 69, 95, 51, 66, 65, 76, 76, 61, 49, 51, 44,
(3017) 86, 66, 84, 95, 67, 69, 76, 76, 95, 84, 89, 80, 69, 95, 49, 83,
(3033) 72, 69, 76, 76, 61, 49, 52, 44, 86, 66, 84, 95, 67, 69, 76, 76,
(3049) 95, 84, 89, 80, 69, 95, 50, 83, 72, 69, 76, 76, 61, 49, 53, 44,
(3065) 86, 66, 84, 95, 67, 69, 76, 76, 95, 84, 89, 80, 69, 95, 65, 78,
(3081) 89, 61, 45, 49, 44, 86, 66, 84, 95, 67, 69, 76, 76, 95, 84, 89,
(3097) 80, 69, 95, 73, 78, 86, 65, 76, 73, 68, 61, 45, 50, 44, 86, 66,
(3113) 84, 95, 67, 69, 76, 76, 95, 84, 89, 80, 69, 95, 78, 65, 61, 45,
(3129) 51, 44, 86, 66, 84, 95, 67, 69, 76, 76, 95, 84, 89, 80, 69, 95,
(3145) 85, 78, 75, 78, 79, 87, 78, 61, 45, 52, 125, 99, 101, 108, 108,
(3160) 95, 116, 121, 112, 101, 59, 105, 110, 116, 32, 99, 111, 117, 110,
(3174) 116, 59, 68, 83, 76, 95, 79, 102, 102, 115, 101, 116, 32, 105,
(3188) 110, 100, 101, 120, 105, 110, 103, 95, 105, 100, 59, 105, 110,
(3201) 116, 32, 105, 115, 95, 100, 101, 99, 111, 109, 112, 59, 68, 83,
(3215) 76, 95, 79, 102, 102, 115, 101, 116, 32, 109, 101, 109, 98, 101,
(3229) 114, 115, 95, 98, 108, 111, 98, 95, 105, 100, 59, 68, 83, 76, 95,
(3244) 79, 102, 102, 115, 101, 116, 32, 98, 97, 115, 101, 95, 105, 100,
(3258) 59, 68, 83, 76, 95, 79, 102, 102, 115, 101, 116, 32, 110, 117,
(3272) 109, 95, 114, 101, 99, 115, 59, 125, 59, 10, 47, 82, 101, 108,
(3286) 97, 116, 105, 111, 110, 32, 68, 65, 84, 65, 83, 69, 84, 32, 115,
(3301) 116, 114, 117, 99, 116, 32, 82, 101, 108, 97, 116, 105, 111, 110,
(3315) 123, 68, 83, 76, 95, 79, 102, 102, 115, 101, 116, 32, 115, 117,
(3329) 98, 95, 105, 100, 59, 68, 83, 76, 95, 79, 102, 102, 115, 101,
(3343) 116, 32, 115, 117, 98, 95, 99, 97, 116, 95, 105, 100, 59, 68, 83,
(3358) 76, 95, 79, 102, 102, 115, 101, 116, 32, 115, 117, 98, 95, 100,
(3372) 101, 99, 111, 109, 112, 95, 99, 97, 116, 95, 105, 100, 59, 68,
(3386) 83, 76, 95, 79, 102, 102, 115, 101, 116, 32, 115, 117, 112, 95,
(3400) 105, 100, 59, 68, 83, 76, 95, 79, 102, 102, 115, 101, 116, 32,
(3414) 115, 117, 112, 95, 99, 97, 116, 95, 105, 100, 59, 68, 83, 76, 95,
(3429) 79, 102, 102, 115, 101, 116, 32, 115, 117, 112, 95, 100, 101, 99,
(3443) 111, 109, 112, 95, 99, 97, 116, 95, 105, 100, 59, 101, 110, 117,
(3457) 109, 32, 82, 101, 108, 75, 105, 110, 100, 123, 86, 66, 84, 95,
(3471) 82, 69, 76, 75, 73, 78, 68, 95, 83, 85, 66, 83, 69, 84, 61, 48,
(3487) 44, 86, 66, 84, 95, 82, 69, 76, 75, 73, 78, 68, 95, 83, 85, 80,
(3503) 83, 69, 84, 61, 49, 44, 86, 66, 84, 95, 82, 69, 76, 75, 73, 78,
(3519) 68, 95, 66, 79, 85, 78, 68, 61, 50, 44, 86, 66, 84, 95, 82, 69,
(3535) 76, 75, 73, 78, 68, 95, 80, 69, 82, 77, 85, 84, 69, 61, 51, 44,
(3551) 86, 66, 84, 95, 82, 69, 76, 75, 73, 78, 68, 95, 78, 69, 73, 71,
(3567) 72, 66, 79, 82, 61, 52, 44, 86, 66, 84, 95, 82, 69, 76, 75, 73,
(3583) 78, 68, 95, 67, 79, 80, 89, 61, 53, 44, 86, 66, 84, 95, 82, 69,
(3599) 76, 75, 73, 78, 68, 95, 69, 81, 85, 65, 76, 61, 54, 44, 86, 66,
(3615) 84, 95, 82, 69, 76, 75, 73, 78, 68, 95, 65, 78, 89, 61, 45, 49,
(3631) 44, 86, 66, 84, 95, 82, 69, 76, 75, 73, 78, 68, 95, 73, 78, 86,
(3647) 65, 76, 73, 68, 61, 45, 50, 44, 86, 66, 84, 95, 82, 69, 76, 75,
(3663) 73, 78, 68, 95, 78, 65, 61, 45, 51, 44, 86, 66, 84, 95, 82, 69,
(3679) 76, 75, 73, 78, 68, 95, 85, 78, 75, 78, 79, 87, 78, 61, 45, 52,
(3695) 125, 107, 105, 110, 100, 59, 101, 110, 117, 109, 32, 82, 101,
(3708) 108, 82, 101, 112, 123, 86, 66, 84, 95, 82, 69, 76, 82, 69, 80,
(3723) 95, 73, 68, 69, 78, 84, 73, 84, 89, 61, 48, 44, 86, 66, 84, 95,
(3739) 82, 69, 76, 82, 69, 80, 95, 72, 76, 73, 83, 84, 61, 49, 44, 86,
(3755) 66, 84, 95, 82, 69, 76, 82, 69, 80, 95, 84, 76, 73, 83, 84, 61,
(3771) 50, 44, 86, 66, 84, 95, 82, 69, 76, 82, 69, 80, 95, 84, 76, 73,
(3787) 83, 84, 95, 49, 61, 51, 44, 86, 66, 84, 95, 82, 69, 76, 82, 69,
(3803) 80, 95, 69, 76, 73, 83, 84, 61, 52, 44, 86, 66, 84, 95, 82, 69,
(3819) 76, 82, 69, 80, 95, 83, 84, 82, 85, 67, 84, 85, 82, 69, 68, 61,
(3835) 53, 44, 86, 66, 84, 95, 82, 69, 76, 82, 69, 80, 95, 85, 78, 83,
(3851) 84, 82, 85, 67, 84, 85, 82, 69, 68, 61, 54, 44, 86, 66, 84, 95,
(3867) 82, 69, 76, 82, 69, 80, 95, 65, 82, 66, 73, 84, 82, 65, 82, 89,
(3883) 95, 82, 61, 55, 44, 86, 66, 84, 95, 82, 69, 76, 82, 69, 80, 95,
(3899) 65, 82, 66, 73, 84, 82, 65, 82, 89, 95, 68, 82, 61, 56, 44, 86,
(3915) 66, 84, 95, 82, 69, 76, 82, 69, 80, 95, 65, 78, 89, 61, 45, 49,
(3931) 44, 86, 66, 84, 95, 82, 69, 76, 82, 69, 80, 95, 73, 78, 86, 65,
(3947) 76, 73, 68, 61, 45, 50, 44, 86, 66, 84, 95, 82, 69, 76, 82, 69,
(3963) 80, 95, 78, 65, 61, 45, 51, 44, 86, 66, 84, 95, 82, 69, 76, 82,
(3979) 69, 80, 95, 85, 78, 75, 78, 79, 87, 78, 61, 45, 52, 125, 114,
(3994) 101, 112, 95, 116, 121, 112, 101, 59, 68, 83, 76, 95, 79, 102,
(4008) 102, 115, 101, 116, 32, 100, 95, 98, 108, 111, 98, 95, 105, 100,
(4022) 59, 68, 83, 76, 95, 79, 102, 102, 115, 101, 116, 32, 114, 95, 98,
(4037) 108, 111, 98, 95, 105, 100, 59, 68, 83, 76, 95, 79, 102, 102,
(4051) 115, 101, 116, 32, 98, 97, 115, 101, 95, 105, 100, 59, 68, 83,
(4065) 76, 95, 79, 102, 102, 115, 101, 116, 32, 110, 117, 109, 95, 114,
(4079) 101, 99, 115, 59, 125, 59, 10, 47, 70, 105, 101, 108, 100, 84,
(4093) 109, 112, 108, 32, 68, 65, 84, 65, 83, 69, 84, 32, 115, 116, 114,
(4108) 117, 99, 116, 32, 70, 105, 101, 108, 100, 84, 109, 112, 108, 123,
(4122) 99, 104, 97, 114, 32, 110, 97, 109, 101, 91, 54, 52, 93, 59, 68,
(4137) 83, 76, 95, 79, 102, 102, 115, 101, 116, 32, 98, 97, 115, 101,
(4151) 95, 115, 112, 97, 99, 101, 95, 105, 100, 59, 101, 110, 117, 109,
(4165) 32, 65, 108, 103, 101, 98, 114, 97, 105, 99, 84, 121, 112, 101,
(4179) 123, 86, 66, 84, 95, 65, 76, 71, 69, 66, 82, 65, 73, 67, 95, 84,
(4195) 89, 80, 69, 95, 67, 79, 78, 83, 84, 65, 78, 84, 61, 48, 44, 86,
(4211) 66, 84, 95, 65, 76, 71, 69, 66, 82, 65, 73, 67, 95, 84, 89, 80,
(4227) 69, 95, 67, 79, 77, 80, 79, 78, 69, 78, 84, 61, 49, 44, 86, 66,
(4243) 84, 95, 65, 76, 71, 69, 66, 82, 65, 73, 67, 95, 84, 89, 80, 69,
(4259) 95, 83, 67, 65, 76, 65, 82, 61, 50, 44, 86, 66, 84, 95, 65, 76,
(4275) 71, 69, 66, 82, 65, 73, 67, 95, 84, 89, 80, 69, 95, 86, 69, 67,
(4291) 84, 79, 82, 61, 51, 44, 86, 66, 84, 95, 65, 76, 71, 69, 66, 82,
(4307) 65, 73, 67, 95, 84, 89, 80, 69, 95, 84, 69, 78, 83, 79, 82, 61,
(4323) 52, 44, 86, 66, 84, 95, 65, 76, 71, 69, 66, 82, 65, 73, 67, 95,
(4339) 84, 89, 80, 69, 95, 83, 89, 77, 95, 84, 69, 78, 83, 79, 82, 61,
(4355) 53, 44, 86, 66, 84, 95, 65, 76, 71, 69, 66, 82, 65, 73, 67, 95,
(4371) 84, 89, 80, 69, 95, 70, 73, 69, 76, 68, 61, 54, 44, 86, 66, 84,
(4387) 95, 65, 76, 71, 69, 66, 82, 65, 73, 67, 95, 84, 89, 80, 69, 95,
(4403) 83, 84, 65, 84, 69, 61, 55, 44, 86, 66, 84, 95, 65, 76, 71, 69,
(4419) 66, 82, 65, 73, 67, 95, 84, 89, 80, 69, 95, 84, 85, 80, 76, 69,
(4435) 61, 56, 44, 86, 66, 84, 95, 65, 76, 71, 69, 66, 82, 65, 73, 67,
(4451) 95, 84, 89, 80, 69, 95, 65, 78, 89, 61, 45, 49, 44, 86, 66, 84,
(4467) 95, 65, 76, 71, 69, 66, 82, 65, 73, 67, 95, 84, 89, 80, 69, 95,
(4483) 73, 78, 86, 65, 76, 73, 68, 61, 45, 50, 44, 86, 66, 84, 95, 65,
(4499) 76, 71, 69, 66, 82, 65, 73, 67, 95, 84, 89, 80, 69, 95, 78, 65,
(4515) 61, 45, 51, 44, 86, 66, 84, 95, 65, 76, 71, 69, 66, 82, 65, 73,
(4531) 67, 95, 84, 89, 80, 69, 95, 85, 78, 75, 78, 79, 87, 78, 61, 45,
(4547) 52, 125, 97, 108, 103, 95, 116, 121, 112, 101, 59, 101, 110, 117,
(4561) 109, 32, 66, 97, 115, 105, 115, 84, 121, 112, 101, 123, 86, 66,
(4575) 84, 95, 66, 65, 83, 73, 83, 95, 84, 89, 80, 69, 95, 85, 78, 73,
(4591) 84, 89, 61, 48, 44, 86, 66, 84, 95, 66, 65, 83, 73, 83, 95, 84,
(4607) 89, 80, 69, 95, 67, 65, 82, 84, 69, 83, 73, 65, 78, 61, 49, 44,
(4623) 86, 66, 84, 95, 66, 65, 83, 73, 83, 95, 84, 89, 80, 69, 95, 83,
(4639) 80, 72, 69, 82, 73, 67, 65, 76, 61, 50, 44, 86, 66, 84, 95, 66,
(4655) 65, 83, 73, 83, 95, 84, 89, 80, 69, 95, 67, 89, 76, 73, 78, 68,
(4671) 82, 73, 67, 65, 76, 61, 51, 44, 86, 66, 84, 95, 66, 65, 83, 73,
(4687) 83, 95, 84, 89, 80, 69, 95, 85, 80, 80, 69, 82, 95, 84, 82, 73,
(4703) 61, 52, 44, 86, 66, 84, 95, 66, 65, 83, 73, 83, 95, 84, 89, 80,
(4719) 69, 95, 70, 79, 85, 82, 73, 69, 82, 61, 53, 44, 86, 66, 84, 95,
(4735) 66, 65, 83, 73, 83, 95, 84, 89, 80, 69, 95, 86, 65, 82, 73, 65,
(4751) 66, 76, 69, 61, 54, 44, 86, 66, 84, 95, 66, 65, 83, 73, 83, 95,
(4767) 84, 89, 80, 69, 95, 65, 78, 89, 61, 45, 49, 44, 86, 66, 84, 95,
(4783) 66, 65, 83, 73, 83, 95, 84, 89, 80, 69, 95, 73, 78, 86, 65, 76,
(4799) 73, 68, 61, 45, 50, 44, 86, 66, 84, 95, 66, 65, 83, 73, 83, 95,
(4815) 84, 89, 80, 69, 95, 78, 65, 61, 45, 51, 44, 86, 66, 84, 95, 66,
(4831) 65, 83, 73, 83, 95, 84, 89, 80, 69, 95, 85, 78, 75, 78, 79, 87,
(4847) 78, 61, 45, 52, 125, 98, 97, 115, 105, 115, 59, 68, 83, 76, 95,
(4862) 79, 102, 102, 115, 101, 116, 32, 113, 117, 97, 110, 116, 105,
(4875) 116, 121, 95, 105, 100, 59, 105, 110, 116, 32, 110, 117, 109, 95,
(4889) 99, 111, 109, 112, 115, 59, 68, 83, 76, 95, 79, 102, 102, 115,
(4903) 101, 116, 32, 102, 116, 109, 112, 108, 95, 105, 100, 115, 95, 98,
(4917) 108, 111, 98, 95, 105, 100, 59, 68, 83, 76, 95, 79, 102, 102,
(4931) 115, 101, 116, 32, 98, 97, 115, 101, 95, 105, 100, 59, 68, 83,
(4945) 76, 95, 79, 102, 102, 115, 101, 116, 32, 110, 117, 109, 95, 114,
(4959) 101, 99, 115, 59, 125, 59, 10, 47, 70, 105, 101, 108, 100, 32,
(4973) 68, 65, 84, 65, 83, 69, 84, 32, 115, 116, 114, 117, 99, 116, 32,
(4988) 70, 105, 101, 108, 100, 123, 68, 83, 76, 95, 79, 102, 102, 115,
(5002) 101, 116, 32, 102, 116, 109, 112, 108, 95, 105, 100, 59, 99, 104,
(5016) 97, 114, 32, 110, 97, 109, 101, 91, 54, 52, 93, 59, 68, 83, 76,
(5031) 95, 79, 102, 102, 115, 101, 116, 32, 117, 110, 105, 116, 115, 95,
(5045) 105, 100, 59, 68, 83, 76, 95, 79, 102, 102, 115, 101, 116, 32,
(5059) 115, 116, 111, 114, 97, 103, 101, 95, 100, 101, 99, 111, 109,
(5072) 112, 95, 99, 97, 116, 95, 105, 100, 59, 101, 110, 117, 109, 32,
(5086) 73, 110, 116, 101, 114, 108, 101, 97, 118, 101, 123, 86, 66, 84,
(5100) 95, 73, 78, 84, 69, 82, 76, 69, 65, 86, 69, 95, 67, 79, 77, 80,
(5116) 79, 78, 69, 78, 84, 61, 48, 44, 86, 66, 84, 95, 73, 78, 84, 69,
(5132) 82, 76, 69, 65, 86, 69, 95, 86, 69, 67, 84, 79, 82, 61, 49, 44,
(5148) 86, 66, 84, 95, 73, 78, 84, 69, 82, 76, 69, 65, 86, 69, 95, 73,
(5164) 78, 68, 69, 80, 69, 78, 68, 69, 78, 84, 61, 50, 44, 86, 66, 84,
(5180) 95, 73, 78, 84, 69, 82, 76, 69, 65, 86, 69, 95, 78, 79, 78, 69,
(5196) 61, 51, 44, 86, 66, 84, 95, 73, 78, 84, 69, 82, 76, 69, 65, 86,
(5212) 69, 95, 65, 78, 89, 61, 45, 49, 44, 86, 66, 84, 95, 73, 78, 84,
(5228) 69, 82, 76, 69, 65, 86, 69, 95, 73, 78, 86, 65, 76, 73, 68, 61,
(5244) 45, 50, 44, 86, 66, 84, 95, 73, 78, 84, 69, 82, 76, 69, 65, 86,
(5260) 69, 95, 78, 65, 61, 45, 51, 44, 86, 66, 84, 95, 73, 78, 84, 69,
(5276) 82, 76, 69, 65, 86, 69, 95, 85, 78, 75, 78, 79, 87, 78, 61, 45,
(5292) 52, 125, 99, 111, 109, 112, 95, 105, 110, 116, 108, 118, 59, 68,
(5306) 83, 76, 95, 79, 102, 102, 115, 101, 116, 32, 105, 110, 100, 101,
(5320) 120, 105, 110, 103, 95, 105, 100, 59, 68, 83, 76, 95, 79, 102,
(5334) 102, 115, 101, 116, 32, 100, 111, 102, 95, 97, 115, 115, 111, 99,
(5348) 95, 99, 97, 116, 95, 105, 100, 59, 105, 110, 116, 32, 97, 115,
(5362) 115, 111, 99, 95, 114, 97, 116, 105, 111, 59, 68, 83, 76, 95, 79,
(5377) 102, 102, 115, 101, 116, 32, 101, 118, 97, 108, 95, 100, 101, 99,
(5391) 111, 109, 112, 95, 99, 97, 116, 95, 105, 100, 59, 101, 110, 117,
(5405) 109, 32, 69, 118, 97, 108, 70, 117, 110, 99, 123, 86, 66, 84, 95,
(5420) 69, 86, 65, 76, 95, 70, 85, 78, 67, 95, 67, 79, 78, 83, 84, 65,
(5436) 78, 84, 61, 48, 44, 86, 66, 84, 95, 69, 86, 65, 76, 95, 70, 85,
(5452) 78, 67, 95, 85, 78, 73, 70, 79, 82, 77, 61, 49, 44, 86, 66, 84,
(5468) 95, 69, 86, 65, 76, 95, 70, 85, 78, 67, 95, 80, 87, 67, 79, 78,
(5484) 83, 84, 61, 50, 44, 86, 66, 84, 95, 69, 86, 65, 76, 95, 70, 85,
(5500) 78, 67, 95, 80, 87, 76, 73, 78, 69, 65, 82, 61, 51, 44, 86, 66,
(5516) 84, 95, 69, 86, 65, 76, 95, 70, 85, 78, 67, 95, 65, 78, 89, 61,
(5532) 45, 49, 44, 86, 66, 84, 95, 69, 86, 65, 76, 95, 70, 85, 78, 67,
(5548) 95, 73, 78, 86, 65, 76, 73, 68, 61, 45, 50, 44, 86, 66, 84, 95,
(5564) 69, 86, 65, 76, 95, 70, 85, 78, 67, 95, 78, 65, 61, 45, 51, 44,
(5580) 86, 66, 84, 95, 69, 86, 65, 76, 95, 70, 85, 78, 67, 95, 85, 78,
(5596) 75, 78, 79, 87, 78, 61, 45, 52, 125, 101, 118, 97, 108, 95, 102,
(5611) 117, 110, 99, 59, 105, 110, 116, 32, 105, 115, 95, 104, 111, 109,
(5625) 111, 103, 101, 110, 101, 111, 117, 115, 59, 105, 110, 116, 32,
(5638) 105, 115, 95, 99, 111, 111, 114, 100, 95, 102, 105, 101, 108,
(5651) 100, 59, 68, 83, 76, 95, 79, 102, 102, 115, 101, 116, 32, 99,
(5665) 111, 109, 112, 95, 105, 100, 115, 95, 98, 108, 111, 98, 95, 105,
(5679) 100, 59, 68, 83, 76, 95, 79, 102, 102, 115, 101, 116, 32, 99,
(5693) 111, 109, 112, 95, 111, 114, 100, 101, 114, 95, 98, 108, 111, 98,
(5707) 95, 105, 100, 59, 68, 83, 76, 95, 79, 102, 102, 115, 101, 116,
(5721) 32, 118, 98, 97, 115, 105, 115, 95, 98, 108, 111, 98, 95, 105,
(5735) 100, 59, 68, 83, 76, 95, 79, 102, 102, 115, 101, 116, 32, 100,
(5749) 111, 102, 95, 98, 108, 111, 98, 95, 105, 100, 59, 68, 83, 76, 95,
(5764) 79, 102, 102, 115, 101, 116, 32, 98, 97, 115, 101, 95, 105, 100,
(5778) 59, 68, 83, 76, 95, 79, 102, 102, 115, 101, 116, 32, 110, 117,
(5792) 109, 95, 114, 101, 99, 115, 59, 125, 59, 10, 47, 109, 101, 116,
(5806) 97, 98, 108, 111, 98, 48, 48, 48, 48, 48, 46, 105, 110, 100, 101,
(5821) 120, 32, 68, 65, 84, 65, 83, 69, 84, 32, 115, 116, 114, 117, 99,
(5836) 116, 32, 73, 110, 100, 101, 120, 80, 97, 105, 114, 123, 68, 83,
(5850) 76, 95, 79, 102, 102, 115, 101, 116, 32, 105, 110, 100, 101, 120,
(5864) 59, 105, 110, 116, 32, 108, 101, 110, 103, 116, 104, 59, 125, 59,
(5878) 10, 47, 109, 101, 116, 97, 98, 108, 111, 98, 48, 48, 48, 48, 48,
(5893) 46, 98, 108, 111, 98, 32, 68, 65, 84, 65, 83, 69, 84, 32, 68, 83,
(5909) 76, 95, 79, 102, 102, 115, 101, 116, 59, 10
47, 32, 67, 79, 78, 84, 65, 73, 78, 69, 82, 10, 47, 46, 97, 116, 116,
114, 105, 98, 117, 116, 101, 115, 32, 67, 79, 78, 84, 65, 73, 78, 69,
82, 10, 47, 46, 97, 116, 116, 114, 105, 98, 117, 116, 101, 115, 47,
100, 97, 116, 97, 98, 97, 115, 101, 32, 67, 79, 78, 84, 65, 73, 78, 69,
82, 10, 47, 46, 97, 116, 116, 114, 105, 98, 117, 116, 101, 115, 47,
100, 97, 116, 97, 98, 97, 115, 101, 47, 46, 83, 65, 70, 95, 68, 98, 80,
114, 111, 112, 115, 32, 68, 65, 84, 65, 83, 69, 84, 32, 115, 116, 114,
117, 99, 116, 32, 83, 65, 70, 95, 68, 98, 80, 114, 111, 112, 115, 123,
105, 110, 116, 32, 109, 97, 103, 105, 99, 59, 99, 104, 97, 114, 32, 83,
70, 105, 108, 101, 68, 105, 114, 91, 49, 48, 50, 52, 93, 59, 99, 104,
97, 114, 32, 73, 109, 112, 111, 114, 116, 70, 105, 108, 101, 91, 49,
48, 50, 52, 93, 59, 105, 110, 116, 32, 112, 97, 114, 97, 108, 108, 101,
108, 59, 115, 116, 114, 117, 99, 116, 32, 83, 65, 70, 95, 86, 101, 114,
115, 105, 111, 110, 73, 110, 102, 111, 123, 105, 110, 116, 32, 118,
109, 97, 106, 111, 114, 59, 105, 110, 116, 32, 118, 109, 105, 110, 111,
114, 59, 105, 110, 116, 32, 114, 101, 108, 59, 99, 104, 97, 114, 32,
97, 110, 110, 111, 116, 91, 49, 48, 93, 59, 125, 115, 97, 102, 97, 112,
105, 59, 115, 116, 114, 117, 99, 116, 32, 83, 65, 70, 95, 86, 101, 114,
115, 105, 111, 110, 73, 110, 102, 111, 123, 105, 110, 116, 32, 118,
109, 97, 106, 111, 114, 59, 105, 110, 116, 32, 118, 109, 105, 110, 111,
114, 59, 105, 110, 116, 32, 114, 101, 108, 59, 99, 104, 97, 114, 32,
97, 110, 110, 111, 116, 91, 49, 48, 93, 59, 125, 115, 97, 102, 108,
105, 98, 59, 115, 116, 114, 117, 99, 116, 32, 83, 65, 70, 95, 86, 101,
114, 115, 105, 111, 110, 73, 110, 102, 111, 123, 105, 110, 116, 32,
118, 109, 97, 106, 111, 114, 59, 105, 110, 116, 32, 118, 109, 105, 110,
111, 114, 59, 105, 110, 116, 32, 114, 101, 108, 59, 99, 104, 97, 114,
32, 97, 110, 110, 111, 116, 91, 49, 48, 93, 59, 125, 118, 98, 116, 59,
115, 116, 114, 117, 99, 116, 32, 83, 65, 70, 95, 86, 101, 114, 115,
105, 111, 110, 73, 110, 102, 111, 123, 105, 110, 116, 32, 118, 109, 97,
106, 111, 114, 59, 105, 110, 116, 32, 118, 109, 105, 110, 111, 114, 59,
105, 110, 116, 32, 114, 101, 108, 59, 99, 104, 97, 114, 32, 97, 110,
110, 111, 116, 91, 49, 48, 93, 59, 125, 100, 115, 108, 59, 115, 116,
114, 117, 99, 116, 32, 83, 65, 70, 95, 86, 101, 114, 115, 105, 111,
110, 73, 110, 102, 111, 123, 105, 110, 116, 32, 118, 109, 97, 106, 111,
114, 59, 105, 110, 116, 32, 118, 109, 105, 110, 111, 114, 59, 105, 110,
116, 32, 114, 101, 108, 59, 99, 104, 97, 114, 32, 97, 110, 110, 111,
116, 91, 49, 48, 93, 59, 125, 104, 100, 102, 53, 59, 115, 116, 114,
117, 99, 116, 32, 83, 65, 70, 95, 86, 101, 114, 115, 105, 111, 110, 73,
110, 102, 111, 123, 105, 110, 116, 32, 118, 109, 97, 106, 111, 114, 59,
105, 110, 116, 32, 118, 109, 105, 110, 111, 114, 59, 105, 110, 116, 32,
114, 101, 108, 59, 99, 104, 97, 114, 32, 97, 110, 110, 111, 116, 91,
49, 48, 93, 59, 125, 109, 112, 105, 59, 105, 110, 116, 32, 68, 111, 84,
111, 99, 59, 105, 110, 116, 32, 82, 101, 97, 100, 79, 110, 108, 121,
59, 105, 110, 116, 32, 67, 108, 111, 98, 98, 101, 114, 59, 105, 110,
116, 32, 79, 83, 77, 111, 100, 101, 115, 59, 125, 59, 10, 47, 115, 115,
114, 101, 108, 45, 95, 48, 48, 48, 48, 32, 68, 65, 84, 65, 83, 69, 84,
32, 105, 110, 116, 59, 10, 47, 115, 115, 114, 101, 108, 45, 95, 48, 48,
48, 49, 32, 68, 65, 84, 65, 83, 69, 84, 32, 105, 110, 116, 59, 10, 47,
115, 115, 114, 101, 108, 45, 95, 48, 48, 48, 50, 32, 68, 65, 84, 65,
83, 69, 84, 32, 105, 110, 116, 59, 10, 47, 115, 115, 114, 101, 108, 45,
95, 48, 48, 48, 51, 32, 68, 65, 84, 65, 83, 69, 84, 32, 105, 110, 116,
59, 10, 47, 115, 115, 114, 101, 108, 45, 95, 48, 48, 48, 52, 32, 68,
65, 84, 65, 83, 69, 84, 32, 105, 110, 116, 59, 10, 47, 115, 115, 114,
101, 108, 45, 95, 48, 48, 48, 53, 32, 68, 65, 84, 65, 83, 69, 84, 32,
105, 110, 116, 59, 10, 47, 115, 115, 114, 101, 108, 45, 95, 48, 48, 48,
54, 32, 68, 65, 84, 65, 83, 69, 84, 32, 105, 110, 116, 59, 10, 47, 115,
115, 114, 101, 108, 45, 95, 48, 48, 48, 55, 32, 68, 65, 84, 65, 83, 69,
84, 32, 105, 110, 116, 59, 10, 47, 115, 115, 114, 101, 108, 45, 95, 48,
48, 48, 56, 32, 68, 65, 84, 65, 83, 69, 84, 32, 105, 110, 116, 59, 10,
47, 115, 115, 114, 101, 108, 45, 95, 48, 48, 48, 57, 32, 68, 65, 84,
65, 83, 69, 84, 32, 105, 110, 116, 59, 10, 47, 115, 115, 114, 101, 108,
45, 95, 48, 48, 49, 48, 32, 68, 65, 84, 65, 83, 69, 84, 32, 105, 110,
116, 59, 10, 47, 115, 115, 114, 101, 108, 45, 95, 48, 48, 49, 49, 32,
68, 65, 84, 65, 83, 69, 84, 32, 105, 110, 116, 59, 10, 47, 115, 115,
114, 101, 108, 45, 95, 48, 48, 49, 50, 32, 68, 65, 84, 65, 83, 69, 84,
32, 105, 110, 116, 59, 10, 47, 116, 111, 112, 111, 114, 101, 108, 45,
95, 48, 48, 49, 55, 32, 68, 65, 84, 65, 83, 69, 84, 32, 105, 110, 116,
59, 10, 47, 116, 111, 112, 111, 114, 101, 108, 45, 95, 48, 48, 49, 56,
32, 68, 65, 84, 65, 83, 69, 84, 32, 105, 110, 116, 59, 10, 47, 116,
111, 112, 111, 114, 101, 108, 45, 95, 48, 48, 49, 57, 32, 68, 65, 84,
65, 83, 69, 84, 32, 105, 110, 116, 59, 10, 47, 116, 111, 112, 111, 114,
101, 108, 45, 95, 48, 48, 50, 48, 32, 68, 65, 84, 65, 83, 69, 84, 32,
105, 110, 116, 59, 10, 47, 102, 105, 101, 108, 100, 45, 99, 111, 111,
114, 100, 115, 95, 48, 48, 48, 50, 32, 68, 65, 84, 65, 83, 69, 84, 32,
102, 108, 111, 97, 116, 59, 10, 47, 102, 105, 101, 108, 100, 45, 100,
105, 115, 116, 114, 105, 98, 117, 116, 105, 111, 110, 95, 102, 97, 99,
116, 111, 114, 115, 95, 48, 48, 48, 51, 32, 68, 65, 84, 65, 83, 69, 84,
32, 102, 108, 111, 97, 116, 59, 10, 47, 102, 105, 101, 108, 100, 45,
116, 101, 109, 112, 101, 114, 97, 116, 117, 114, 101, 95, 48, 48, 48,
52, 32, 68, 65, 84, 65, 83, 69, 84, 32, 102, 108, 111, 97, 116, 59, 10,
47, 102, 105, 101, 108, 100, 45, 100, 105, 115, 112, 108, 97, 99, 101,
109, 101, 110, 116, 115, 95, 48, 48, 48, 55, 32, 68, 65, 84, 65, 83,
69, 84, 32, 102, 108, 111, 97, 116, 59, 10, 47, 102, 105, 101, 108,
100, 45, 115, 116, 114, 101, 115, 115, 95, 48, 48, 49, 49, 32, 68, 65,
84, 65, 83, 69, 84, 32, 102, 108, 111, 97, 116, 59, 10, 47, 102, 105,
101, 108, 100, 45, 116, 101, 109, 112, 101, 114, 97, 116, 117, 114,
101, 95, 48, 48, 49, 50, 32, 68, 65, 84, 65, 83, 69, 84, 32, 102, 108,
111, 97, 116, 59, 10, 47, 102, 105, 101, 108, 100, 45, 112, 114, 101,
115, 115, 117, 114, 101, 95, 48, 48, 49, 51, 32, 68, 65, 84, 65, 83,
69, 84, 32, 102, 108, 111, 97, 116, 59, 10, 47, 66, 108, 111, 98, 32,
68, 65, 84, 65, 83, 69, 84, 32, 115, 116, 114, 117, 99, 116, 32, 66,
108, 111, 98, 123, 68, 83, 76, 95, 79, 102, 102, 115, 101, 116, 32,
102, 105, 108, 101, 95, 105, 100, 59, 68, 83, 76, 95, 79, 102, 102,
115, 101, 116, 32, 100, 97, 116, 97, 115, 101, 116, 95, 105, 100, 59,
68, 83, 76, 95, 79, 102, 102, 115, 101, 116, 32, 111, 102, 102, 115,
101, 116, 59, 68, 83, 76, 95, 79, 102, 102, 115, 101, 116, 32, 115,
116, 114, 105, 100, 101, 59, 68, 83, 76, 95, 79, 102, 102, 115, 101,
116, 32, 99, 111, 117, 110, 116, 59, 68, 83, 76, 95, 79, 102, 102, 115,
101, 116, 32, 98, 97, 115, 101, 95, 105, 100, 59, 68, 83, 76, 95, 79,
102, 102, 115, 101, 116, 32, 110, 117, 109, 95, 114, 101, 99, 115, 59,
125, 59, 10, 47, 73, 110, 100, 101, 120, 83, 112, 101, 99, 32, 68, 65,
84, 65, 83, 69, 84, 32, 115, 116, 114, 117, 99, 116, 32, 73, 110, 100,
101, 120, 83, 112, 101, 99, 123, 105, 110, 116, 32, 110, 100, 105, 109,
115, 59, 105, 110, 116, 32, 111, 114, 105, 103, 105, 110, 115, 91, 56,
93, 59, 105, 110, 116, 32, 115, 105, 122, 101, 115, 91, 56, 93, 59,
105, 110, 116, 32, 111, 114, 100, 101, 114, 91, 56, 93, 59, 101, 110,
117, 109, 32, 73, 110, 100, 101, 120, 84, 121, 112, 101, 123, 86, 66,
84, 95, 73, 78, 68, 69, 88, 95, 84, 89, 80, 69, 95, 67, 95, 79, 82, 68,
69, 82, 61, 48, 44, 86, 66, 84, 95, 73, 78, 68, 69, 88, 95, 84, 89, 80,
69, 95, 70, 95, 79, 82, 68, 69, 82, 61, 49, 44, 86, 66, 84, 95, 73, 78,
68, 69, 88, 95, 84, 89, 80, 69, 95, 65, 78, 89, 61, 45, 49, 44, 86, 66,
84, 95, 73, 78, 68, 69, 88, 95, 84, 89, 80, 69, 95, 73, 78, 86, 65, 76,
73, 68, 61, 45, 50, 44, 86, 66, 84, 95, 73, 78, 68, 69, 88, 95, 84, 89,
80, 69, 95, 78, 65, 61, 45, 51, 44, 86, 66, 84, 95, 73, 78, 68, 69, 88,
95, 84, 89, 80, 69, 95, 85, 78, 75, 78, 79, 87, 78, 61, 45, 52, 125,
105, 110, 100, 101, 120, 95, 116, 121, 112, 101, 59, 68, 83, 76, 95,
79, 102, 102, 115, 101, 116, 32, 98, 97, 115, 101, 95, 105, 100, 59,
68, 83, 76, 95, 79, 102, 102, 115, 101, 116, 32, 110, 117, 109, 95,
114, 101, 99, 115, 59, 125, 59, 10, 47, 67, 97, 116, 32, 68, 65, 84,
65, 83, 69, 84, 32, 115, 116, 114, 117, 99, 116, 32, 67, 97, 116, 123,
99, 104, 97, 114, 32, 110, 97, 109, 101, 91, 54, 52, 93, 59, 101, 110,
117, 109, 32, 82, 111, 108, 101, 123, 86, 66, 84, 95, 82, 79, 76, 69,
95, 84, 79, 80, 79, 61, 48, 44, 86, 66, 84, 95, 82, 79, 76, 69, 95, 66,
78, 68, 61, 49, 44, 86, 66, 84, 95, 82, 79, 76, 69, 95, 80, 82, 79, 67,
61, 50, 44, 86, 66, 84, 95, 82, 79, 76, 69, 95, 68, 79, 77, 78, 61, 51,
44, 86, 66, 84, 95, 82, 79, 76, 69, 95, 66, 76, 79, 67, 75, 61, 52, 44,
86, 66, 84, 95, 82, 79, 76, 69, 95, 65, 83, 83, 89, 61, 53, 44, 86, 66,
84, 95, 82, 79, 76, 69, 95, 77, 65, 84, 61, 54, 44, 86, 66, 84, 95, 82,
79, 76, 69, 95, 88, 80, 82, 79, 68, 61, 55, 44, 86, 66, 84, 95, 82, 79,
76, 69, 95, 85, 83, 69, 82, 68, 61, 56, 44, 86, 66, 84, 95, 82, 79, 76,
69, 95, 65, 78, 89, 61, 45, 49, 44, 86, 66, 84, 95, 82, 79, 76, 69, 95,
73, 78, 86, 65, 76, 73, 68, 61, 45, 50, 44, 86, 66, 84, 95, 82, 79, 76,
69, 95, 78, 65, 61, 45, 51, 44, 86, 66, 84, 95, 82, 79, 76, 69, 95, 85,
78, 75, 78, 79, 87, 78, 61, 45, 52, 125, 114, 111, 108, 101, 59, 105,
110, 116, 32, 116, 100, 105, 109, 59, 68, 83, 76, 95, 79, 102, 102,
115, 101, 116, 32, 98, 97, 115, 101, 95, 105, 100, 59, 68, 83, 76, 95,
79, 102, 102, 115, 101, 116, 32, 110, 117, 109, 95, 114, 101, 99, 115,
59, 125, 59, 10, 47, 83, 101, 116, 32, 68, 65, 84, 65, 83, 69, 84, 32,
115, 116, 114, 117, 99, 116, 32, 83, 101, 116, 123, 105, 110, 116, 32,
117, 115, 101, 114, 95, 105, 100, 59, 99, 104, 97, 114, 32, 110, 97,
109, 101, 91, 54, 52, 93, 59, 105, 110, 116, 32, 116, 100, 105, 109,
59, 101, 110, 117, 109, 32, 83, 105, 108, 82, 111, 108, 101, 123, 86,
66, 84, 95, 83, 82, 79, 76, 69, 95, 84, 73, 77, 69, 61, 48, 44, 86, 66,
84, 95, 83, 82, 79, 76, 69, 95, 83, 80, 65, 67, 69, 61, 49, 44, 86, 66,
84, 95, 83, 82, 79, 76, 69, 95, 83, 84, 65, 84, 69, 61, 50, 44, 86, 66,
84, 95, 83, 82, 79, 76, 69, 95, 80, 65, 82, 65, 77, 61, 51, 44, 86, 66,
84, 95, 83, 82, 79, 76, 69, 95, 67, 84, 89, 80, 69, 61, 52, 44, 86, 66,
84, 95, 83, 82, 79, 76, 69, 95, 65, 84, 89, 80, 69, 61, 53, 44, 86, 66,
84, 95, 83, 82, 79, 76, 69, 95, 85, 83, 69, 82, 68, 61, 54, 44, 86, 66,
84, 95, 83, 82, 79, 76, 69, 95, 65, 78, 89, 61, 45, 49, 44, 86, 66, 84,
95, 83, 82, 79, 76, 69, 95, 73, 78, 86, 65, 76, 73, 68, 61, 45, 50, 44,
86, 66, 84, 95, 83, 82, 79, 76, 69, 95, 78, 65, 61, 45, 51, 44, 86, 66,
84, 95, 83, 82, 79, 76, 69, 95, 85, 78, 75, 78, 79, 87, 78, 61, 45, 52,
125, 115, 114, 111, 108, 101, 59, 68, 83, 76, 95, 79, 102, 102, 115,
101, 116, 32, 99, 111, 108, 108, 95, 105, 100, 115, 91, 49, 54, 93, 59,
105, 110, 116, 32, 105, 115, 95, 116, 111, 112, 59, 105, 110, 116, 32,
105, 115, 95, 101, 120, 116, 101, 110, 100, 105, 98, 108, 101, 59, 68,
83, 76, 95, 79, 102, 102, 115, 101, 116, 32, 100, 102, 108, 116, 95,
99, 111, 111, 114, 100, 102, 108, 100, 95, 105, 100, 59, 68, 83, 76,
95, 79, 102, 102, 115, 101, 116, 32, 98, 110, 100, 95, 115, 101, 116,
95, 105, 100, 59, 68, 83, 76, 95, 79, 102, 102, 115, 101, 116, 32, 98,
97, 115, 101, 95, 105, 100, 59, 68, 83, 76, 95, 79, 102, 102, 115, 101,
116, 32, 110, 117, 109, 95, 114, 101, 99, 115, 59, 125, 59, 10, 47, 67,
111, 108, 108, 101, 99, 116, 105, 111, 110, 32, 68, 65, 84, 65, 83, 69,
84, 32, 115, 116, 114, 117, 99, 116, 32, 67, 111, 108, 108, 101, 99,
116, 105, 111, 110, 123, 68, 83, 76, 95, 79, 102, 102, 115, 101, 116,
32, 99, 111, 110, 116, 97, 105, 110, 105, 110, 103, 95, 115, 101, 116,
95, 105, 100, 59, 68, 83, 76, 95, 79, 102, 102, 115, 101, 116, 32, 99,
97, 116, 95, 105, 100, 59, 101, 110, 117, 109, 32, 67, 101, 108, 108,
84, 121, 112, 101, 123, 86, 66, 84, 95, 67, 69, 76, 76, 95, 84, 89, 80,
69, 95, 78, 79, 78, 69, 61, 48, 44, 86, 66, 84, 95, 67, 69, 76, 76, 95,
84, 89, 80, 69, 95, 80, 79, 73, 78, 84, 61, 49, 44, 86, 66, 84, 95, 67,
69, 76, 76, 95, 84, 89, 80, 69, 95, 76, 73, 78, 69, 61, 50, 44, 86, 66,
84, 95, 67, 69, 76, 76, 95, 84, 89, 80, 69, 95, 84, 82, 73, 61, 51, 44,
86, 66, 84, 95, 67, 69, 76, 76, 95, 84, 89, 80, 69, 95, 81, 85, 65, 68,
61, 52, 44, 86, 66, 84, 95, 67, 69, 76, 76, 95, 84, 89, 80, 69, 95, 84,
69, 84, 61, 53, 44, 86, 66, 84, 95, 67, 69, 76, 76, 95, 84, 89, 80, 69,
95, 80, 89, 82, 65, 77, 73, 68, 61, 54, 44, 86, 66, 84, 95, 67, 69, 76,
76, 95, 84, 89, 80, 69, 95, 80, 82, 73, 83, 77, 61, 55, 44, 86, 66, 84,
95, 67, 69, 76, 76, 95, 84, 89, 80, 69, 95, 72, 69, 88, 61, 56, 44, 86,
66, 84, 95, 67, 69, 76, 76, 95, 84, 89, 80, 69, 95, 77, 73, 88, 69, 68,
61, 57, 44, 86, 66, 84, 95, 67, 69, 76, 76, 95, 84, 89, 80, 69, 95, 65,
82, 66, 61, 49, 48, 44, 86, 66, 84, 95, 67, 69, 76, 76, 95, 84, 89, 80,
69, 95, 49, 66, 65, 76, 76, 61, 49, 49, 44, 86, 66, 84, 95, 67, 69, 76,
76, 95, 84, 89, 80, 69, 95, 50, 66, 65, 76, 76, 61, 49, 50, 44, 86, 66,
84, 95, 67, 69, 76, 76, 95, 84, 89, 80, 69, 95, 51, 66, 65, 76, 76, 61,
49, 51, 44, 86, 66, 84, 95, 67, 69, 76, 76, 95, 84, 89, 80, 69, 95, 49,
83, 72, 69, 76, 76, 61, 49, 52, 44, 86, 66, 84, 95, 67, 69, 76, 76, 95,
84, 89, 80, 69, 95, 50, 83, 72, 69, 76, 76, 61, 49, 53, 44, 86, 66, 84,
95, 67, 69, 76, 76, 95, 84, 89, 80, 69, 95, 65, 78, 89, 61, 45, 49, 44,
86, 66, 84, 95, 67, 69, 76, 76, 95, 84, 89, 80, 69, 95, 73, 78, 86, 65,
76, 73, 68, 61, 45, 50, 44, 86, 66, 84, 95, 67, 69, 76, 76, 95, 84, 89,
80, 69, 95, 78, 65, 61, 45, 51, 44, 86, 66, 84, 95, 67, 69, 76, 76, 95,
84, 89, 80, 69, 95, 85, 78, 75, 78, 79, 87, 78, 61, 45, 52, 125, 99,
101, 108, 108, 95, 116, 121, 112, 101, 59, 105, 110, 116, 32, 99, 111,
117, 110, 116, 59, 68, 83, 76, 95, 79, 102, 102, 115, 101, 116, 32,
105, 110, 100, 101, 120, 105, 110, 103, 95, 105, 100, 59, 105, 110,
116, 32, 105, 115, 95, 100, 101, 99, 111, 109, 112, 59, 68, 83, 76, 95,
79, 102, 102, 115, 101, 116, 32, 109, 101, 109, 98, 101, 114, 115, 95,
98, 108, 111, 98, 95, 105, 100, 59, 68, 83, 76, 95, 79, 102, 102, 115,
101, 116, 32, 98, 97, 115, 101, 95, 105, 100, 59, 68, 83, 76, 95, 79,
102, 102, 115, 101, 116, 32, 110, 117, 109, 95, 114, 101, 99, 115, 59,
125, 59, 10, 47, 82, 101, 108, 97, 116, 105, 111, 110, 32, 68, 65, 84,
65, 83, 69, 84, 32, 115, 116, 114, 117, 99, 116, 32, 82, 101, 108, 97,
116, 105, 111, 110, 123, 68, 83, 76, 95, 79, 102, 102, 115, 101, 116,
32, 115, 117, 98, 95, 105, 100, 59, 68, 83, 76, 95, 79, 102, 102, 115,
101, 116, 32, 115, 117, 98, 95, 99, 97, 116, 95, 105, 100, 59, 68, 83,
76, 95, 79, 102, 102, 115, 101, 116, 32, 115, 117, 98, 95, 100, 101,
99, 111, 109, 112, 95, 99, 97, 116, 95, 105, 100, 59, 68, 83, 76, 95,
79, 102, 102, 115, 101, 116, 32, 115, 117, 112, 95, 105, 100, 59, 68,
83, 76, 95, 79, 102, 102, 115, 101, 116, 32, 115, 117, 112, 95, 99, 97,
116, 95, 105, 100, 59, 68, 83, 76, 95, 79, 102, 102, 115, 101, 116, 32,
115, 117, 112, 95, 100, 101, 99, 111, 109, 112, 95, 99, 97, 116, 95,
105, 100, 59, 101, 110, 117, 109, 32, 82, 101, 108, 75, 105, 110, 100,
123, 86, 66, 84, 95, 82, 69, 76, 75, 73, 78, 68, 95, 83, 85, 66, 83,
69, 84, 61, 48, 44, 86, 66, 84, 95, 82, 69, 76, 75, 73, 78, 68, 95, 83,
85, 80, 83, 69, 84, 61, 49, 44, 86, 66, 84, 95, 82, 69, 76, 75, 73, 78,
68, 95, 66, 79, 85, 78, 68, 61, 50, 44, 86, 66, 84, 95, 82, 69, 76, 75,
73, 78, 68, 95, 80, 69, 82, 77, 85, 84, 69, 61, 51, 44, 86, 66, 84, 95,
82, 69, 76, 75, 73, 78, 68, 95, 78, 69, 73, 71, 72, 66, 79, 82, 61, 52,
44, 86, 66, 84, 95, 82, 69, 76, 75, 73, 78, 68, 95, 67, 79, 80, 89, 61,
53, 44, 86, 66, 84, 95, 82, 69, 76, 75, 73, 78, 68, 95, 69, 81, 85, 65,
76, 61, 54, 44, 86, 66, 84, 95, 82, 69, 76, 75, 73, 78, 68, 95, 65, 78,
89, 61, 45, 49, 44, 86, 66, 84, 95, 82, 69, 76, 75, 73, 78, 68, 95, 73,
78, 86, 65, 76, 73, 68, 61, 45, 50, 44, 86, 66, 84, 95, 82, 69, 76, 75,
73, 78, 68, 95, 78, 65, 61, 45, 51, 44, 86, 66, 84, 95, 82, 69, 76, 75,
73, 78, 68, 95, 85, 78, 75, 78, 79, 87, 78, 61, 45, 52, 125, 107, 105,
110, 100, 59, 101, 110, 117, 109, 32, 82, 101, 108, 82, 101, 112, 123,
86, 66, 84, 95, 82, 69, 76, 82, 69, 80, 95, 73, 68, 69, 78, 84, 73, 84,
89, 61, 48, 44, 86, 66, 84, 95, 82, 69, 76, 82, 69, 80, 95, 72, 76, 73,
83, 84, 61, 49, 44, 86, 66, 84, 95, 82, 69, 76, 82, 69, 80, 95, 84, 76,
73, 83, 84, 61, 50, 44, 86, 66, 84, 95, 82, 69, 76, 82, 69, 80, 95, 84,
76, 73, 83, 84, 95, 49, 61, 51, 44, 86, 66, 84, 95, 82, 69, 76, 82, 69,
80, 95, 69, 76, 73, 83, 84, 61, 52, 44, 86, 66, 84, 95, 82, 69, 76, 82,
69, 80, 95, 83, 84, 82, 85, 67, 84, 85, 82, 69, 68, 61, 53, 44, 86, 66,
84, 95, 82, 69, 76, 82, 69, 80, 95, 85, 78, 83, 84, 82, 85, 67, 84, 85,
82, 69, 68, 61, 54, 44, 86, 66, 84, 95, 82, 69, 76, 82, 69, 80, 95, 65,
82, 66, 73, 84, 82, 65, 82, 89, 95, 82, 61, 55, 44, 86, 66, 84, 95, 82,
69, 76, 82, 69, 80, 95, 65, 82, 66, 73, 84, 82, 65, 82, 89, 95, 68, 82,
61, 56, 44, 86, 66, 84, 95, 82, 69, 76, 82, 69, 80, 95, 65, 78, 89, 61,
45, 49, 44, 86, 66, 84, 95, 82, 69, 76, 82, 69, 80, 95, 73, 78, 86, 65,
76, 73, 68, 61, 45, 50, 44, 86, 66, 84, 95, 82, 69, 76, 82, 69, 80, 95,
78, 65, 61, 45, 51, 44, 86, 66, 84, 95, 82, 69, 76, 82, 69, 80, 95, 85,
78, 75, 78, 79, 87, 78, 61, 45, 52, 125, 114, 101, 112, 95, 116, 121,
112, 101, 59, 68, 83, 76, 95, 79, 102, 102, 115, 101, 116, 32, 100, 95,
98, 108, 111, 98, 95, 105, 100, 59, 68, 83, 76, 95, 79, 102, 102, 115,
101, 116, 32, 114, 95, 98, 108, 111, 98, 95, 105, 100, 59, 68, 83, 76,
95, 79, 102, 102, 115, 101, 116, 32, 98, 97, 115, 101, 95, 105, 100,
59, 68, 83, 76, 95, 79, 102, 102, 115, 101, 116, 32, 110, 117, 109, 95,
114, 101, 99, 115, 59, 125, 59, 10, 47, 70, 105, 101, 108, 100, 84,
109, 112, 108, 32, 68, 65, 84, 65, 83, 69, 84, 32, 115, 116, 114, 117,
99, 116, 32, 70, 105, 101, 108, 100, 84, 109, 112, 108, 123, 99, 104,
97, 114, 32, 110, 97, 109, 101, 91, 54, 52, 93, 59, 68, 83, 76, 95, 79,
102, 102, 115, 101, 116, 32, 98, 97, 115, 101, 95, 115, 112, 97, 99,
101, 95, 105, 100, 59, 101, 110, 117, 109, 32, 65, 108, 103, 101, 98,
114, 97, 105, 99, 84, 121, 112, 101, 123, 86, 66, 84, 95, 65, 76, 71,
69, 66, 82, 65, 73, 67, 95, 84, 89, 80, 69, 95, 67, 79, 78, 83, 84, 65,
78, 84, 61, 48, 44, 86, 66, 84, 95, 65, 76, 71, 69, 66, 82, 65, 73, 67,
95, 84, 89, 80, 69, 95, 67, 79, 77, 80, 79, 78, 69, 78, 84, 61, 49, 44,
86, 66, 84, 95, 65, 76, 71, 69, 66, 82, 65, 73, 67, 95, 84, 89, 80, 69,
95, 83, 67, 65, 76, 65, 82, 61, 50, 44, 86, 66, 84, 95, 65, 76, 71, 69,
66, 82, 65, 73, 67, 95, 84, 89, 80, 69, 95, 86, 69, 67, 84, 79, 82, 61,
51, 44, 86, 66, 84, 95, 65, 76, 71, 69, 66, 82, 65, 73, 67, 95, 84, 89,
80, 69, 95, 84, 69, 78, 83, 79, 82, 61, 52, 44, 86, 66, 84, 95, 65, 76,
71, 69, 66, 82, 65, 73, 67, 95, 84, 89, 80, 69, 95, 83, 89, 77, 95, 84,
69, 78, 83, 79, 82, 61, 53, 44, 86, 66, 84, 95, 65, 76, 71, 69, 66, 82,
65, 73, 67, 95, 84, 89, 80, 69, 95, 70, 73, 69, 76, 68, 61, 54, 44, 86,
66, 84, 95, 65, 76, 71, 69, 66, 82, 65, 73, 67, 95, 84, 89, 80, 69, 95,
83, 84, 65, 84, 69, 61, 55, 44, 86, 66, 84, 95, 65, 76, 71, 69, 66, 82,
65, 73, 67, 95, 84, 89, 80, 69, 95, 84, 85, 80, 76, 69, 61, 56, 44, 86,
66, 84, 95, 65, 76, 71, 69, 66, 82, 65, 73, 67, 95, 84, 89, 80, 69, 95,
65, 78, 89, 61, 45, 49, 44, 86, 66, 84, 95, 65, 76, 71, 69, 66, 82, 65,
73, 67, 95, 84, 89, 80, 69, 95, 73, 78, 86, 65, 76, 73, 68, 61, 45, 50,
44, 86, 66, 84, 95, 65, 76, 71, 69, 66, 82, 65, 73, 67, 95, 84, 89, 80,
69, 95, 78, 65, 61, 45, 51, 44, 86, 66, 84, 95, 65, 76, 71, 69, 66, 82,
65, 73, 67, 95, 84, 89, 80, 69, 95, 85, 78, 75, 78, 79, 87, 78, 61, 45,
52, 125, 97, 108, 103, 95, 116, 121, 112, 101, 59, 101, 110, 117, 109,
32, 66, 97, 115, 105, 115, 84, 121, 112, 101, 123, 86, 66, 84, 95, 66,
65, 83, 73, 83, 95, 84, 89, 80, 69, 95, 85, 78, 73, 84, 89, 61, 48, 44,
86, 66, 84, 95, 66, 65, 83, 73, 83, 95, 84, 89, 80, 69, 95, 67, 65, 82,
84, 69, 83, 73, 65, 78, 61, 49, 44, 86, 66, 84, 95, 66, 65, 83, 73, 83,
95, 84, 89, 80, 69, 95, 83, 80, 72, 69, 82, 73, 67, 65, 76, 61, 50, 44,
86, 66, 84, 95, 66, 65, 83, 73, 83, 95, 84, 89, 80, 69, 95, 67, 89, 76,
73, 78, 68, 82, 73, 67, 65, 76, 61, 51, 44, 86, 66, 84, 95, 66, 65, 83,
73, 83, 95, 84, 89, 80, 69, 95, 85, 80, 80, 69, 82, 95, 84, 82, 73, 61,
52, 44, 86, 66, 84, 95, 66, 65, 83, 73, 83, 95, 84, 89, 80, 69, 95, 70,
79, 85, 82, 73, 69, 82, 61, 53, 44, 86, 66, 84, 95, 66, 65, 83, 73, 83,
95, 84, 89, 80, 69, 95, 86, 65, 82, 73, 65, 66, 76, 69, 61, 54, 44, 86,
66, 84, 95, 66, 65, 83, 73, 83, 95, 84, 89, 80, 69, 95, 65, 78, 89, 61,
45, 49, 44, 86, 66, 84, 95, 66, 65, 83, 73, 83, 95, 84, 89, 80, 69, 95,
73, 78, 86, 65, 76, 73, 68, 61, 45, 50, 44, 86, 66, 84, 95, 66, 65, 83,
73, 83, 95, 84, 89, 80, 69, 95, 78, 65, 61, 45, 51, 44, 86, 66, 84, 95,
66, 65, 83, 73, 83, 95, 84, 89, 80, 69, 95, 85, 78, 75, 78, 79, 87, 78,
61, 45, 52, 125, 98, 97, 115, 105, 115, 59, 68, 83, 76, 95, 79, 102,
102, 115, 101, 116, 32, 113, 117, 97, 110, 116, 105, 116, 121, 95, 105,
100, 59, 105, 110, 116, 32, 110, 117, 109, 95, 99, 111, 109, 112, 115,
59, 68, 83, 76, 95, 79, 102, 102, 115, 101, 116, 32, 102, 116, 109,
112, 108, 95, 105, 100, 115, 95, 98, 108, 111, 98, 95, 105, 100, 59,
68, 83, 76, 95, 79, 102, 102, 115, 101, 116, 32, 98, 97, 115, 101, 95,
105, 100, 59, 68, 83, 76, 95, 79, 102, 102, 115, 101, 116, 32, 110,
117, 109, 95, 114, 101, 99, 115, 59, 125, 59, 10, 47, 70, 105, 101,
108, 100, 32, 68, 65, 84, 65, 83, 69, 84, 32, 115, 116, 114, 117, 99,
116, 32, 70, 105, 101, 108, 100, 123, 68, 83, 76, 95, 79, 102, 102,
115, 101, 116, 32, 102, 116, 109, 112, 108, 95, 105, 100, 59, 99, 104,
97, 114, 32, 110, 97, 109, 101, 91, 54, 52, 93, 59, 68, 83, 76, 95, 79,
102, 102, 115, 101, 116, 32, 117, 110, 105, 116, 115, 95, 105, 100, 59,
68, 83, 76, 95, 79, 102, 102, 115, 101, 116, 32, 115, 116, 111, 114,
97, 103, 101, 95, 100, 101, 99, 111, 109, 112, 95, 99, 97, 116, 95,
105, 100, 59, 101, 110, 117, 109, 32, 73, 110, 116, 101, 114, 108, 101,
97, 118, 101, 123, 86, 66, 84, 95, 73, 78, 84, 69, 82, 76, 69, 65, 86,
69, 95, 67, 79, 77, 80, 79, 78, 69, 78, 84, 61, 48, 44, 86, 66, 84, 95,
73, 78, 84, 69, 82, 76, 69, 65, 86, 69, 95, 86, 69, 67, 84, 79, 82, 61,
49, 44, 86, 66, 84, 95, 73, 78, 84, 69, 82, 76, 69, 65, 86, 69, 95, 73,
78, 68, 69, 80, 69, 78, 68, 69, 78, 84, 61, 50, 44, 86, 66, 84, 95, 73,
78, 84, 69, 82, 76, 69, 65, 86, 69, 95, 78, 79, 78, 69, 61, 51, 44, 86,
66, 84, 95, 73, 78, 84, 69, 82, 76, 69, 65, 86, 69, 95, 65, 78, 89, 61,
45, 49, 44, 86, 66, 84, 95, 73, 78, 84, 69, 82, 76, 69, 65, 86, 69, 95,
73, 78, 86, 65, 76, 73, 68, 61, 45, 50, 44, 86, 66, 84, 95, 73, 78, 84,
69, 82, 76, 69, 65, 86, 69, 95, 78, 65, 61, 45, 51, 44, 86, 66, 84, 95,
73, 78, 84, 69, 82, 76, 69, 65, 86, 69, 95, 85, 78, 75, 78, 79, 87, 78,
61, 45, 52, 125, 99, 111, 109, 112, 95, 105, 110, 116, 108, 118, 59,
68, 83, 76, 95, 79, 102, 102, 115, 101, 116, 32, 105, 110, 100, 101,
120, 105, 110, 103, 95, 105, 100, 59, 68, 83, 76, 95, 79, 102, 102,
115, 101, 116, 32, 100, 111, 102, 95, 97, 115, 115, 111, 99, 95, 99,
97, 116, 95, 105, 100, 59, 105, 110, 116, 32, 97, 115, 115, 111, 99,
95, 114, 97, 116, 105, 111, 59, 68, 83, 76, 95, 79, 102, 102, 115, 101,
116, 32, 101, 118, 97, 108, 95, 100, 101, 99, 111, 109, 112, 95, 99,
97, 116, 95, 105, 100, 59, 101, 110, 117, 109, 32, 69, 118, 97, 108,
70, 117, 110, 99, 123, 86, 66, 84, 95, 69, 86, 65, 76, 95, 70, 85, 78,
67, 95, 67, 79, 78, 83, 84, 65, 78, 84, 61, 48, 44, 86, 66, 84, 95, 69,
86, 65, 76, 95, 70, 85, 78, 67, 95, 85, 78, 73, 70, 79, 82, 77, 61, 49,
44, 86, 66, 84, 95, 69, 86, 65, 76, 95, 70, 85, 78, 67, 95, 80, 87, 67,
79, 78, 83, 84, 61, 50, 44, 86, 66, 84, 95, 69, 86, 65, 76, 95, 70, 85,
78, 67, 95, 80, 87, 76, 73, 78, 69, 65, 82, 61, 51, 44, 86, 66, 84, 95,
69, 86, 65, 76, 95, 70, 85, 78, 67, 95, 65, 78, 89, 61, 45, 49, 44, 86,
66, 84, 95, 69, 86, 65, 76, 95, 70, 85, 78, 67, 95, 73, 78, 86, 65, 76,
73, 68, 61, 45, 50, 44, 86, 66, 84, 95, 69, 86, 65, 76, 95, 70, 85, 78,
67, 95, 78, 65, 61, 45, 51, 44, 86, 66, 84, 95, 69, 86, 65, 76, 95, 70,
85, 78, 67, 95, 85, 78, 75, 78, 79, 87, 78, 61, 45, 52, 125, 101, 118,
97, 108, 95, 102, 117, 110, 99, 59, 105, 110, 116, 32, 105, 115, 95,
104, 111, 109, 111, 103, 101, 110, 101, 111, 117, 115, 59, 105, 110,
116, 32, 105, 115, 95, 99, 111, 111, 114, 100, 95, 102, 105, 101, 108,
100, 59, 68, 83, 76, 95, 79, 102, 102, 115, 101, 116, 32, 99, 111, 109,
112, 95, 105, 100, 115, 95, 98, 108, 111, 98, 95, 105, 100, 59, 68, 83,
76, 95, 79, 102, 102, 115, 101, 116, 32, 99, 111, 109, 112, 95, 111,
114, 100, 101, 114, 95, 98, 108, 111, 98, 95, 105, 100, 59, 68, 83, 76,
95, 79, 102, 102, 115, 101, 116, 32, 118, 98, 97, 115, 105, 115, 95,
98, 108, 111, 98, 95, 105, 100, 59, 68, 83, 76, 95, 79, 102, 102, 115,
101, 116, 32, 100, 111, 102, 95, 98, 108, 111, 98, 95, 105, 100, 59,
68, 83, 76, 95, 79, 102, 102, 115, 101, 116, 32, 98, 97, 115, 101, 95,
105, 100, 59, 68, 83, 76, 95, 79, 102, 102, 115, 101, 116, 32, 110,
117, 109, 95, 114, 101, 99, 115, 59, 125, 59, 10, 47, 109, 101, 116,
97, 98, 108, 111, 98, 48, 48, 48, 48, 48, 46, 105, 110, 100, 101, 120,
32, 68, 65, 84, 65, 83, 69, 84, 32, 115, 116, 114, 117, 99, 116, 32,
73, 110, 100, 101, 120, 80, 97, 105, 114, 123, 68, 83, 76, 95, 79, 102,
102, 115, 101, 116, 32, 105, 110, 100, 101, 120, 59, 105, 110, 116, 32,
108, 101, 110, 103, 116, 104, 59, 125, 59, 10, 47, 109, 101, 116, 97,
98, 108, 111, 98, 48, 48, 48, 48, 48, 46, 98, 108, 111, 98, 32, 68, 65,
84, 65, 83, 69, 84, 32, 68, 83, 76, 95, 79, 102, 102, 115, 101, 116,
59, 10
/.attributes Group
/.attributes/database Group
/.attributes/database/.SAF_DbProps Dataset {1}
Data:
(0) {-604320037, ".", "don't import", 1, {0, 0, 0, "none"}, {0, 1, 0,
(0) "devel"}, {1, 3, 0, ""}, {0, 0, 0, "none"}, {1, 2, 1, ""}, {1, 2,
(0) 0, ""}, 1, 0, 1, 0}
{-604320037, ".", "don't import", 1, {0, 0, 0, "none"}, {0, 1, 0,
"devel"}, {1, 3, 0, ""}, {0, 0, 0, "none"}, {1, 2, 1, ""}, {1, 2, 0,
""}, 1, 0, 1, 0}
/Blob Dataset {24/Inf}
Data:
(0) {-1, 1, 0, 1, 9, 0, 1}, {-1, 2, 0, 1, 4, 1, 1},
(2) {-1, 3, 0, 1, 7, 2, 1}, {-1, 4, 0, 1, 4, 3, 1},
(4) {-1, 5, 0, 1, 5, 4, 1}, {-1, 6, 0, 1, 3, 5, 1},
(6) {-1, 7, 0, 1, 4, 6, 1}, {-1, 8, 0, 1, 1, 7, 1},
(8) {-1, 9, 0, 1, 10, 8, 1}, {-1, 10, 0, 1, 4, 9, 1},
(10) {-1, 11, 0, 1, 3, 10, 1}, {-1, 12, 0, 1, 5, 11, 1},
(12) {-1, 13, 0, 1, 5, 12, 1}, {-1, 14, 0, 1, 16, 13, 1},
(14) {-1, 15, 0, 1, 9, 14, 1}, {-1, 16, 0, 1, 4, 15, 1},
(16) {-1, 17, 0, 1, 16, 16, 1}, {-1, 18, 0, 1, 36, 17, 1},
(18) {-1, 19, 0, 1, 5, 18, 1}, {-1, 20, 0, 1, 5, 19, 1},
(20) {-1, 21, 0, 1, 36, 20, 1}, {-1, 22, 0, 1, 12, 21, 1},
(22) {-1, 23, 0, 1, 7, 22, 1}, {-1, 24, 0, 1, 2, 23, 1}
{-1, 1, 0, 1, 9, 0, 1}, {-1, 2, 0, 1, 4, 1, 1}, {-1, 3, 0, 1, 7, 2,
1}, {-1, 4, 0, 1, 4, 3, 1}, {-1, 5, 0, 1, 5, 4, 1},
{-1, 6, 0, 1, 3, 5, 1}, {-1, 7, 0, 1, 4, 6, 1}, {-1, 8, 0, 1, 1, 7,
1}, {-1, 9, 0, 1, 10, 8, 1}, {-1, 10, 0, 1, 4, 9, 1},
{-1, 11, 0, 1, 3, 10, 1}, {-1, 12, 0, 1, 5, 11, 1},
{-1, 13, 0, 1, 5, 12, 1}, {-1, 14, 0, 1, 16, 13, 1},
{-1, 15, 0, 1, 9, 14, 1}, {-1, 16, 0, 1, 4, 15, 1},
{-1, 17, 0, 1, 16, 16, 1}, {-1, 18, 0, 1, 36, 17, 1},
{-1, 19, 0, 1, 5, 18, 1}, {-1, 20, 0, 1, 5, 19, 1},
{-1, 21, 0, 1, 36, 20, 1}, {-1, 22, 0, 1, 12, 21, 1},
{-1, 23, 0, 1, 7, 22, 1}, {-1, 24, 0, 1, 2, 23, 1}
/Cat Dataset {5/Inf}
Data:
(0) {"nodes", TOPO, 0, 0, 1}, {"elems", TOPO, 2, 1, 1},
(2) {"edges", USERD, 1, 2, 1}, {"blocks", BLOCK, 2, 3, 1},
(4) {"side_sets", USERD, 1, 4, 1}
{"nodes", TOPO, 0, 0, 1}, {"elems", TOPO, 2, 1, 1},
{"edges", USERD, 1, 2, 1}, {"blocks", BLOCK, 2, 3, 1},
{"side_sets", USERD, 1, 4, 1}
/Collection Dataset {24/Inf}
Data:
(0) {0, 0, POINT, 18, 0, 0, -2, 0, 1},
(1) {0, 1, MIXED, 12, 1, 1, -2, 1, 1}, {0, 3, NONE, 4, 2, 1, 0, 2, 1},
(3) {0, 4, NONE, 2, 3, 0, 1, 3, 1}, {1, 0, POINT, 9, 4, 0, -2, 4, 1},
(5) {1, 1, QUAD, 4, 5, 1, -2, 5, 1}, {1, 3, NONE, 1, 6, 1, 2, 6, 1},
(7) {2, 0, POINT, 7, 7, 0, -2, 7, 1}, {2, 1, MIXED, 4, 8, 1, -2, 8, 1},
(9) {2, 3, NONE, 2, 9, 1, 3, 9, 1}, {3, 0, POINT, 10, 10, 0, -2, 10,
(10) 1}, {3, 1, QUAD, 4, 11, 1, -2, 11, 1},
(12) {3, 3, NONE, 1, 12, 1, 4, 12, 1},
(13) {4, 0, POINT, 3, 13, 0, -2, 13, 1},
(14) {4, 2, LINE, 2, 14, 1, -2, 14, 1},
(15) {5, 0, POINT, 5, 15, 0, -2, 15, 1},
(16) {5, 2, LINE, 4, 16, 1, -2, 16, 1},
(17) {6, 0, POINT, 5, 17, 1, -2, 17, 1},
(18) {7, 0, POINT, 5, 18, 0, -2, 18, 1},
(19) {7, 1, TRI, 3, 19, 1, -2, 19, 1}, {7, 3, NONE, 1, 20, 1, 5, 20,
(20) 1}, {8, 0, POINT, 4, 21, 0, -2, 21, 1},
(22) {8, 1, QUAD, 1, 22, 1, -2, 22, 1}, {8, 3, NONE, 1, 23, 1, 6, 23,
(23) 1}
{0, 0, POINT, 18, 0, 0, -2, 0, 1}, {0, 1, MIXED, 12, 1, 1, -2, 1, 1},
{0, 3, NONE, 4, 2, 1, 0, 2, 1}, {0, 4, NONE, 2, 3, 0, 1, 3, 1},
{1, 0, POINT, 9, 4, 0, -2, 4, 1}, {1, 1, QUAD, 4, 5, 1, -2, 5, 1},
{1, 3, NONE, 1, 6, 1, 2, 6, 1}, {2, 0, POINT, 7, 7, 0, -2, 7, 1},
{2, 1, MIXED, 4, 8, 1, -2, 8, 1}, {2, 3, NONE, 2, 9, 1, 3, 9, 1},
{3, 0, POINT, 10, 10, 0, -2, 10, 1}, {3, 1, QUAD, 4, 11, 1, -2, 11,
1}, {3, 3, NONE, 1, 12, 1, 4, 12, 1},
{4, 0, POINT, 3, 13, 0, -2, 13, 1}, {4, 2, LINE, 2, 14, 1, -2, 14, 1},
{5, 0, POINT, 5, 15, 0, -2, 15, 1}, {5, 2, LINE, 4, 16, 1, -2, 16, 1},
{6, 0, POINT, 5, 17, 1, -2, 17, 1}, {7, 0, POINT, 5, 18, 0, -2, 18,
1}, {7, 1, TRI, 3, 19, 1, -2, 19, 1}, {7, 3, NONE, 1, 20, 1, 5, 20,
1}, {8, 0, POINT, 4, 21, 0, -2, 21, 1},
{8, 1, QUAD, 1, 22, 1, -2, 22, 1}, {8, 3, NONE, 1, 23, 1, 6, 23, 1}
/Field Dataset {14/Inf}
Data:
(0) {1, "X", -7, -2, NONE, -2, 0, 1, 0, PWLINEAR, 1, 0, -2, -2, -2,
(0) -2, 0, 1},
(1) {1, "Y", -7, -2, NONE, -2, 0, 1, 0, PWLINEAR, 1, 0, -2, -2, -2,
(1) -2, 1, 1},
(2) {0, "coords", -7, -2, VECTOR, -2, 0, 1, 0, PWLINEAR, 1, 1, 7, -2,
(2) -2, 17, 2, 1},
(3) {2, "distribution factors", -5, -2, NONE, -2, 0, 1, 0, PWLINEAR,
(3) 1, 0, -2, -2, -2, 18, 3, 1},
(4) {3, "temperature", -7, -2, NONE, -2, 0, 1, 0, PWLINEAR, 1, 0, -2,
(4) -2, -2, 19, 4, 1},
(5) {1, "dX", -7, -2, NONE, -2, 0, 1, 0, PWLINEAR, 1, 0, -2, -2, -2,
(5) -2, 5, 1},
(6) {1, "dY", -7, -2, NONE, -2, 0, 1, 0, PWLINEAR, 1, 0, -2, -2, -2,
(6) -2, 6, 1},
(7) {0, "displacements", -7, -2, VECTOR, -2, 0, 1, 0, PWLINEAR, 1, 0,
(7) 8, -2, -2, 20, 7, 1},
(8) {5, "Sx", -7, -2, NONE, -2, 1, 1, 1, PWCONST, 1, 0, -2, -2, -2,
(8) -2, 8, 1},
(9) {5, "Sy", -7, -2, NONE, -2, 1, 1, 1, PWCONST, 1, 0, -2, -2, -2,
(9) -2, 9, 1},
(10) {5, "Sxy", -7, -2, NONE, -2, 1, 1, 1, PWCONST, 1, 0, -2, -2, -2,
(10) -2, 10, 1},
(11) {4, "stress", -7, -2, VECTOR, -2, 1, 1, 1, PWCONST, 1, 0, 9, -2,
(11) -2, 21, 11, 1},
(12) {6, "temperature", -7, -2, NONE, -2, 0, 1, 0, PWLINEAR, 1, 0, -2,
(12) -2, -2, 22, 12, 1},
(13) {7, "pressure", -7, -2, NONE, -2, 2, 1, 2, PWCONST, 1, 0, -2, -2,
(13) -2, 23, 13, 1}
{1, "X", -7, -2, NONE, -2, 0, 1, 0, PWLINEAR, 1, 0, -2, -2, -2, -2,
0, 1},
{1, "Y", -7, -2, NONE, -2, 0, 1, 0, PWLINEAR, 1, 0, -2, -2, -2, -2,
1, 1},
{0, "coords", -7, -2, VECTOR, -2, 0, 1, 0, PWLINEAR, 1, 1, 7, -2, -2,
17, 2, 1},
{2, "distribution factors", -5, -2, NONE, -2, 0, 1, 0, PWLINEAR, 1,
0, -2, -2, -2, 18, 3, 1},
{3, "temperature", -7, -2, NONE, -2, 0, 1, 0, PWLINEAR, 1, 0, -2, -2,
-2, 19, 4, 1},
{1, "dX", -7, -2, NONE, -2, 0, 1, 0, PWLINEAR, 1, 0, -2, -2, -2, -2,
5, 1},
{1, "dY", -7, -2, NONE, -2, 0, 1, 0, PWLINEAR, 1, 0, -2, -2, -2, -2,
6, 1},
{0, "displacements", -7, -2, VECTOR, -2, 0, 1, 0, PWLINEAR, 1, 0, 8,
-2, -2, 20, 7, 1},
{5, "Sx", -7, -2, NONE, -2, 1, 1, 1, PWCONST, 1, 0, -2, -2, -2, -2,
8, 1},
{5, "Sy", -7, -2, NONE, -2, 1, 1, 1, PWCONST, 1, 0, -2, -2, -2, -2,
9, 1},
{5, "Sxy", -7, -2, NONE, -2, 1, 1, 1, PWCONST, 1, 0, -2, -2, -2, -2,
10, 1},
{4, "stress", -7, -2, VECTOR, -2, 1, 1, 1, PWCONST, 1, 0, 9, -2, -2,
21, 11, 1},
{6, "temperature", -7, -2, NONE, -2, 0, 1, 0, PWLINEAR, 1, 0, -2, -2,
-2, 22, 12, 1},
{7, "pressure", -7, -2, NONE, -2, 2, 1, 2, PWCONST, 1, 0, -2, -2, -2,
23, 13, 1}
/FieldTmpl Dataset {8/Inf}
Data:
(0) {"coordinate_tmpl", 0, VECTOR, CARTESIAN, 2, 2, 0, 0, 1},
(1) {"coordinate_tmpl_component", 0, SCALAR, CARTESIAN, 2, 1, 0, 1, 1},
(2) {"distrib_factors_tmpl", 5, SCALAR, UNITY, -5, 1, 0, 2, 1},
(3) {"temp_on_ns1_tmpl", 6, SCALAR, UNITY, 0, 1, 0, 3, 1},
(4) {"stress_on_cell_1_tmpl", 1, SYM_TENSOR, UPPER_TRI, 0, 3, 0, 4, 1},
(5) {"stress_on_cell_1_tmpl_component", 1, SCALAR, UPPER_TRI, 0, 1, 0,
(5) 5, 1}, {"temp_on_cell_2_tmpl", 2, SCALAR, UNITY, 1, 1, 0, 6, 1},
(7) {"pressure_on_ss1", 4, SCALAR, UNITY, 0, 1, 0, 7, 1}
{"coordinate_tmpl", 0, VECTOR, CARTESIAN, 2, 2, 0, 0, 1},
{"coordinate_tmpl_component", 0, SCALAR, CARTESIAN, 2, 1, 0, 1, 1},
{"distrib_factors_tmpl", 5, SCALAR, UNITY, -5, 1, 0, 2, 1},
{"temp_on_ns1_tmpl", 6, SCALAR, UNITY, 0, 1, 0, 3, 1},
{"stress_on_cell_1_tmpl", 1, SYM_TENSOR, UPPER_TRI, 0, 3, 0, 4, 1},
{"stress_on_cell_1_tmpl_component", 1, SCALAR, UPPER_TRI, 0, 1, 0, 5,
1}, {"temp_on_cell_2_tmpl", 2, SCALAR, UNITY, 1, 1, 0, 6, 1},
{"pressure_on_ss1", 4, SCALAR, UNITY, 0, 1, 0, 7, 1}
/IndexSpec Dataset {24/Inf}
Data:
(0) {1, {[0,0,0,0,0,0,0,0]}, {[18,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,
(0) 0]}, C_ORDER, 0, 1},
(1) {1, {[0,0,0,0,0,0,0,0]}, {[12,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,
(1) 0]}, C_ORDER, 1, 1},
(2) {1, {[0,0,0,0,0,0,0,0]}, {[4,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,0]},
(2) C_ORDER, 2, 1},
(3) {1, {[0,0,0,0,0,0,0,0]}, {[2,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,0]},
(3) C_ORDER, 3, 1},
(4) {1, {[0,0,0,0,0,0,0,0]}, {[9,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,0]},
(4) C_ORDER, 4, 1},
(5) {1, {[0,0,0,0,0,0,0,0]}, {[4,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,0]},
(5) C_ORDER, 5, 1},
(6) {1, {[0,0,0,0,0,0,0,0]}, {[1,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,0]},
(6) C_ORDER, 6, 1},
(7) {1, {[0,0,0,0,0,0,0,0]}, {[7,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,0]},
(7) C_ORDER, 7, 1},
(8) {1, {[0,0,0,0,0,0,0,0]}, {[4,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,0]},
(8) C_ORDER, 8, 1},
(9) {1, {[0,0,0,0,0,0,0,0]}, {[2,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,0]},
(9) C_ORDER, 9, 1},
(10) {1, {[0,0,0,0,0,0,0,0]}, {[10,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,
(10) 0]}, C_ORDER, 10, 1},
(11) {1, {[0,0,0,0,0,0,0,0]}, {[4,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,
(11) 0]}, C_ORDER, 11, 1},
(12) {1, {[0,0,0,0,0,0,0,0]}, {[1,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,
(12) 0]}, C_ORDER, 12, 1},
(13) {1, {[0,0,0,0,0,0,0,0]}, {[3,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,
(13) 0]}, C_ORDER, 13, 1},
(14) {1, {[0,0,0,0,0,0,0,0]}, {[2,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,
(14) 0]}, C_ORDER, 14, 1},
(15) {1, {[0,0,0,0,0,0,0,0]}, {[5,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,
(15) 0]}, C_ORDER, 15, 1},
(16) {1, {[0,0,0,0,0,0,0,0]}, {[4,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,
(16) 0]}, C_ORDER, 16, 1},
(17) {1, {[0,0,0,0,0,0,0,0]}, {[5,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,
(17) 0]}, C_ORDER, 17, 1},
(18) {1, {[0,0,0,0,0,0,0,0]}, {[5,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,
(18) 0]}, C_ORDER, 18, 1},
(19) {1, {[0,0,0,0,0,0,0,0]}, {[3,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,
(19) 0]}, C_ORDER, 19, 1},
(20) {1, {[0,0,0,0,0,0,0,0]}, {[1,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,
(20) 0]}, C_ORDER, 20, 1},
(21) {1, {[0,0,0,0,0,0,0,0]}, {[4,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,
(21) 0]}, C_ORDER, 21, 1},
(22) {1, {[0,0,0,0,0,0,0,0]}, {[1,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,
(22) 0]}, C_ORDER, 22, 1},
(23) {1, {[0,0,0,0,0,0,0,0]}, {[1,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,
(23) 0]}, C_ORDER, 23, 1}
{1, {[0,0,0,0,0,0,0,0]}, {[18,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,0]},
C_ORDER, 0, 1},
{1, {[0,0,0,0,0,0,0,0]}, {[12,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,0]},
C_ORDER, 1, 1},
{1, {[0,0,0,0,0,0,0,0]}, {[4,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,0]},
C_ORDER, 2, 1},
{1, {[0,0,0,0,0,0,0,0]}, {[2,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,0]},
C_ORDER, 3, 1},
{1, {[0,0,0,0,0,0,0,0]}, {[9,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,0]},
C_ORDER, 4, 1},
{1, {[0,0,0,0,0,0,0,0]}, {[4,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,0]},
C_ORDER, 5, 1},
{1, {[0,0,0,0,0,0,0,0]}, {[1,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,0]},
C_ORDER, 6, 1},
{1, {[0,0,0,0,0,0,0,0]}, {[7,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,0]},
C_ORDER, 7, 1},
{1, {[0,0,0,0,0,0,0,0]}, {[4,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,0]},
C_ORDER, 8, 1},
{1, {[0,0,0,0,0,0,0,0]}, {[2,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,0]},
C_ORDER, 9, 1},
{1, {[0,0,0,0,0,0,0,0]}, {[10,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,0]},
C_ORDER, 10, 1},
{1, {[0,0,0,0,0,0,0,0]}, {[4,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,0]},
C_ORDER, 11, 1},
{1, {[0,0,0,0,0,0,0,0]}, {[1,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,0]},
C_ORDER, 12, 1},
{1, {[0,0,0,0,0,0,0,0]}, {[3,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,0]},
C_ORDER, 13, 1},
{1, {[0,0,0,0,0,0,0,0]}, {[2,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,0]},
C_ORDER, 14, 1},
{1, {[0,0,0,0,0,0,0,0]}, {[5,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,0]},
C_ORDER, 15, 1},
{1, {[0,0,0,0,0,0,0,0]}, {[4,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,0]},
C_ORDER, 16, 1},
{1, {[0,0,0,0,0,0,0,0]}, {[5,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,0]},
C_ORDER, 17, 1},
{1, {[0,0,0,0,0,0,0,0]}, {[5,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,0]},
C_ORDER, 18, 1},
{1, {[0,0,0,0,0,0,0,0]}, {[3,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,0]},
C_ORDER, 19, 1},
{1, {[0,0,0,0,0,0,0,0]}, {[1,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,0]},
C_ORDER, 20, 1},
{1, {[0,0,0,0,0,0,0,0]}, {[4,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,0]},
C_ORDER, 21, 1},
{1, {[0,0,0,0,0,0,0,0]}, {[1,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,0]},
C_ORDER, 22, 1},
{1, {[0,0,0,0,0,0,0,0]}, {[1,0,0,0,0,0,0,0]}, {[0,0,0,0,0,0,0,0]},
C_ORDER, 23, 1}
/Relation Dataset {21/Inf}
Data:
(0) {1, 0, -2, 0, 0, -2, EQUAL, TLIST, -2, 0, 0, 1},
(1) {1, 1, -2, 0, 1, -2, EQUAL, TLIST, -2, 1, 1, 1},
(2) {2, 0, -2, 0, 0, -2, EQUAL, TLIST, -2, 2, 2, 1},
(3) {2, 1, -2, 0, 1, -2, EQUAL, TLIST, -2, 3, 3, 1},
(4) {7, 0, -2, 0, 0, -2, EQUAL, TLIST, -2, 4, 4, 1},
(5) {7, 1, -2, 0, 1, -2, EQUAL, TLIST, -2, 5, 5, 1},
(6) {8, 0, -2, 0, 0, -2, EQUAL, TLIST, -2, 6, 6, 1},
(7) {8, 1, -2, 0, 1, -2, EQUAL, TLIST, -2, 7, 7, 1},
(8) {3, 0, -2, 0, 0, -2, EQUAL, TLIST, -2, 8, 8, 1},
(9) {3, 1, -2, 0, 1, -2, EQUAL, TLIST, -2, 9, 9, 1},
(10) {4, 0, -2, 0, 0, -2, EQUAL, TLIST, -2, 10, 10, 1},
(11) {5, 0, -2, 0, 0, -2, EQUAL, TLIST, -2, 11, 11, 1},
(12) {6, 0, -2, 0, 0, -2, EQUAL, TLIST, -2, 12, 12, 1},
(13) {1, 3, -2, 0, 3, -2, EQUAL, TLIST, -2, -2, 13, 1},
(14) {7, 3, -2, 0, 3, -2, EQUAL, TLIST, -2, -2, 14, 1},
(15) {8, 3, -2, 0, 3, -2, EQUAL, TLIST, -2, -2, 15, 1},
(16) {3, 3, -2, 0, 3, -2, EQUAL, TLIST, -2, -2, 16, 1},
(17) {1, 1, -2, 0, 0, -2, SUBSET, UNSTRUCTURED, -2, 13, 17, 1},
(18) {7, 1, -2, 0, 0, -2, SUBSET, UNSTRUCTURED, -2, 14, 18, 1},
(19) {8, 1, -2, 0, 0, -2, SUBSET, UNSTRUCTURED, -2, 15, 19, 1},
(20) {3, 1, -2, 0, 0, -2, SUBSET, UNSTRUCTURED, -2, 16, 20, 1}
{1, 0, -2, 0, 0, -2, EQUAL, TLIST, -2, 0, 0, 1},
{1, 1, -2, 0, 1, -2, EQUAL, TLIST, -2, 1, 1, 1},
{2, 0, -2, 0, 0, -2, EQUAL, TLIST, -2, 2, 2, 1},
{2, 1, -2, 0, 1, -2, EQUAL, TLIST, -2, 3, 3, 1},
{7, 0, -2, 0, 0, -2, EQUAL, TLIST, -2, 4, 4, 1},
{7, 1, -2, 0, 1, -2, EQUAL, TLIST, -2, 5, 5, 1},
{8, 0, -2, 0, 0, -2, EQUAL, TLIST, -2, 6, 6, 1},
{8, 1, -2, 0, 1, -2, EQUAL, TLIST, -2, 7, 7, 1},
{3, 0, -2, 0, 0, -2, EQUAL, TLIST, -2, 8, 8, 1},
{3, 1, -2, 0, 1, -2, EQUAL, TLIST, -2, 9, 9, 1},
{4, 0, -2, 0, 0, -2, EQUAL, TLIST, -2, 10, 10, 1},
{5, 0, -2, 0, 0, -2, EQUAL, TLIST, -2, 11, 11, 1},
{6, 0, -2, 0, 0, -2, EQUAL, TLIST, -2, 12, 12, 1},
{1, 3, -2, 0, 3, -2, EQUAL, TLIST, -2, -2, 13, 1},
{7, 3, -2, 0, 3, -2, EQUAL, TLIST, -2, -2, 14, 1},
{8, 3, -2, 0, 3, -2, EQUAL, TLIST, -2, -2, 15, 1},
{3, 3, -2, 0, 3, -2, EQUAL, TLIST, -2, -2, 16, 1},
{1, 1, -2, 0, 0, -2, SUBSET, UNSTRUCTURED, -2, 13, 17, 1},
{7, 1, -2, 0, 0, -2, SUBSET, UNSTRUCTURED, -2, 14, 18, 1},
{8, 1, -2, 0, 0, -2, SUBSET, UNSTRUCTURED, -2, 15, 19, 1},
{3, 1, -2, 0, 0, -2, SUBSET, UNSTRUCTURED, -2, 16, 20, 1}
/Set Dataset {9/Inf}
Data:
(0) {0, "TOP_CELL", 2, SPACE, {[0,1,-2,2,3,-2,-2,-2,-2,-2,-2,-2,-2,-2,
(0) -2,-2]}, 1, 0, -2, -2, 0, 1},
(1) {0, "CELL_1", 2, SPACE, {[4,5,-2,6,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,
(1) -2,-2]}, 0, 0, -2, -2, 1, 1},
(2) {0, "CELL_2", 2, SPACE, {[7,8,-2,9,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,
(2) -2,-2]}, 0, 0, -2, -2, 2, 1},
(3) {0, "CELL_3", 2, SPACE, {[10,11,-2,12,-2,-2,-2,-2,-2,-2,-2,-2,-2,
(3) -2,-2,-2]}, 0, 0, -2, -2, 3, 1},
(4) {0, "SIDE_SET_1", 1, SPACE, {[13,-2,14,-2,-2,-2,-2,-2,-2,-2,-2,-2,
(4) -2,-2,-2,-2]}, 0, 0, -2, -2, 4, 1},
(5) {0, "SIDE_SET_2", 1, SPACE, {[15,-2,16,-2,-2,-2,-2,-2,-2,-2,-2,-2,
(5) -2,-2,-2,-2]}, 0, 0, -2, -2, 5, 1},
(6) {0, "NODE_SET_1", 0, SPACE, {[17,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,
(6) -2,-2,-2,-2]}, 0, 0, -2, -2, 6, 1},
(7) {0, "CELL_2_TRIS", 2, SPACE, {[18,19,-2,20,-2,-2,-2,-2,-2,-2,-2,-2,
(7) -2,-2,-2,-2]}, 0, 0, -2, -2, 7, 1},
(8) {0, "CELL_2_QUADS", 2, SPACE, {[21,22,-2,23,-2,-2,-2,-2,-2,-2,-2,
(8) -2,-2,-2,-2,-2]}, 0, 0, -2, -2, 8, 1}
{0, "TOP_CELL", 2, SPACE, {[0,1,-2,2,3,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,
-2]}, 1, 0, -2, -2, 0, 1},
{0, "CELL_1", 2, SPACE, {[4,5,-2,6,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,
-2]}, 0, 0, -2, -2, 1, 1},
{0, "CELL_2", 2, SPACE, {[7,8,-2,9,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,
-2]}, 0, 0, -2, -2, 2, 1},
{0, "CELL_3", 2, SPACE, {[10,11,-2,12,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,
-2,-2]}, 0, 0, -2, -2, 3, 1},
{0, "SIDE_SET_1", 1, SPACE, {[13,-2,14,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,
-2,-2,-2]}, 0, 0, -2, -2, 4, 1},
{0, "SIDE_SET_2", 1, SPACE, {[15,-2,16,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,
-2,-2,-2]}, 0, 0, -2, -2, 5, 1},
{0, "NODE_SET_1", 0, SPACE, {[17,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,
-2,-2,-2]}, 0, 0, -2, -2, 6, 1},
{0, "CELL_2_TRIS", 2, SPACE, {[18,19,-2,20,-2,-2,-2,-2,-2,-2,-2,-2,-2,
-2,-2,-2]}, 0, 0, -2, -2, 7, 1},
{0, "CELL_2_QUADS", 2, SPACE, {[21,22,-2,23,-2,-2,-2,-2,-2,-2,-2,-2,
-2,-2,-2,-2]}, 0, 0, -2, -2, 8, 1}
/field-coords_0002 Dataset {36}
Data:
(0) 0, 4, 1, 4, 2, 4, 2.5, 4, 0, 3, 1, 3, 2, 3, 2.5, 3, 0, 2, 1, 2, 2,
(21) 2, 2.5, 2, 0, 1, 2, 1, 2.5, 1, 0, 0, 2, 0, 2.5, 0
0, 4, 1, 4, 2, 4, 2.5, 4, 0, 3, 1, 3, 2, 3, 2.5, 3, 0, 2, 1, 2, 2, 2,
2.5, 2, 0, 1, 2, 1, 2.5, 1, 0, 0, 2, 0, 2.5, 0
/field-displacements_0007 Dataset {36}
Data:
(0) 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25,
(11) 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25,
(22) 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25,
(33) 0.25, 0.25, 0.25
0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25,
0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25,
0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25
/field-distribution_factors_0003 Dataset {5}
Data:
(0) 4, 3, 2, 1, 0
4, 3, 2, 1, 0
/field-pressure_0013 Dataset {2}
Data:
(0) 45, 55
45, 55
/field-stress_0011 Dataset {12}
Data:
(0) 0.5, 0.25, 0.5, 0.5, 0.25, 0.5, 0.5, 0.25, 0.5, 0.5, 0.25, 0.5
0.5, 0.25, 0.5, 0.5, 0.25, 0.5, 0.5, 0.25, 0.5, 0.5, 0.25, 0.5
/field-temperature_0004 Dataset {5}
Data:
(0) 100, 150, 150, 100, 75
100, 150, 150, 100, 75
/field-temperature_0012 Dataset {7}
Data:
(0) 75, 95, 120, 80, 115, 85, 110
75, 95, 120, 80, 115, 85, 110
/metablob00000.blob Dataset {19/Inf}
Data:
(0) 1, 7, 8, 3, -2, -2, -2, -2, -2, -2, -2, -2, 0, 1, 5, 6, 8, 9, 10
1, 7, 8, 3, -2, -2, -2, -2, -2, -2, -2, -2, 0, 1, 5, 6, 8, 9, 10
/metablob00000.index Dataset {10/Inf}
Data:
(0) {0, 4}, {4, 2}, {6, 1}, {7, 2}, {9, 1}, {10, 1}, {11, 1}, {12, 2},
(8) {14, 2}, {16, 3}
{0, 4}, {4, 2}, {6, 1}, {7, 2}, {9, 1}, {10, 1}, {11, 1}, {12, 2},
{14, 2}, {16, 3}
/ssrel-_0000 Dataset {9}
Data:
(0) 1, 2, 3, 5, 6, 7, 9, 10, 11
1, 2, 3, 5, 6, 7, 9, 10, 11
/ssrel-_0001 Dataset {4}
Data:
(0) 1, 2, 4, 5
1, 2, 4, 5
/ssrel-_0002 Dataset {7}
Data:
(0) 9, 10, 11, 13, 14, 16, 17
9, 10, 11, 13, 14, 16, 17
/ssrel-_0003 Dataset {4}
Data:
(0) 7, 8, 9, 11
7, 8, 9, 11
/ssrel-_0004 Dataset {5}
Data:
(0) 9, 10, 11, 13, 14
9, 10, 11, 13, 14
/ssrel-_0005 Dataset {3}
Data:
(0) 7, 8, 9
7, 8, 9
/ssrel-_0006 Dataset {4}
Data:
(0) 13, 14, 16, 17
13, 14, 16, 17
/ssrel-_0007 Dataset {1}
Data:
(0) 11
11
/ssrel-_0008 Dataset {10}
Data:
(0) 3, 4, 7, 8, 11, 12, 14, 15, 17, 18
3, 4, 7, 8, 11, 12, 14, 15, 17, 18
/ssrel-_0009 Dataset {4}
Data:
(0) 3, 6, 10, 12
3, 6, 10, 12
/ssrel-_0010 Dataset {3}
Data:
(0) 9, 10, 11
9, 10, 11
/ssrel-_0011 Dataset {5}
Data:
(0) 1, 5, 9, 13, 16
1, 5, 9, 13, 16
/ssrel-_0012 Dataset {5}
Data:
(0) 4, 8, 12, 15, 18
4, 8, 12, 15, 18
/toporel-_0017 Dataset {16}
Data:
(0) 1, 2, 6, 5, 2, 3, 7, 6, 5, 6, 10, 9, 6, 7, 11, 10
1, 2, 6, 5, 2, 3, 7, 6, 5, 6, 10, 9, 6, 7, 11, 10
/toporel-_0018 Dataset {9}
Data:
(0) 9, 10, 13, 10, 14, 13, 10, 11, 14
9, 10, 13, 10, 14, 13, 10, 11, 14
/toporel-_0019 Dataset {4}
Data:
(0) 13, 14, 17, 16
13, 14, 17, 16
/toporel-_0020 Dataset {16}
Data:
(0) 3, 4, 8, 7, 7, 8, 12, 11, 11, 12, 15, 14, 14, 15, 18, 17
3, 4, 8, 7, 7, 8, 12, 11, 11, 12, 15, 14, 14, 15, 18, 17
+219 -319
View File
@@ -1,330 +1,230 @@
/ Group
/comp1 Dataset {3, 6}
Data:
(0,0) {[0,1,4,9,16,25,36,49,64,81,1,4,9,16,25,36,49,64,81,100,4,9,16,
(0,0) 25,36,49,64,81,100,121,9,16,25,36,49,64,81,100,121,144,16,25,36,
(0,0) 49,64,81,100,121,144,169,25,36,49,64,81,100,121,144,169,196,36,
(0,0) 49,64,81,100,121,144,169,196,225,49,64,81,100,121,144,169,196,
(0,0) 225,256], ["abcdefgh12345678abcdefgh12345678",
(0,0) "abcdefgh12345678abcdefgh12345678",
(0,0) "abcdefgh12345678abcdefgh12345678",
(0,0) "abcdefgh12345678abcdefgh12345678",
(0,0) "abcdefgh12345678abcdefgh12345678",
(0,0) "abcdefgh12345678abcdefgh12345678",
(0,0) "abcdefgh12345678abcdefgh12345678",
(0,0) "abcdefgh12345678abcdefgh12345678",
(0,0) "abcdefgh12345678abcdefgh12345678",
(0,0) "abcdefgh12345678abcdefgh12345678",
(0,0) "abcdefgh12345678abcdefgh12345678",
(0,0) "abcdefgh12345678abcdefgh12345678"]},
(0,1) {[1,4,9,16,25,36,49,64,81,100,4,9,16,25,36,49,64,81,100,121,9,16,
(0,1) 25,36,49,64,81,100,121,144,16,25,36,49,64,81,100,121,144,169,25,
(0,1) 36,49,64,81,100,121,144,169,196,36,49,64,81,100,121,144,169,196,
(0,1) 225,49,64,81,100,121,144,169,196,225,256,64,81,100,121,144,169,
(0,1) 196,225,256,289], ["abcdefgh12345678abcdefgh12345678",
(0,1) "abcdefgh12345678abcdefgh12345678",
(0,1) "abcdefgh12345678abcdefgh12345678",
(0,1) "abcdefgh12345678abcdefgh12345678",
(0,1) "abcdefgh12345678abcdefgh12345678",
(0,1) "abcdefgh12345678abcdefgh12345678",
(0,1) "abcdefgh12345678abcdefgh12345678",
(0,1) "abcdefgh12345678abcdefgh12345678",
(0,1) "abcdefgh12345678abcdefgh12345678",
(0,1) "abcdefgh12345678abcdefgh12345678",
(0,1) "abcdefgh12345678abcdefgh12345678",
(0,1) "abcdefgh12345678abcdefgh12345678"]},
(0,2) {[4,9,16,25,36,49,64,81,100,121,9,16,25,36,49,64,81,100,121,144,
(0,2) 16,25,36,49,64,81,100,121,144,169,25,36,49,64,81,100,121,144,
(0,2) 169,196,36,49,64,81,100,121,144,169,196,225,49,64,81,100,121,
(0,2) 144,169,196,225,256,64,81,100,121,144,169,196,225,256,289,81,
(0,2) 100,121,144,169,196,225,256,289,324],
(0,2) ["abcdefgh12345678abcdefgh12345678",
(0,2) "abcdefgh12345678abcdefgh12345678",
(0,2) "abcdefgh12345678abcdefgh12345678",
(0,2) "abcdefgh12345678abcdefgh12345678",
(0,2) "abcdefgh12345678abcdefgh12345678",
(0,2) "abcdefgh12345678abcdefgh12345678",
(0,2) "abcdefgh12345678abcdefgh12345678",
(0,2) "abcdefgh12345678abcdefgh12345678",
(0,2) "abcdefgh12345678abcdefgh12345678",
(0,2) "abcdefgh12345678abcdefgh12345678",
(0,2) "abcdefgh12345678abcdefgh12345678",
(0,2) "abcdefgh12345678abcdefgh12345678"]},
(0,3) {[9,16,25,36,49,64,81,100,121,144,16,25,36,49,64,81,100,121,144,
(0,3) 169,25,36,49,64,81,100,121,144,169,196,36,49,64,81,100,121,144,
(0,3) 169,196,225,49,64,81,100,121,144,169,196,225,256,64,81,100,121,
(0,3) 144,169,196,225,256,289,81,100,121,144,169,196,225,256,289,324,
(0,3) 100,121,144,169,196,225,256,289,324,361],
(0,3) ["abcdefgh12345678abcdefgh12345678",
(0,3) "abcdefgh12345678abcdefgh12345678",
(0,3) "abcdefgh12345678abcdefgh12345678",
(0,3) "abcdefgh12345678abcdefgh12345678",
(0,3) "abcdefgh12345678abcdefgh12345678",
(0,3) "abcdefgh12345678abcdefgh12345678",
(0,3) "abcdefgh12345678abcdefgh12345678",
(0,3) "abcdefgh12345678abcdefgh12345678",
(0,3) "abcdefgh12345678abcdefgh12345678",
(0,3) "abcdefgh12345678abcdefgh12345678",
(0,3) "abcdefgh12345678abcdefgh12345678",
(0,3) "abcdefgh12345678abcdefgh12345678"]},
(0,4) {[16,25,36,49,64,81,100,121,144,169,25,36,49,64,81,100,121,144,
(0,4) 169,196,36,49,64,81,100,121,144,169,196,225,49,64,81,100,121,
(0,4) 144,169,196,225,256,64,81,100,121,144,169,196,225,256,289,81,
(0,4) 100,121,144,169,196,225,256,289,324,100,121,144,169,196,225,256,
(0,4) 289,324,361,121,144,169,196,225,256,289,324,361,400],
(0,4) ["abcdefgh12345678abcdefgh12345678",
(0,4) "abcdefgh12345678abcdefgh12345678",
(0,4) "abcdefgh12345678abcdefgh12345678",
(0,4) "abcdefgh12345678abcdefgh12345678",
(0,4) "abcdefgh12345678abcdefgh12345678",
(0,4) "abcdefgh12345678abcdefgh12345678",
(0,4) "abcdefgh12345678abcdefgh12345678",
(0,4) "abcdefgh12345678abcdefgh12345678",
(0,4) "abcdefgh12345678abcdefgh12345678",
(0,4) "abcdefgh12345678abcdefgh12345678",
(0,4) "abcdefgh12345678abcdefgh12345678",
(0,4) "abcdefgh12345678abcdefgh12345678"]},
(0,5) {[25,36,49,64,81,100,121,144,169,196,36,49,64,81,100,121,144,169,
(0,5) 196,225,49,64,81,100,121,144,169,196,225,256,64,81,100,121,144,
(0,5) 169,196,225,256,289,81,100,121,144,169,196,225,256,289,324,100,
(0,5) 121,144,169,196,225,256,289,324,361,121,144,169,196,225,256,289,
(0,5) 324,361,400,144,169,196,225,256,289,324,361,400,441],
(0,5) ["abcdefgh12345678abcdefgh12345678",
(0,5) "abcdefgh12345678abcdefgh12345678",
(0,5) "abcdefgh12345678abcdefgh12345678",
(0,5) "abcdefgh12345678abcdefgh12345678",
(0,5) "abcdefgh12345678abcdefgh12345678",
(0,5) "abcdefgh12345678abcdefgh12345678",
(0,5) "abcdefgh12345678abcdefgh12345678",
(0,5) "abcdefgh12345678abcdefgh12345678",
(0,5) "abcdefgh12345678abcdefgh12345678",
(0,5) "abcdefgh12345678abcdefgh12345678",
(0,5) "abcdefgh12345678abcdefgh12345678",
(0,5) "abcdefgh12345678abcdefgh12345678"]},
(1,0) {[0,1,4,9,16,25,36,49,64,81,1,4,9,16,25,36,49,64,81,100,4,9,16,
(1,0) 25,36,49,64,81,100,121,9,16,25,36,49,64,81,100,121,144,16,25,36,
(1,0) 49,64,81,100,121,144,169,25,36,49,64,81,100,121,144,169,196,36,
(1,0) 49,64,81,100,121,144,169,196,225,49,64,81,100,121,144,169,196,
(1,0) 225,256], ["abcdefgh12345678abcdefgh12345678",
(1,0) "abcdefgh12345678abcdefgh12345678",
(1,0) "abcdefgh12345678abcdefgh12345678",
(1,0) "abcdefgh12345678abcdefgh12345678",
(1,0) "abcdefgh12345678abcdefgh12345678",
(1,0) "abcdefgh12345678abcdefgh12345678",
(1,0) "abcdefgh12345678abcdefgh12345678",
(1,0) "abcdefgh12345678abcdefgh12345678",
(1,0) "abcdefgh12345678abcdefgh12345678",
(1,0) "abcdefgh12345678abcdefgh12345678",
(1,0) "abcdefgh12345678abcdefgh12345678",
(1,0) "abcdefgh12345678abcdefgh12345678"]},
(1,1) {[1,4,9,16,25,36,49,64,81,100,4,9,16,25,36,49,64,81,100,121,9,16,
(1,1) 25,36,49,64,81,100,121,144,16,25,36,49,64,81,100,121,144,169,25,
(1,1) 36,49,64,81,100,121,144,169,196,36,49,64,81,100,121,144,169,196,
(1,1) 225,49,64,81,100,121,144,169,196,225,256,64,81,100,121,144,169,
(1,1) 196,225,256,289], ["abcdefgh12345678abcdefgh12345678",
(1,1) "abcdefgh12345678abcdefgh12345678",
(1,1) "abcdefgh12345678abcdefgh12345678",
(1,1) "abcdefgh12345678abcdefgh12345678",
(1,1) "abcdefgh12345678abcdefgh12345678",
(1,1) "abcdefgh12345678abcdefgh12345678",
(1,1) "abcdefgh12345678abcdefgh12345678",
(1,1) "abcdefgh12345678abcdefgh12345678",
(1,1) "abcdefgh12345678abcdefgh12345678",
(1,1) "abcdefgh12345678abcdefgh12345678",
(1,1) "abcdefgh12345678abcdefgh12345678",
(1,1) "abcdefgh12345678abcdefgh12345678"]},
(1,2) {[4,9,16,25,36,49,64,81,100,121,9,16,25,36,49,64,81,100,121,144,
(1,2) 16,25,36,49,64,81,100,121,144,169,25,36,49,64,81,100,121,144,
(1,2) 169,196,36,49,64,81,100,121,144,169,196,225,49,64,81,100,121,
(1,2) 144,169,196,225,256,64,81,100,121,144,169,196,225,256,289,81,
(1,2) 100,121,144,169,196,225,256,289,324],
(1,2) ["abcdefgh12345678abcdefgh12345678",
(1,2) "abcdefgh12345678abcdefgh12345678",
(1,2) "abcdefgh12345678abcdefgh12345678",
(1,2) "abcdefgh12345678abcdefgh12345678",
(1,2) "abcdefgh12345678abcdefgh12345678",
(1,2) "abcdefgh12345678abcdefgh12345678",
(1,2) "abcdefgh12345678abcdefgh12345678",
(1,2) "abcdefgh12345678abcdefgh12345678",
(1,2) "abcdefgh12345678abcdefgh12345678",
(1,2) "abcdefgh12345678abcdefgh12345678",
(1,2) "abcdefgh12345678abcdefgh12345678",
(1,2) "abcdefgh12345678abcdefgh12345678"]},
(1,3) {[9,16,25,36,49,64,81,100,121,144,16,25,36,49,64,81,100,121,144,
(1,3) 169,25,36,49,64,81,100,121,144,169,196,36,49,64,81,100,121,144,
(1,3) 169,196,225,49,64,81,100,121,144,169,196,225,256,64,81,100,121,
(1,3) 144,169,196,225,256,289,81,100,121,144,169,196,225,256,289,324,
(1,3) 100,121,144,169,196,225,256,289,324,361],
(1,3) ["abcdefgh12345678abcdefgh12345678",
(1,3) "abcdefgh12345678abcdefgh12345678",
(1,3) "abcdefgh12345678abcdefgh12345678",
(1,3) "abcdefgh12345678abcdefgh12345678",
(1,3) "abcdefgh12345678abcdefgh12345678",
(1,3) "abcdefgh12345678abcdefgh12345678",
(1,3) "abcdefgh12345678abcdefgh12345678",
(1,3) "abcdefgh12345678abcdefgh12345678",
(1,3) "abcdefgh12345678abcdefgh12345678",
(1,3) "abcdefgh12345678abcdefgh12345678",
(1,3) "abcdefgh12345678abcdefgh12345678",
(1,3) "abcdefgh12345678abcdefgh12345678"]},
(1,4) {[16,25,36,49,64,81,100,121,144,169,25,36,49,64,81,100,121,144,
(1,4) 169,196,36,49,64,81,100,121,144,169,196,225,49,64,81,100,121,
(1,4) 144,169,196,225,256,64,81,100,121,144,169,196,225,256,289,81,
(1,4) 100,121,144,169,196,225,256,289,324,100,121,144,169,196,225,256,
(1,4) 289,324,361,121,144,169,196,225,256,289,324,361,400],
(1,4) ["abcdefgh12345678abcdefgh12345678",
(1,4) "abcdefgh12345678abcdefgh12345678",
(1,4) "abcdefgh12345678abcdefgh12345678",
(1,4) "abcdefgh12345678abcdefgh12345678",
(1,4) "abcdefgh12345678abcdefgh12345678",
(1,4) "abcdefgh12345678abcdefgh12345678",
(1,4) "abcdefgh12345678abcdefgh12345678",
(1,4) "abcdefgh12345678abcdefgh12345678",
(1,4) "abcdefgh12345678abcdefgh12345678",
(1,4) "abcdefgh12345678abcdefgh12345678",
(1,4) "abcdefgh12345678abcdefgh12345678",
(1,4) "abcdefgh12345678abcdefgh12345678"]},
(1,5) {[25,36,49,64,81,100,121,144,169,196,36,49,64,81,100,121,144,169,
(1,5) 196,225,49,64,81,100,121,144,169,196,225,256,64,81,100,121,144,
(1,5) 169,196,225,256,289,81,100,121,144,169,196,225,256,289,324,100,
(1,5) 121,144,169,196,225,256,289,324,361,121,144,169,196,225,256,289,
(1,5) 324,361,400,144,169,196,225,256,289,324,361,400,441],
(1,5) ["abcdefgh12345678abcdefgh12345678",
(1,5) "abcdefgh12345678abcdefgh12345678",
(1,5) "abcdefgh12345678abcdefgh12345678",
(1,5) "abcdefgh12345678abcdefgh12345678",
(1,5) "abcdefgh12345678abcdefgh12345678",
(1,5) "abcdefgh12345678abcdefgh12345678",
(1,5) "abcdefgh12345678abcdefgh12345678",
(1,5) "abcdefgh12345678abcdefgh12345678",
(1,5) "abcdefgh12345678abcdefgh12345678",
(1,5) "abcdefgh12345678abcdefgh12345678",
(1,5) "abcdefgh12345678abcdefgh12345678",
(1,5) "abcdefgh12345678abcdefgh12345678"]},
(2,0) {[0,1,4,9,16,25,36,49,64,81,1,4,9,16,25,36,49,64,81,100,4,9,16,
(2,0) 25,36,49,64,81,100,121,9,16,25,36,49,64,81,100,121,144,16,25,36,
(2,0) 49,64,81,100,121,144,169,25,36,49,64,81,100,121,144,169,196,36,
(2,0) 49,64,81,100,121,144,169,196,225,49,64,81,100,121,144,169,196,
(2,0) 225,256], ["abcdefgh12345678abcdefgh12345678",
(2,0) "abcdefgh12345678abcdefgh12345678",
(2,0) "abcdefgh12345678abcdefgh12345678",
(2,0) "abcdefgh12345678abcdefgh12345678",
(2,0) "abcdefgh12345678abcdefgh12345678",
(2,0) "abcdefgh12345678abcdefgh12345678",
(2,0) "abcdefgh12345678abcdefgh12345678",
(2,0) "abcdefgh12345678abcdefgh12345678",
(2,0) "abcdefgh12345678abcdefgh12345678",
(2,0) "abcdefgh12345678abcdefgh12345678",
(2,0) "abcdefgh12345678abcdefgh12345678",
(2,0) "abcdefgh12345678abcdefgh12345678"]},
(2,1) {[1,4,9,16,25,36,49,64,81,100,4,9,16,25,36,49,64,81,100,121,9,16,
(2,1) 25,36,49,64,81,100,121,144,16,25,36,49,64,81,100,121,144,169,25,
(2,1) 36,49,64,81,100,121,144,169,196,36,49,64,81,100,121,144,169,196,
(2,1) 225,49,64,81,100,121,144,169,196,225,256,64,81,100,121,144,169,
(2,1) 196,225,256,289], ["abcdefgh12345678abcdefgh12345678",
(2,1) "abcdefgh12345678abcdefgh12345678",
(2,1) "abcdefgh12345678abcdefgh12345678",
(2,1) "abcdefgh12345678abcdefgh12345678",
(2,1) "abcdefgh12345678abcdefgh12345678",
(2,1) "abcdefgh12345678abcdefgh12345678",
(2,1) "abcdefgh12345678abcdefgh12345678",
(2,1) "abcdefgh12345678abcdefgh12345678",
(2,1) "abcdefgh12345678abcdefgh12345678",
(2,1) "abcdefgh12345678abcdefgh12345678",
(2,1) "abcdefgh12345678abcdefgh12345678",
(2,1) "abcdefgh12345678abcdefgh12345678"]},
(2,2) {[4,9,16,25,36,49,64,81,100,121,9,16,25,36,49,64,81,100,121,144,
(2,2) 16,25,36,49,64,81,100,121,144,169,25,36,49,64,81,100,121,144,
(2,2) 169,196,36,49,64,81,100,121,144,169,196,225,49,64,81,100,121,
(2,2) 144,169,196,225,256,64,81,100,121,144,169,196,225,256,289,81,
(2,2) 100,121,144,169,196,225,256,289,324],
(2,2) ["abcdefgh12345678abcdefgh12345678",
(2,2) "abcdefgh12345678abcdefgh12345678",
(2,2) "abcdefgh12345678abcdefgh12345678",
(2,2) "abcdefgh12345678abcdefgh12345678",
(2,2) "abcdefgh12345678abcdefgh12345678",
(2,2) "abcdefgh12345678abcdefgh12345678",
(2,2) "abcdefgh12345678abcdefgh12345678",
(2,2) "abcdefgh12345678abcdefgh12345678",
(2,2) "abcdefgh12345678abcdefgh12345678",
(2,2) "abcdefgh12345678abcdefgh12345678",
(2,2) "abcdefgh12345678abcdefgh12345678",
(2,2) "abcdefgh12345678abcdefgh12345678"]},
(2,3) {[9,16,25,36,49,64,81,100,121,144,16,25,36,49,64,81,100,121,144,
(2,3) 169,25,36,49,64,81,100,121,144,169,196,36,49,64,81,100,121,144,
(2,3) 169,196,225,49,64,81,100,121,144,169,196,225,256,64,81,100,121,
(2,3) 144,169,196,225,256,289,81,100,121,144,169,196,225,256,289,324,
(2,3) 100,121,144,169,196,225,256,289,324,361],
(2,3) ["abcdefgh12345678abcdefgh12345678",
(2,3) "abcdefgh12345678abcdefgh12345678",
(2,3) "abcdefgh12345678abcdefgh12345678",
(2,3) "abcdefgh12345678abcdefgh12345678",
(2,3) "abcdefgh12345678abcdefgh12345678",
(2,3) "abcdefgh12345678abcdefgh12345678",
(2,3) "abcdefgh12345678abcdefgh12345678",
(2,3) "abcdefgh12345678abcdefgh12345678",
(2,3) "abcdefgh12345678abcdefgh12345678",
(2,3) "abcdefgh12345678abcdefgh12345678",
(2,3) "abcdefgh12345678abcdefgh12345678",
(2,3) "abcdefgh12345678abcdefgh12345678"]},
(2,4) {[16,25,36,49,64,81,100,121,144,169,25,36,49,64,81,100,121,144,
(2,4) 169,196,36,49,64,81,100,121,144,169,196,225,49,64,81,100,121,
(2,4) 144,169,196,225,256,64,81,100,121,144,169,196,225,256,289,81,
(2,4) 100,121,144,169,196,225,256,289,324,100,121,144,169,196,225,256,
(2,4) 289,324,361,121,144,169,196,225,256,289,324,361,400],
(2,4) ["abcdefgh12345678abcdefgh12345678",
(2,4) "abcdefgh12345678abcdefgh12345678",
(2,4) "abcdefgh12345678abcdefgh12345678",
(2,4) "abcdefgh12345678abcdefgh12345678",
(2,4) "abcdefgh12345678abcdefgh12345678",
(2,4) "abcdefgh12345678abcdefgh12345678",
(2,4) "abcdefgh12345678abcdefgh12345678",
(2,4) "abcdefgh12345678abcdefgh12345678",
(2,4) "abcdefgh12345678abcdefgh12345678",
(2,4) "abcdefgh12345678abcdefgh12345678",
(2,4) "abcdefgh12345678abcdefgh12345678",
(2,4) "abcdefgh12345678abcdefgh12345678"]},
(2,5) {[25,36,49,64,81,100,121,144,169,196,36,49,64,81,100,121,144,169,
(2,5) 196,225,49,64,81,100,121,144,169,196,225,256,64,81,100,121,144,
(2,5) 169,196,225,256,289,81,100,121,144,169,196,225,256,289,324,100,
(2,5) 121,144,169,196,225,256,289,324,361,121,144,169,196,225,256,289,
(2,5) 324,361,400,144,169,196,225,256,289,324,361,400,441],
(2,5) ["abcdefgh12345678abcdefgh12345678",
(2,5) "abcdefgh12345678abcdefgh12345678",
(2,5) "abcdefgh12345678abcdefgh12345678",
(2,5) "abcdefgh12345678abcdefgh12345678",
(2,5) "abcdefgh12345678abcdefgh12345678",
(2,5) "abcdefgh12345678abcdefgh12345678",
(2,5) "abcdefgh12345678abcdefgh12345678",
(2,5) "abcdefgh12345678abcdefgh12345678",
(2,5) "abcdefgh12345678abcdefgh12345678",
(2,5) "abcdefgh12345678abcdefgh12345678",
(2,5) "abcdefgh12345678abcdefgh12345678",
(2,5) "abcdefgh12345678abcdefgh12345678"]}
{[0,1,4,9,16,25,36,49,64,81,1,4,9,16,25,36,49,64,81,100,4,9,16,25,36,
49,64,81,100,121,9,16,25,36,49,64,81,100,121,144,16,25,36,49,64,81,
100,121,144,169,25,36,49,64,81,100,121,144,169,196,36,49,64,81,100,
121,144,169,196,225,49,64,81,100,121,144,169,196,225,256],
["abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678"]},
{[1,4,9,16,25,36,49,64,81,100,4,9,16,25,36,49,64,81,100,121,9,16,25,
36,49,64,81,100,121,144,16,25,36,49,64,81,100,121,144,169,25,36,49,64,
81,100,121,144,169,196,36,49,64,81,100,121,144,169,196,225,49,64,81,
100,121,144,169,196,225,256,64,81,100,121,144,169,196,225,256,289],
["abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678"]},
{[4,9,16,25,36,49,64,81,100,121,9,16,25,36,49,64,81,100,121,144,16,25,
36,49,64,81,100,121,144,169,25,36,49,64,81,100,121,144,169,196,36,49,
64,81,100,121,144,169,196,225,49,64,81,100,121,144,169,196,225,256,64,
81,100,121,144,169,196,225,256,289,81,100,121,144,169,196,225,256,289,
324], ["abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678"]},
{[9,16,25,36,49,64,81,100,121,144,16,25,36,49,64,81,100,121,144,169,
25,36,49,64,81,100,121,144,169,196,36,49,64,81,100,121,144,169,196,
225,49,64,81,100,121,144,169,196,225,256,64,81,100,121,144,169,196,
225,256,289,81,100,121,144,169,196,225,256,289,324,100,121,144,169,
196,225,256,289,324,361], ["abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678"]},
{[16,25,36,49,64,81,100,121,144,169,25,36,49,64,81,100,121,144,169,
196,36,49,64,81,100,121,144,169,196,225,49,64,81,100,121,144,169,196,
225,256,64,81,100,121,144,169,196,225,256,289,81,100,121,144,169,196,
225,256,289,324,100,121,144,169,196,225,256,289,324,361,121,144,169,
196,225,256,289,324,361,400], ["abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678"]},
{[25,36,49,64,81,100,121,144,169,196,36,49,64,81,100,121,144,169,196,
225,49,64,81,100,121,144,169,196,225,256,64,81,100,121,144,169,196,
225,256,289,81,100,121,144,169,196,225,256,289,324,100,121,144,169,
196,225,256,289,324,361,121,144,169,196,225,256,289,324,361,400,144,
169,196,225,256,289,324,361,400,441],
["abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678"]},
{[0,1,4,9,16,25,36,49,64,81,1,4,9,16,25,36,49,64,81,100,4,9,16,25,36,
49,64,81,100,121,9,16,25,36,49,64,81,100,121,144,16,25,36,49,64,81,
100,121,144,169,25,36,49,64,81,100,121,144,169,196,36,49,64,81,100,
121,144,169,196,225,49,64,81,100,121,144,169,196,225,256],
["abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678"]},
{[1,4,9,16,25,36,49,64,81,100,4,9,16,25,36,49,64,81,100,121,9,16,25,
36,49,64,81,100,121,144,16,25,36,49,64,81,100,121,144,169,25,36,49,64,
81,100,121,144,169,196,36,49,64,81,100,121,144,169,196,225,49,64,81,
100,121,144,169,196,225,256,64,81,100,121,144,169,196,225,256,289],
["abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678"]},
{[4,9,16,25,36,49,64,81,100,121,9,16,25,36,49,64,81,100,121,144,16,25,
36,49,64,81,100,121,144,169,25,36,49,64,81,100,121,144,169,196,36,49,
64,81,100,121,144,169,196,225,49,64,81,100,121,144,169,196,225,256,64,
81,100,121,144,169,196,225,256,289,81,100,121,144,169,196,225,256,289,
324], ["abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678"]},
{[9,16,25,36,49,64,81,100,121,144,16,25,36,49,64,81,100,121,144,169,
25,36,49,64,81,100,121,144,169,196,36,49,64,81,100,121,144,169,196,
225,49,64,81,100,121,144,169,196,225,256,64,81,100,121,144,169,196,
225,256,289,81,100,121,144,169,196,225,256,289,324,100,121,144,169,
196,225,256,289,324,361], ["abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678"]},
{[16,25,36,49,64,81,100,121,144,169,25,36,49,64,81,100,121,144,169,
196,36,49,64,81,100,121,144,169,196,225,49,64,81,100,121,144,169,196,
225,256,64,81,100,121,144,169,196,225,256,289,81,100,121,144,169,196,
225,256,289,324,100,121,144,169,196,225,256,289,324,361,121,144,169,
196,225,256,289,324,361,400], ["abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678"]},
{[25,36,49,64,81,100,121,144,169,196,36,49,64,81,100,121,144,169,196,
225,49,64,81,100,121,144,169,196,225,256,64,81,100,121,144,169,196,
225,256,289,81,100,121,144,169,196,225,256,289,324,100,121,144,169,
196,225,256,289,324,361,121,144,169,196,225,256,289,324,361,400,144,
169,196,225,256,289,324,361,400,441],
["abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678"]},
{[0,1,4,9,16,25,36,49,64,81,1,4,9,16,25,36,49,64,81,100,4,9,16,25,36,
49,64,81,100,121,9,16,25,36,49,64,81,100,121,144,16,25,36,49,64,81,
100,121,144,169,25,36,49,64,81,100,121,144,169,196,36,49,64,81,100,
121,144,169,196,225,49,64,81,100,121,144,169,196,225,256],
["abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678"]},
{[1,4,9,16,25,36,49,64,81,100,4,9,16,25,36,49,64,81,100,121,9,16,25,
36,49,64,81,100,121,144,16,25,36,49,64,81,100,121,144,169,25,36,49,64,
81,100,121,144,169,196,36,49,64,81,100,121,144,169,196,225,49,64,81,
100,121,144,169,196,225,256,64,81,100,121,144,169,196,225,256,289],
["abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678"]},
{[4,9,16,25,36,49,64,81,100,121,9,16,25,36,49,64,81,100,121,144,16,25,
36,49,64,81,100,121,144,169,25,36,49,64,81,100,121,144,169,196,36,49,
64,81,100,121,144,169,196,225,49,64,81,100,121,144,169,196,225,256,64,
81,100,121,144,169,196,225,256,289,81,100,121,144,169,196,225,256,289,
324], ["abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678"]},
{[9,16,25,36,49,64,81,100,121,144,16,25,36,49,64,81,100,121,144,169,
25,36,49,64,81,100,121,144,169,196,36,49,64,81,100,121,144,169,196,
225,49,64,81,100,121,144,169,196,225,256,64,81,100,121,144,169,196,
225,256,289,81,100,121,144,169,196,225,256,289,324,100,121,144,169,
196,225,256,289,324,361], ["abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678"]},
{[16,25,36,49,64,81,100,121,144,169,25,36,49,64,81,100,121,144,169,
196,36,49,64,81,100,121,144,169,196,225,49,64,81,100,121,144,169,196,
225,256,64,81,100,121,144,169,196,225,256,289,81,100,121,144,169,196,
225,256,289,324,100,121,144,169,196,225,256,289,324,361,121,144,169,
196,225,256,289,324,361,400], ["abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678"]},
{[25,36,49,64,81,100,121,144,169,196,36,49,64,81,100,121,144,169,196,
225,49,64,81,100,121,144,169,196,225,256,64,81,100,121,144,169,196,
225,256,289,81,100,121,144,169,196,225,256,289,324,100,121,144,169,
196,225,256,289,324,361,121,144,169,196,225,256,289,324,361,400,144,
169,196,225,256,289,324,361,400,441],
["abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678","abcdefgh12345678abcdefgh12345678",
"abcdefgh12345678abcdefgh12345678"]}
/string1 Dataset {3, 4}
Data:
(0,0) "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s0", "s1",
(2,3) "s2"
"s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s0", "s1", "s2"
/string2 Dataset {20}
Data:
(0) "ab cd ef1 ", "ab cd ef2 ", "ab cd ef3 ", "ab cd ef4 ",
(4) "ab cd ef5 ", "ab cd ef6 ", "ab cd ef7 ", "ab cd ef8 ",
(8) "ab cd ef9 ", "ab cd ef0 ", "ab cd ef1 ", "ab cd ef2 ",
(12) "ab cd ef3 ", "ab cd ef4 ", "ab cd ef5 ", "ab cd ef6 ",
(16) "ab cd ef7 ", "ab cd ef8 ", "ab cd ef9 ", "ab cd ef0 "
"ab cd ef1 ", "ab cd ef2 ", "ab cd ef3 ", "ab cd ef4 ",
"ab cd ef5 ", "ab cd ef6 ", "ab cd ef7 ", "ab cd ef8 ",
"ab cd ef9 ", "ab cd ef0 ", "ab cd ef1 ", "ab cd ef2 ",
"ab cd ef3 ", "ab cd ef4 ", "ab cd ef5 ", "ab cd ef6 ",
"ab cd ef7 ", "ab cd ef8 ", "ab cd ef9 ", "ab cd ef0 "
/string3 Dataset {27}
Data:
(0) "abcd0\000\000\000", "abcd1\000\000\000", "abcd2\000\000\000",
(3) "abcd3\000\000\000", "abcd4\000\000\000", "abcd5\000\000\000",
(6) "abcd6\000\000\000", "abcd7\000\000\000", "abcd8\000\000\000",
(9) "abcd9\000\000\000", "abcd0\000\000\000", "abcd1\000\000\000",
(12) "abcd2\000\000\000", "abcd3\000\000\000", "abcd4\000\000\000",
(15) "abcd5\000\000\000", "abcd6\000\000\000", "abcd7\000\000\000",
(18) "abcd8\000\000\000", "abcd9\000\000\000", "abcd0\000\000\000",
(21) "abcd1\000\000\000", "abcd2\000\000\000", "abcd3\000\000\000",
(24) "abcd4\000\000\000", "abcd5\000\000\000", "abcd6\000\000\000"
"abcd0\000\000\000", "abcd1\000\000\000", "abcd2\000\000\000",
"abcd3\000\000\000", "abcd4\000\000\000", "abcd5\000\000\000",
"abcd6\000\000\000", "abcd7\000\000\000", "abcd8\000\000\000",
"abcd9\000\000\000", "abcd0\000\000\000", "abcd1\000\000\000",
"abcd2\000\000\000", "abcd3\000\000\000", "abcd4\000\000\000",
"abcd5\000\000\000", "abcd6\000\000\000", "abcd7\000\000\000",
"abcd8\000\000\000", "abcd9\000\000\000", "abcd0\000\000\000",
"abcd1\000\000\000", "abcd2\000\000\000", "abcd3\000\000\000",
"abcd4\000\000\000", "abcd5\000\000\000", "abcd6\000\000\000"
/string4 Dataset {3}
Data:
(0) "s1234567890123456789" ' ' repeats 147 times,
(1) "s1234567890123456789" ' ' repeats 147 times,
(2) "s1234567890123456789" ' ' repeats 147 times
"s1234567890123456789" ' ' repeats 147 times,
"s1234567890123456789" ' ' repeats 147 times,
"s1234567890123456789" ' ' repeats 147 times
+13 -14
View File
@@ -1,16 +1,15 @@
dynlibud Dataset {20, 10}
Data:
(0,0) 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
(1,9) 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
(3,5) 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
(5,1) 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
(6,7) 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
(8,3) 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
(9,9) 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
(11,2) 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
(12,5) 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
(13,8) 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150,
(15,1) 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
(16,4) 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176,
(17,7) 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189,
(19,0) 190, 191, 192, 193, 194, 195, 196, 197, 198, 199
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107,
108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
192, 193, 194, 195, 196, 197, 198, 199
+4 -4
View File
@@ -1,11 +1,11 @@
/ Group
/Dataset1.0 Dataset {4}
Data:
(0) (0), (10,11), (20,21,22), (30,31,32,33)
(0), (10,11), (20,21,22), (30,31,32,33)
/Dataset2.0 Dataset {4}
Data:
(0) (0), (10,10.1), (20,20.1,20.2), (30,30.1,30.2,30.3)
(0), (10,10.1), (20,20.1,20.2), (30,30.1,30.2,30.3)
/Dataset3.0 Dataset {SCALAR}
Data:
(0) (0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,
(0) 46,48,50,52,54,56,58,60,62,64,66,68,70,72)
(0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,
48,50,52,54,56,58,60,62,64,66,68,70,72)