summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/h5diff/h5diffgentest.c2
-rw-r--r--tools/h5diff/ph5diff_main.c2
-rw-r--r--tools/h5ls/h5ls.c6
-rw-r--r--tools/h5repack/h5repack_copy.c134
-rw-r--r--tools/h5repack/h5repack_refs.c4
-rw-r--r--tools/h5repack/h5repack_verify.c30
-rw-r--r--tools/h5stat/h5stat.c224
-rw-r--r--tools/lib/h5diff.c19
-rw-r--r--tools/lib/h5diff.h2
-rw-r--r--tools/lib/h5diff_util.c31
-rw-r--r--tools/lib/ph5diff.h2
11 files changed, 223 insertions, 233 deletions
diff --git a/tools/h5diff/h5diffgentest.c b/tools/h5diff/h5diffgentest.c
index 048c193..b50b985 100644
--- a/tools/h5diff/h5diffgentest.c
+++ b/tools/h5diff/h5diffgentest.c
@@ -297,7 +297,7 @@ out:
/*-------------------------------------------------------------------------
* Function: test_types
*
- * Purpose: Compare different HDF5 types (H5G_obj_t):
+ * Purpose: Compare different HDF5 object & link types:
* H5G_DATASET, H5G_TYPE, H5G_GROUP, H5G_LINK, H5G_UDLINK
*
*-------------------------------------------------------------------------
diff --git a/tools/h5diff/ph5diff_main.c b/tools/h5diff/ph5diff_main.c
index 9cbc993..af2ab7f 100644
--- a/tools/h5diff/ph5diff_main.c
+++ b/tools/h5diff/ph5diff_main.c
@@ -168,7 +168,7 @@ ph5diff_worker(int nID)
if(Status.MPI_TAG == MPI_TAG_ARGS)
{
/*Recv parameters for diff from manager task */
- MPI_Recv(&args, sizeof(struct diff_args), MPI_BYTE, 0, MPI_TAG_ARGS, MPI_COMM_WORLD, &Status);
+ MPI_Recv(&args, sizeof(args), MPI_BYTE, 0, MPI_TAG_ARGS, MPI_COMM_WORLD, &Status);
/*Do the diff */
nfound = diff(file1_id, args.name, file2_id, args.name, &(args.options), args.type);
diffs.nfound = nfound;
diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c
index 3d8104c..4ea6bbc 100644
--- a/tools/h5ls/h5ls.c
+++ b/tools/h5ls/h5ls.c
@@ -2069,9 +2069,9 @@ main(int argc, const char *argv[])
h5tools_init();
/* Build object display table */
- DISPATCH(H5G_DATASET, "Dataset", H5Dopen2, H5Dclose, dataset_list1, dataset_list2);
- DISPATCH(H5G_GROUP, "Group", H5Gopen2, H5Gclose, NULL, group_list2);
- DISPATCH(H5G_TYPE, "Type", H5Topen2, H5Tclose, NULL, datatype_list2);
+ DISPATCH(H5O_TYPE_GROUP, "Group", H5Gopen2, H5Gclose, NULL, group_list2);
+ DISPATCH(H5O_TYPE_DATASET, "Dataset", H5Dopen2, H5Dclose, dataset_list1, dataset_list2);
+ DISPATCH(H5O_TYPE_NAMED_DATATYPE, "Type", H5Topen2, H5Tclose, NULL, datatype_list2);
/* Default output width */
width_g = get_width();
diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c
index 42dca2a..542aaf8 100644
--- a/tools/h5repack/h5repack_copy.c
+++ b/tools/h5repack/h5repack_copy.c
@@ -324,18 +324,18 @@ int do_copy_objects(hid_t fidin,
buf = NULL;
switch ( travt->objs[i].type ) {
/*-------------------------------------------------------------------------
- * H5G_GROUP
- *-------------------------------------------------------------------------
- */
- case H5G_GROUP:
+ * H5TRAV_TYPE_GROUP
+ *-------------------------------------------------------------------------
+ */
+ case H5TRAV_TYPE_GROUP:
if (options->verbose)
printf(FORMAT_OBJ,"group",travt->objs[i].name );
/*-------------------------------------------------------------------------
- * the root is a special case, we get an ID for the root group
- * and copy its attributes using that ID
- *-------------------------------------------------------------------------
- */
+ * the root is a special case, we get an ID for the root group
+ * and copy its attributes using that ID
+ *-------------------------------------------------------------------------
+ */
if(HDstrcmp(travt->objs[i].name, "/") == 0) {
if ((grp_out = H5Gopen2(fidout, "/", H5P_DEFAULT)) < 0)
goto error;
@@ -360,9 +360,9 @@ int do_copy_objects(hid_t fidin,
goto error;
/*-------------------------------------------------------------------------
- * copy attrs
- *-------------------------------------------------------------------------
- */
+ * copy attrs
+ *-------------------------------------------------------------------------
+ */
if (copy_attr(grp_in,grp_out,options)<0)
goto error;
@@ -378,10 +378,10 @@ int do_copy_objects(hid_t fidin,
break;
/*-------------------------------------------------------------------------
- * H5G_DATASET
- *-------------------------------------------------------------------------
- */
- case H5G_DATASET:
+ * H5TRAV_TYPE_DATASET
+ *-------------------------------------------------------------------------
+ */
+ case H5TRAV_TYPE_DATASET:
has_filter = 0;
@@ -399,11 +399,11 @@ int do_copy_objects(hid_t fidin,
/*-------------------------------------------------------------------------
- * check if we should use H5Ocopy or not
- * if there is a request for filters/layout, we read/write the object
- * otherwise we do a copy using H5Ocopy
- *-------------------------------------------------------------------------
- */
+ * check if we should use H5Ocopy or not
+ * if there is a request for filters/layout, we read/write the object
+ * otherwise we do a copy using H5Ocopy
+ *-------------------------------------------------------------------------
+ */
if (options->op_tbl->nelems
||
options->all_filter==1 || options->all_layout==1
@@ -445,7 +445,7 @@ int do_copy_objects(hid_t fidin,
* 1) the external filters GZIP and SZIP might not be available
* 2) the internal filters might be turned off
*-------------------------------------------------------------------------
- */
+ */
if (h5tools_canreadf((travt->objs[i].name),dcpl_id)==1)
{
apply_s=1;
@@ -473,11 +473,11 @@ int do_copy_objects(hid_t fidin,
}
/*-------------------------------------------------------------------------
- * create the output dataset;
- * disable error checking in case the dataset cannot be created with the
- * modified dcpl; in that case use the original instead
- *-------------------------------------------------------------------------
- */
+ * create the output dataset;
+ * disable error checking in case the dataset cannot be created with the
+ * modified dcpl; in that case use the original instead
+ *-------------------------------------------------------------------------
+ */
H5E_BEGIN_TRY {
dset_out=H5Dcreate(fidout,travt->objs[i].name,wtype_id,f_space_id,dcpl_out);
} H5E_END_TRY;
@@ -489,9 +489,9 @@ int do_copy_objects(hid_t fidin,
}
/*-------------------------------------------------------------------------
- * read/write
- *-------------------------------------------------------------------------
- */
+ * read/write
+ *-------------------------------------------------------------------------
+ */
if (nelmts)
{
size_t need = (size_t)(nelmts*msize); /* bytes needed */
@@ -532,9 +532,9 @@ int do_copy_objects(hid_t fidin,
vl_data = TRUE;
/*
- * determine the strip mine size and allocate a buffer. The strip mine is
- * a hyperslab whose size is manageable.
- */
+ * determine the strip mine size and allocate a buffer. The strip mine is
+ * a hyperslab whose size is manageable.
+ */
sm_nbytes = p_type_nbytes;
for (k = rank; k > 0; --k) {
@@ -606,9 +606,9 @@ int do_copy_objects(hid_t fidin,
}/*nelmts*/
/*-------------------------------------------------------------------------
- * amount of compression used
- *-------------------------------------------------------------------------
- */
+ * amount of compression used
+ *-------------------------------------------------------------------------
+ */
if (options->verbose)
{
if (apply_s && apply_f)
@@ -636,9 +636,9 @@ int do_copy_objects(hid_t fidin,
} /* verbose */
/*-------------------------------------------------------------------------
- * copy attrs
- *-------------------------------------------------------------------------
- */
+ * copy attrs
+ *-------------------------------------------------------------------------
+ */
if (copy_attr(dset_in,dset_out,options)<0)
goto error;
@@ -651,9 +651,9 @@ int do_copy_objects(hid_t fidin,
/*-------------------------------------------------------------------------
- * close
- *-------------------------------------------------------------------------
- */
+ * close
+ *-------------------------------------------------------------------------
+ */
if (H5Tclose(ftype_id)<0)
goto error;
if (H5Tclose(wtype_id)<0)
@@ -669,9 +669,9 @@ int do_copy_objects(hid_t fidin,
}
/*-------------------------------------------------------------------------
- * we do not have request for filter/chunking use H5Ocopy instead
- *-------------------------------------------------------------------------
- */
+ * we do not have request for filter/chunking use H5Ocopy instead
+ *-------------------------------------------------------------------------
+ */
else
{
hid_t pid;
@@ -685,9 +685,9 @@ int do_copy_objects(hid_t fidin,
goto error;
/*-------------------------------------------------------------------------
- * do the copy
- *-------------------------------------------------------------------------
- */
+ * do the copy
+ *-------------------------------------------------------------------------
+ */
if (H5Ocopy(fidin, /* Source file or group identifier */
travt->objs[i].name, /* Name of the source object to be copied */
@@ -703,9 +703,9 @@ int do_copy_objects(hid_t fidin,
/*-------------------------------------------------------------------------
- * copy attrs manually
- *-------------------------------------------------------------------------
- */
+ * copy attrs manually
+ *-------------------------------------------------------------------------
+ */
if ((dset_in=H5Dopen(fidin,travt->objs[i].name))<0)
goto error;
if ((dset_out=H5Dopen(fidout,travt->objs[i].name))<0)
@@ -723,10 +723,10 @@ int do_copy_objects(hid_t fidin,
break;
/*-------------------------------------------------------------------------
- * H5G_TYPE
- *-------------------------------------------------------------------------
- */
- case H5G_TYPE:
+ * H5TRAV_TYPE_NAMED_DATATYPE
+ *-------------------------------------------------------------------------
+ */
+ case H5TRAV_TYPE_NAMED_DATATYPE:
if ((type_in = H5Topen (fidin,travt->objs[i].name))<0)
goto error;
@@ -738,9 +738,9 @@ int do_copy_objects(hid_t fidin,
goto error;
/*-------------------------------------------------------------------------
- * copy attrs
- *-------------------------------------------------------------------------
- */
+ * copy attrs
+ *-------------------------------------------------------------------------
+ */
if (copy_attr(type_in,type_out,options)<0)
goto error;
@@ -756,16 +756,16 @@ int do_copy_objects(hid_t fidin,
/*-------------------------------------------------------------------------
- * H5G_LINK
- * H5G_UDLINK
- *
- * Only handles external links; H5Lcopy will fail for other UD link types
- * since we don't have creation or copy callbacks for them.
- *-------------------------------------------------------------------------
- */
-
- case H5G_LINK:
- case H5G_UDLINK:
+ * H5TRAV_TYPE_LINK
+ * H5TRAV_TYPE_UDLINK
+ *
+ * Only handles external links; H5Lcopy will fail for other UD link types
+ * since we don't have creation or copy callbacks for them.
+ *-------------------------------------------------------------------------
+ */
+
+ case H5TRAV_TYPE_LINK:
+ case H5TRAV_TYPE_UDLINK:
{
if(H5Lcopy(fidin, travt->objs[i].name,fidout, travt->objs[i].name, H5P_DEFAULT, H5P_DEFAULT) < 0)
goto error;
diff --git a/tools/h5repack/h5repack_refs.c b/tools/h5repack/h5repack_refs.c
index a29ae48..d3dff90 100644
--- a/tools/h5repack/h5repack_refs.c
+++ b/tools/h5repack/h5repack_refs.c
@@ -352,10 +352,10 @@ int do_copy_refobjs(hid_t fidin,
break;
/*-------------------------------------------------------------------------
- * H5G_LINK
+ * H5TRAV_TYPE_LINK
*-------------------------------------------------------------------------
*/
- case H5G_LINK:
+ case H5TRAV_TYPE_LINK:
/*nothing to do */
break;
diff --git a/tools/h5repack/h5repack_verify.c b/tools/h5repack/h5repack_verify.c
index 6c02e92..04b856f 100644
--- a/tools/h5repack/h5repack_verify.c
+++ b/tools/h5repack/h5repack_verify.c
@@ -248,9 +248,7 @@ int h5repack_verify(const char *fname,
{
char* name=travt->objs[i].name;
- switch ( travt->objs[i].type )
- {
- case H5G_DATASET:
+ if ( travt->objs[i].type == H5TRAV_TYPE_DATASET) {
/*-------------------------------------------------------------------------
* open
@@ -296,11 +294,7 @@ int h5repack_verify(const char *fname,
goto error;
if (H5Dclose(dset_id)<0)
goto error;
-
- break;
- default:
- break;
- } /* switch */
+ } /* if */
} /* i */
@@ -402,20 +396,7 @@ int h5repack_cmpdcpl(const char *fname1,
for ( i=0; i < travt1->nobjs; i++)
{
- switch ( travt1->objs[i].type )
- {
-/*-------------------------------------------------------------------------
- * nothing to do for groups, links and types
- *-------------------------------------------------------------------------
- */
- default:
- break;
-
-/*-------------------------------------------------------------------------
- * H5G_DATASET
- *-------------------------------------------------------------------------
- */
- case H5G_DATASET:
+ if ( travt1->objs[i].type == H5TRAV_TYPE_DATASET) {
if ((dset1=H5Dopen(fid1,travt1->objs[i].name))<0)
goto error;
if ((dset2=H5Dopen(fid2,travt1->objs[i].name))<0)
@@ -450,10 +431,7 @@ int h5repack_cmpdcpl(const char *fname1,
goto error;
if (H5Dclose(dset2)<0)
goto error;
-
- break;
-
- } /*switch*/
+ } /*if*/
} /*i*/
/*-------------------------------------------------------------------------
diff --git a/tools/h5stat/h5stat.c b/tools/h5stat/h5stat.c
index 54c517d..0f5f0a5 100644
--- a/tools/h5stat/h5stat.c
+++ b/tools/h5stat/h5stat.c
@@ -115,16 +115,11 @@ static int display_group = FALSE;
static int display_dset_metadata = FALSE;
static int display_dset = FALSE;
static int display_dtype_metadata = FALSE;
-/* Not used yet 11/17/06 EIP
-static int display_dtype = FALSE;
-*/
static int display_object = FALSE;
static int display_attr = FALSE;
/* a structure for handling the order command-line parameters come in */
struct handler_t {
- void (*func)(void *);
- int flag;
char *obj;
};
@@ -734,47 +729,58 @@ dataset_stats(hid_t group, const char *name, const H5O_info_t *oi, iter_t *iter)
*-------------------------------------------------------------------------
*/
static herr_t
-walk(hid_t group, const char *name, const H5L_info_t UNUSED *linfo, void *_iter)
+walk(hid_t group, const char *name, const H5L_info_t *linfo, void *_iter)
{
iter_t *iter = (iter_t *)_iter;
- H5O_info_t oi;
char *fullname = NULL;
- char *s;
herr_t ret; /* Generic return value */
- /* Get the full object name */
- fullname = fix_name(iter->container, name);
-
- /* Get object information */
- ret = H5Oget_info(group, name, &oi, H5P_DEFAULT);
- assert(ret >= 0);
-
- /* If the object has already been printed then just show the object ID
- * and return. */
- if((s = sym_lookup(&oi))) {
- printf("%s same as %s\n", name, s);
- } else {
- sym_insert(&oi, fullname);
-
- /* Gather some statistics about the object */
- if(oi.rc > iter->max_links)
- iter->max_links = oi.rc;
-
- switch(oi.type) {
- case H5G_GROUP:
- group_stats(group, name, fullname, &oi, walk, iter);
- break;
+ if(!linfo || linfo->type == H5L_TYPE_HARD) {
+ H5O_info_t oi;
+ char *s;
+
+ /* Get object information */
+ ret = H5Oget_info(group, name, &oi, H5P_DEFAULT);
+ assert(ret >= 0);
+
+ /* If the object has already been printed then just show the object ID
+ * and return. */
+ if((s = sym_lookup(&oi))) {
+ printf("%s same as %s\n", name, s);
+ } else {
+ /* Get the full object name */
+ fullname = fix_name(iter->container, name);
+ sym_insert(&oi, fullname);
+
+ /* Gather some statistics about the object */
+ if(oi.rc > iter->max_links)
+ iter->max_links = oi.rc;
+
+ switch(oi.type) {
+ case H5O_TYPE_GROUP:
+ group_stats(group, name, fullname, &oi, walk, iter);
+ break;
- case H5G_DATASET:
- dataset_stats(group, name, &oi, iter);
- break;
+ case H5O_TYPE_DATASET:
+ dataset_stats(group, name, &oi, iter);
+ break;
- case H5G_TYPE:
- /* Gather statistics about this type of object */
- iter->uniq_types++;
- break;
+ case H5O_TYPE_NAMED_DATATYPE:
+ /* Gather statistics about this type of object */
+ iter->uniq_types++;
+ break;
- case H5G_LINK:
+ default:
+ /* Gather statistics about this type of object */
+ iter->uniq_others++;
+ break;
+ } /* end switch */
+ }
+ } /* end if */
+ else {
+ switch(linfo->type) {
+ case H5L_TYPE_SOFT:
+ case H5L_TYPE_EXTERNAL:
/* Gather statistics about links and UD links */
iter->uniq_links++;
break;
@@ -783,8 +789,8 @@ walk(hid_t group, const char *name, const H5L_info_t UNUSED *linfo, void *_iter)
/* Gather statistics about this type of object */
iter->uniq_others++;
break;
- } /* end switch */
- }
+ } /* end switch() */
+ } /* end else */
if(fullname)
free(fullname);
@@ -823,66 +829,77 @@ parse_command_line(int argc, const char *argv[])
/* parse command line options */
while ((opt = get_option(argc, argv, s_opts, l_opts)) != EOF) {
switch ((char)opt) {
- case 'A':
- display_all = FALSE;
- display_attr = TRUE;
- break;
- case 'F':
- display_all = FALSE;
- display_file_metadata = TRUE;
- break;
- case 'f':
- display_all = FALSE;
- display_file = TRUE;
- break;
- case 'G':
- display_all = FALSE;
- display_group_metadata = TRUE;
- break;
- case 'g':
- display_all = FALSE;
- display_group = TRUE;
- break;
- case 'T':
- display_all = FALSE;
- display_dtype_metadata = TRUE;
- break;
- case 'D':
- display_all = FALSE;
- display_dset_metadata = TRUE;
- break;
- case 'd':
- display_all = FALSE;
- display_dset = TRUE;
- break;
- case 'h':
- usage(progname);
- leave(EXIT_SUCCESS);
- case 'V':
- print_version(progname);
- leave(EXIT_SUCCESS);
- break;
- case 'O':
- display_object = TRUE;
- for (i = 0; i < argc; i++)
- if (!hand[i].obj) {
- hand[i].obj = HDstrdup(opt_arg);
- hand[i].flag = 1;
- break;
- }
- break;
- default:
- usage(progname);
- leave(EXIT_FAILURE);
- }
- }
+ case 'A':
+ display_all = FALSE;
+ display_attr = TRUE;
+ break;
+
+ case 'F':
+ display_all = FALSE;
+ display_file_metadata = TRUE;
+ break;
+
+ case 'f':
+ display_all = FALSE;
+ display_file = TRUE;
+ break;
+
+ case 'G':
+ display_all = FALSE;
+ display_group_metadata = TRUE;
+ break;
+
+ case 'g':
+ display_all = FALSE;
+ display_group = TRUE;
+ break;
+
+ case 'T':
+ display_all = FALSE;
+ display_dtype_metadata = TRUE;
+ break;
+
+ case 'D':
+ display_all = FALSE;
+ display_dset_metadata = TRUE;
+ break;
+
+ case 'd':
+ display_all = FALSE;
+ display_dset = TRUE;
+ break;
+
+ case 'h':
+ usage(progname);
+ leave(EXIT_SUCCESS);
+
+ case 'V':
+ print_version(progname);
+ leave(EXIT_SUCCESS);
+ break;
+
+ case 'O':
+ display_object = TRUE;
+ for(i = 0; i < argc; i++)
+ if(!hand[i].obj) {
+ hand[i].obj = HDstrdup(opt_arg);
+ break;
+ } /* end if */
+ break;
+
+ default:
+ usage(progname);
+ leave(EXIT_FAILURE);
+ } /* end switch */
+ } /* end while */
/* check for file name to be processed */
if (argc <= opt_ind) {
error_msg(progname, "missing file name\n");
usage(progname);
leave(EXIT_FAILURE);
- }
+ } /* end if */
+
return hand;
}
@@ -1322,9 +1339,8 @@ main(int argc, const char *argv[])
}
fname = argv[opt_ind];
- hand[opt_ind].obj = root;
- hand[opt_ind].flag = 1;
- if (display_object) hand[opt_ind].flag = 0;
+ if(!display_object)
+ hand[0].obj = root;
printf("Filename: %s\n", fname);
@@ -1348,14 +1364,12 @@ main(int argc, const char *argv[])
}
/* Walk the objects or all file */
- for(i = 0; i < argc; i++) {
- if(hand[i].obj) {
- if(hand[i].flag) {
- walk(fid, hand[i].obj, NULL, &iter);
- print_statistics(hand[i].obj, &iter);
- }
- }
- }
+ i = 0;
+ while(hand[i].obj) {
+ walk(fid, hand[i].obj, NULL, &iter);
+ print_statistics(hand[i].obj, &iter);
+ i++;
+ } /* end while */
free(hand);
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c
index e0174b0..3edd6e8 100644
--- a/tools/lib/h5diff.c
+++ b/tools/lib/h5diff.c
@@ -453,14 +453,14 @@ hsize_t diff_match(hid_t file1_id,
*/
/*Set up args to pass to worker task. */
- if(strlen(table->objs[i].name) > 255) {
+ if(HDstrlen(table->objs[i].name) > 255) {
printf("The parallel diff only supports object names up to 255 characters\n");
MPI_Abort(MPI_COMM_WORLD, 0);
} /* end if */
HDstrcpy(args.name, table->objs[i].name);
args.options = *options;
- args.type= table->objs[i].type;
+ args.type = table->objs[i].type;
h5diffdebug2("busyTasks=%d\n", busyTasks);
/* if there are any outstanding print requests, let's handle one. */
@@ -516,7 +516,7 @@ hsize_t diff_match(hid_t file1_id,
for(n = 1; (n < g_nTasks) && !workerFound; n++) {
if(workerTasks[n-1]) {
/* send file id's and names to first free worker */
- MPI_Send(&args, sizeof(struct diff_args), MPI_BYTE, n, MPI_TAG_ARGS, MPI_COMM_WORLD);
+ MPI_Send(&args, sizeof(args), MPI_BYTE, n, MPI_TAG_ARGS, MPI_COMM_WORLD);
/* increment counter for total number of prints. */
busyTasks++;
@@ -547,7 +547,7 @@ hsize_t diff_match(hid_t file1_id,
nfound += nFoundbyWorker.nfound;
options->not_cmp = options->not_cmp | nFoundbyWorker.not_cmp;
/* send this task the work unit. */
- MPI_Send(&args, sizeof(struct diff_args), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_ARGS, MPI_COMM_WORLD);
+ MPI_Send(&args, sizeof(args), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_ARGS, MPI_COMM_WORLD);
} /* end if */
} /* end while */
} /* end if */
@@ -560,7 +560,7 @@ hsize_t diff_match(hid_t file1_id,
MPI_Recv(&nFoundbyWorker, sizeof(nFoundbyWorker), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_DONE, MPI_COMM_WORLD, &Status);
nfound += nFoundbyWorker.nfound;
options->not_cmp = options->not_cmp | nFoundbyWorker.not_cmp;
- MPI_Send(&args, sizeof(struct diff_args), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_ARGS, MPI_COMM_WORLD);
+ MPI_Send(&args, sizeof(args), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_ARGS, MPI_COMM_WORLD);
} /* end if */
else if(Status.MPI_TAG == MPI_TAG_TOK_REQUEST) {
int incomingMessage;
@@ -577,7 +577,7 @@ hsize_t diff_match(hid_t file1_id,
MPI_Recv(&nFoundbyWorker, sizeof(nFoundbyWorker), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_TOK_RETURN, MPI_COMM_WORLD, &Status);
nfound += nFoundbyWorker.nfound;
options->not_cmp = options->not_cmp | nFoundbyWorker.not_cmp;
- MPI_Send(&args, sizeof(struct diff_args), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_ARGS, MPI_COMM_WORLD);
+ MPI_Send(&args, sizeof(args), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_ARGS, MPI_COMM_WORLD);
} /* end else-if */
else {
printf("ERROR: Invalid tag (%d) received \n", Status.MPI_TAG);
@@ -744,10 +744,9 @@ hsize_t diff_compare (hid_t file1_id,
if (info1->paths[i].type != info2->paths[j].type)
{
if (options->m_verbose)
- parallel_print
- ("Comparison not possible: <%s> is of type %s and <%s> is of type %s\n",
- obj1_name, get_type (info1->paths[i].type), obj2_name,
- get_type (info2->paths[j].type));
+ parallel_print("Comparison not possible: <%s> is of type %s and <%s> is of type %s\n",
+ obj1_name, get_type(info1->paths[i].type), obj2_name,
+ get_type(info2->paths[j].type));
options->not_cmp=1;
return 0;
}
diff --git a/tools/lib/h5diff.h b/tools/lib/h5diff.h
index 60e96b2..373eeed 100644
--- a/tools/lib/h5diff.h
+++ b/tools/lib/h5diff.h
@@ -150,7 +150,7 @@ void print_found(hsize_t nfound);
void parallel_print(const char* format, ... );
void print_type(hid_t type);
const char* diff_basename(const char *name);
-const char* get_type(int type);
+const char* get_type(h5trav_type_t type);
const char* get_class(H5T_class_t tclass);
const char* get_sign(H5T_sign_t sign);
void print_dimensions (int rank, hsize_t *dims);
diff --git a/tools/lib/h5diff_util.c b/tools/lib/h5diff_util.c
index bd8207f..9e9c556 100644
--- a/tools/lib/h5diff_util.c
+++ b/tools/lib/h5diff_util.c
@@ -261,23 +261,22 @@ diff_basename(const char *name)
*-------------------------------------------------------------------------
*/
const char*
-get_type(int type)
+get_type(h5trav_type_t type)
{
- switch (type)
- {
- case H5G_DATASET:
- return("H5G_DATASET");
- case H5G_GROUP:
- return("H5G_GROUP");
- case H5G_TYPE:
- return("H5G_TYPE");
- case H5G_LINK:
- return("H5G_LINK");
- case H5G_UDLINK:
- return("H5G_UDLINK");
- default:
- return("user defined type");
- }
+ switch(type) {
+ case H5TRAV_TYPE_DATASET:
+ return("H5G_DATASET");
+ case H5TRAV_TYPE_GROUP:
+ return("H5G_GROUP");
+ case H5TRAV_TYPE_NAMED_DATATYPE:
+ return("H5G_TYPE");
+ case H5TRAV_TYPE_LINK:
+ return("H5G_LINK");
+ case H5TRAV_TYPE_UDLINK:
+ return("H5G_UDLINK");
+ default:
+ return("unknown type");
+ }
}
/*-------------------------------------------------------------------------
diff --git a/tools/lib/ph5diff.h b/tools/lib/ph5diff.h
index d904095..3ad158f 100644
--- a/tools/lib/ph5diff.h
+++ b/tools/lib/ph5diff.h
@@ -41,7 +41,7 @@ extern FILE * overflow_file;
struct diff_args
{
char name[256];
- H5G_obj_t type;
+ h5trav_type_t type;
diff_opt_t options;
};