diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2004-02-04 22:43:00 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2004-02-04 22:43:00 (GMT) |
commit | 1b147875db41924cc04bd2cd577676b197ae34ab (patch) | |
tree | dad62fe010c89dfc1db13202aa24fe03d936c3fb /tools/h5dump | |
parent | c238a6c13cdd0107fdf2c5ee0145a9b3d773fc92 (diff) | |
download | hdf5-1b147875db41924cc04bd2cd577676b197ae34ab.zip hdf5-1b147875db41924cc04bd2cd577676b197ae34ab.tar.gz hdf5-1b147875db41924cc04bd2cd577676b197ae34ab.tar.bz2 |
[svn-r8151] Purpose:
Bug fix
Description:
Fix h5tools routines to not try to call MPI_Init() unless an MPI-based
VFD is actually used.
Platforms tested:
FreeBSD 4.9 (sleipnir) w/parallel
Linux 2.4 (verbena) w/parallel
Diffstat (limited to 'tools/h5dump')
-rw-r--r-- | tools/h5dump/h5dump.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c index b69d3b9..76c7b04 100644 --- a/tools/h5dump/h5dump.c +++ b/tools/h5dump/h5dump.c @@ -542,10 +542,8 @@ static const dump_functions *dump_function_table; static void leave(int ret) { - H5close(); -#ifdef H5_HAVE_PARALLEL - MPI_Finalize(); -#endif + h5tools_close(); + exit(ret); } @@ -2784,10 +2782,6 @@ main(int argc, const char *argv[]) struct handler_t *hand; int i; -#ifdef H5_HAVE_PARALLEL - MPI_Init(&argc, &argv); -#endif - dump_header_format = &standardformat; dump_function_table = &ddl_function_table; @@ -2841,7 +2835,7 @@ main(int argc, const char *argv[]) } fname = argv[opt_ind]; - fid = h5tools_fopen(fname, driver, NULL, 0); + fid = h5tools_fopen(fname, driver, NULL, 0, argc, argv); if (fid < 0) { error_msg(progname, "unable to open file \"%s\"\n", fname); @@ -3010,19 +3004,13 @@ done: /* To Do: clean up XML table */ - h5tools_close(); #ifdef H5_WANT_H5_V1_6_COMPAT H5Eset_auto(func, edata); #else H5Eset_auto(H5E_DEFAULT, func, edata); #endif /* H5_WANT_H5_V1_6_COMPAT */ - H5close(); -#ifdef H5_HAVE_PARALLEL - MPI_Finalize(); -#endif - - return d_status; + leave(d_status); } /*------------------------------------------------------------------------- |