diff options
author | Leon Arber <larber@ncsa.uiuc.edu> | 2005-06-28 19:20:56 (GMT) |
---|---|---|
committer | Leon Arber <larber@ncsa.uiuc.edu> | 2005-06-28 19:20:56 (GMT) |
commit | ac2e0d548eaab1cb3c3875ed4cd842de8aed6b41 (patch) | |
tree | dbadb82fbd2a675da7aa4afc9441b3a7cfc89691 /tools/h5diff/ph5diff_main.c | |
parent | 92723c7e02110865a393547e942e53cdefd2315a (diff) | |
download | hdf5-ac2e0d548eaab1cb3c3875ed4cd842de8aed6b41.zip hdf5-ac2e0d548eaab1cb3c3875ed4cd842de8aed6b41.tar.gz hdf5-ac2e0d548eaab1cb3c3875ed4cd842de8aed6b41.tar.bz2 |
[svn-r10996] Purpose:
Bug fix for parallel case for new "Some objects were not comparable" patch to h5diff.
Description:
The parallel h5diff wouldn't print out "Some objects were not comparable" because the worker
tasks were not communicating the not_cmp flag of the diff_opt_t struct back to the manager, who ultimately
prints everything.
Also, some miscellaneous fixes for error printing. Some errors were printed out with printf instead of fprintf(stderr,...).
In parallel environments, this can result in output getting lost.
Solution:
Had the worker tasks pass along the not_cmp flag to the manager when they sent along
the number of differences they found.
Platforms tested:
heping (pp), sol (pp)
Misc. update:
Diffstat (limited to 'tools/h5diff/ph5diff_main.c')
-rw-r--r-- | tools/h5diff/ph5diff_main.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/tools/h5diff/ph5diff_main.c b/tools/h5diff/ph5diff_main.c index 082a6bd..3b6267d 100644 --- a/tools/h5diff/ph5diff_main.c +++ b/tools/h5diff/ph5diff_main.c @@ -131,6 +131,7 @@ ph5diff_worker(int nID) char filenames[2][1024]; char out_data[PRINT_DATA_MAX_SIZE] = {0}; hsize_t nfound=0; + struct diffs_found diffs; int i; MPI_Status Status; @@ -169,6 +170,8 @@ ph5diff_worker(int nID) MPI_Recv(&args, sizeof(struct diff_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; + diffs.not_cmp = args.options.not_cmp; /*If print buffer has something in it, request print token.*/ if(outBuffOffset>0) @@ -213,16 +216,10 @@ ph5diff_worker(int nID) memset(outBuff, 0, OUTBUFF_SIZE); outBuffOffset = 0; - /* Since the data type of diff value is hsize_t which can - * be arbitary large such that there is no MPI type that - * matches it, the value is passed between processes as - * an array of bytes in order to be portable. But this - * may not work in non-homogeneous MPI environments. - */ - MPI_Send(&nfound, sizeof(nfound), MPI_BYTE, 0, MPI_TAG_TOK_RETURN, MPI_COMM_WORLD); + MPI_Send(&diffs, sizeof(diffs), MPI_BYTE, 0, MPI_TAG_TOK_RETURN, MPI_COMM_WORLD); } else - MPI_Send(&nfound, sizeof(nfound), MPI_BYTE, 0, MPI_TAG_DONE, MPI_COMM_WORLD); + MPI_Send(&diffs, sizeof(diffs), MPI_BYTE, 0, MPI_TAG_DONE, MPI_COMM_WORLD); } else if(Status.MPI_TAG == MPI_TAG_END) { |