summaryrefslogtreecommitdiffstats
path: root/tools/h5diff/h5diff_main.c
diff options
context:
space:
mode:
authorLeon Arber <larber@ncsa.uiuc.edu>2005-01-27 23:21:05 (GMT)
committerLeon Arber <larber@ncsa.uiuc.edu>2005-01-27 23:21:05 (GMT)
commit839f1092da94c17b5f541acdd899e00bc13ef31f (patch)
tree6e3bae867ebceee26ba4c196bee86973456e5858 /tools/h5diff/h5diff_main.c
parent046fe35568d6393cf887b9d6e9e95ccd36917b4a (diff)
downloadhdf5-839f1092da94c17b5f541acdd899e00bc13ef31f.zip
hdf5-839f1092da94c17b5f541acdd899e00bc13ef31f.tar.gz
hdf5-839f1092da94c17b5f541acdd899e00bc13ef31f.tar.bz2
[svn-r9877] Purpose:
Bug fix: Temporary fix for h5repack failures in all parallel builds. Description: The parallel additions to h5diff interfered with h5repack. Solution: Added a second set of "parallel" functions to h5diff.c. h5repack uses the serial versions, whereas h5diff will use the parallel versions. Also, h5diff will now be smart about when to enter parallel mode. If is run with mpirun with more than 1 task, it will enter parallel mode. Otherwise, it will stay in serial mode as before. Platforms tested: heping (serial and parallel) Misc. update:
Diffstat (limited to 'tools/h5diff/h5diff_main.c')
-rw-r--r--tools/h5diff/h5diff_main.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/tools/h5diff/h5diff_main.c b/tools/h5diff/h5diff_main.c
index bab980a..d25904f 100644
--- a/tools/h5diff/h5diff_main.c
+++ b/tools/h5diff/h5diff_main.c
@@ -73,13 +73,6 @@ int main(int argc, const char *argv[])
MPI_Comm_rank(MPI_COMM_WORLD, &nID);
MPI_Comm_size(MPI_COMM_WORLD, &g_nTasks);
- if(g_nTasks < 2)
- {
- printf("Must have at least 2 tasks to run parallel diff\n");
- MPI_Finalize();
- exit(-1);
- }
-
/* Have the manager process the command-line */
if(nID == 0)
{
@@ -224,10 +217,14 @@ int main(int argc, const char *argv[])
}/*for*/
- nfound = h5diff(fname1,fname2,objname1,objname2,&options);
+ if(g_nTasks < 2)
+ nfound = h5diff(fname1,fname2,objname1,objname2,&options);
+ else
+ nfound = h5diff_parallel(fname1,fname2,objname1,objname2,&options);
#ifdef H5_HAVE_PH5DIFF
- MPI_Barrier(MPI_COMM_WORLD);
+ if(g_nTasks > 1)
+ MPI_Barrier(MPI_COMM_WORLD);
#endif
/*-------------------------------------------------------------------------