From 980d1837908aa700efcf7edc0be62a9fc207c6ed Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Tue, 20 May 2008 14:08:45 -0500 Subject: [svn-r15045] Bug fix. Description: perf would crash at the end as it complained it was doing MPI calls after MPI_Finalize() is called. I suspect the HDF5 library is making MPI calls in the at_exit area. This should not happened. Solution: Added the H5exit() right before MPI_Finalize() fixed the problem. But it needs to find out why HDF5 library is making MPI calls in the at_exit() area. It should not. Also, changed the temporay data file name from /tmp/test.out to perftest.out, both to avoid multiple instance of this may use the same /tmp/xxx name and also make the file name less generic. Tested: Kagiso PP. --- perform/perf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/perform/perf.c b/perform/perf.c index 33f7433..d0c49f6 100644 --- a/perform/perf.c +++ b/perform/perf.c @@ -77,8 +77,8 @@ int opt_iter = 1; int opt_stripe = -1; int opt_correct = 0; int amode = O_RDWR | O_CREAT; -char opt_file[256] = "/tmp/test.out\0"; -char opt_pvfstab[256] = "notset\0"; +char opt_file[256] = "perftest.out"; +char opt_pvfstab[256] = "notset"; int opt_pvfstab_set = 0; /* function prototypes */ @@ -372,6 +372,8 @@ die_jar_jar_die: free(tmp); if (opt_correct) free(tmp2); + /* Close down the HDF5 library before MPI_Finalize. */ + H5close(); MPI_Finalize(); return(0); } -- cgit v0.12