diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/lib/h5diff.c | 7 | ||||
-rw-r--r-- | tools/lib/h5tools_utils.c | 1 | ||||
-rw-r--r-- | tools/lib/h5tools_utils.h | 1 | ||||
-rw-r--r-- | tools/lib/h5trav.c | 17 |
4 files changed, 25 insertions, 1 deletions
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c index 8b6ace9..e297c8f 100644 --- a/tools/lib/h5diff.c +++ b/tools/lib/h5diff.c @@ -899,7 +899,7 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char H5TOOLS_DEBUG("groups traversed - errstat:%d", opts->err_stat); #ifdef H5_HAVE_PARALLEL - if(g_Parallel) { + if(g_Parallel && !g_CollectInfoOnly) { int i; if((HDstrlen(fname1) > MAX_FILENAME) || (HDstrlen(fname2) > MAX_FILENAME)) { @@ -914,6 +914,11 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char for(i = 1; i < g_nTasks; i++) MPI_Send(filenames, (MAX_FILENAME * 2), MPI_CHAR, i, MPI_TAG_PARALLEL, MPI_COMM_WORLD); } /* end if */ + else if (g_CollectInfoOnly) { + build_match_list (obj1fullname, info1_lp, obj2fullname, info2_lp, &match_list, opts); + + } + #endif H5TOOLS_DEBUG("build_match_list next - errstat:%d", opts->err_stat); diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c index 1a1c2db..2d53030 100644 --- a/tools/lib/h5tools_utils.c +++ b/tools/lib/h5tools_utils.c @@ -48,6 +48,7 @@ hsize_t H5TOOLS_BUFSIZE = ( 32 * 1024 * 1024); /* 32 MB */ /* ``parallel_print'' variables */ unsigned char g_Parallel = 0; /*0 for serial, 1 for parallel */ +unsigned char g_CollectInfoOnly = 0; char outBuff[OUTBUFF_SIZE]; unsigned outBuffOffset; FILE* overflow_file = NULL; diff --git a/tools/lib/h5tools_utils.h b/tools/lib/h5tools_utils.h index 42144cc..a05f883 100644 --- a/tools/lib/h5tools_utils.h +++ b/tools/lib/h5tools_utils.h @@ -32,6 +32,7 @@ extern "C" { H5TOOLS_DLLVAR int g_nTasks; H5TOOLS_DLLVAR unsigned char g_Parallel; +H5TOOLS_DLLVAR unsigned char g_CollectInfoOnly; H5TOOLS_DLLVAR char outBuff[]; H5TOOLS_DLLVAR unsigned outBuffOffset; H5TOOLS_DLLVAR FILE *overflow_file; diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c index dc7e27d..a9b5b75 100644 --- a/tools/lib/h5trav.c +++ b/tools/lib/h5trav.c @@ -15,6 +15,9 @@ #include "h5trav.h" #include "h5tools.h" #include "H5private.h" +#ifdef H5_HAVE_PARALLEL +#include "h5tools_utils.h" +#endif /*------------------------------------------------------------------------- * local typedefs @@ -179,8 +182,10 @@ static herr_t traverse_cb(hid_t loc_id, const char *path, const H5L_info2_t *linfo, void *_udata) { + herr_t ret_value = SUCCEED; trav_ud_traverse_t *udata = (trav_ud_traverse_t *)_udata; /* User data */ char *new_name = NULL; + const char *full_name; const char *already_visited = NULL; /* Whether the link/object was already visited */ @@ -201,6 +206,18 @@ traverse_cb(hid_t loc_id, const char *path, const H5L_info2_t *linfo, else full_name = path; +#ifdef H5_HAVE_PARALLEL + if(linfo->type == H5L_TYPE_EXTERNAL) { + h5tool_link_info_t lnk_info; + if ((ret_value = H5tools_get_symlink_info(loc_id, path, &lnk_info, FALSE)) < 0) { + puts("H5tools_get_symlink_info failed!"); + } + else if (ret_value == 0) { + puts("Dangling link?"); + } + printf("Visiting external link: %s\n", path); + } +#endif /* Perform the correct action for different types of links */ if(linfo->type == H5L_TYPE_HARD) { H5O_info2_t oinfo; |