diff options
author | Albert Cheng <acheng@hdfgroup.org> | 2005-03-03 22:29:07 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 2005-03-03 22:29:07 (GMT) |
commit | 5c990d854e21e7f6ab44624f09e4dbce70147c6b (patch) | |
tree | ab663c401e3c0cbc629a661af24a6305faa9838e /tools/h5diff | |
parent | 84ffc9d1c1318ae3f31becddb279179507faf0e5 (diff) | |
download | hdf5-5c990d854e21e7f6ab44624f09e4dbce70147c6b.zip hdf5-5c990d854e21e7f6ab44624f09e4dbce70147c6b.tar.gz hdf5-5c990d854e21e7f6ab44624f09e4dbce70147c6b.tar.bz2 |
[svn-r10136] Purpose:
Bug fix.
Description:
MPI_LONG_LONG, which is not standard yet, was used to pass the
nubmer of differences found. This was needed because number of
differences is defined as type 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.
This fix was actually Leon's idea.
Platforms tested:
Tested in QSC in which this failed.
Diffstat (limited to 'tools/h5diff')
-rw-r--r-- | tools/h5diff/ph5diff_main.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/h5diff/ph5diff_main.c b/tools/h5diff/ph5diff_main.c index 81d64ea..cd252b9 100644 --- a/tools/h5diff/ph5diff_main.c +++ b/tools/h5diff/ph5diff_main.c @@ -186,10 +186,16 @@ ph5diff_worker(int nID) memset(outBuff, 0, OUTBUFF_SIZE); outBuffOffset = 0; - MPI_Send(&nfound, 1, MPI_LONG_LONG, 0, MPI_TAG_TOK_RETURN, MPI_COMM_WORLD); + /* 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); } else - MPI_Send(&nfound, 1, MPI_LONG_LONG, 0, MPI_TAG_DONE, MPI_COMM_WORLD); + MPI_Send(&nfound, sizeof(nfound), MPI_BYTE, 0, MPI_TAG_DONE, MPI_COMM_WORLD); } else if(Status.MPI_TAG == MPI_TAG_END) |