summaryrefslogtreecommitdiffstats
path: root/testpar/t_pflush1.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2015-02-22 08:38:18 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2015-02-22 08:38:18 (GMT)
commitf634105bdb7c494a5ab39291d64c00676c11b476 (patch)
tree822ef161e763b0f354f670ffc073e1129b3a10cb /testpar/t_pflush1.c
parentfcd77ffe7ea32017bc00aa7652e7abd91d8b0b89 (diff)
downloadhdf5-f634105bdb7c494a5ab39291d64c00676c11b476.zip
hdf5-f634105bdb7c494a5ab39291d64c00676c11b476.tar.gz
hdf5-f634105bdb7c494a5ab39291d64c00676c11b476.tar.bz2
[svn-r26271] Reverse merge of r26260 which was causing daily test failures.
Tested on: jam w/ parallel and fortran
Diffstat (limited to 'testpar/t_pflush1.c')
-rw-r--r--testpar/t_pflush1.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/testpar/t_pflush1.c b/testpar/t_pflush1.c
index 1bcfeb8..ebe5c38 100644
--- a/testpar/t_pflush1.c
+++ b/testpar/t_pflush1.c
@@ -164,9 +164,12 @@ main(int argc, char* argv[])
} /* end else */
/*
- * Some systems like AIX do not like files not closed when MPI_Finalize
- * is called. So, we need to get the MPI file handles, close them by hand.
- * Then the _exit is still needed to stop at_exit from happening in some systems.
+ * Some systems like Linux with mpich, if you just _exit without MPI_Finalize
+ * called, it would terminate but left the launching process waiting forever.
+ * OTHO, some systems like AIX do not like files not closed when MPI_Finalize
+ * is called. So, we need to get the MPI file handles, close them by hand,
+ * then MPI_Finalize. Then the _exit is still needed to stop at_exit from
+ * happening in some systems.
* Note that MPIO VFD returns the address of the file-handle in the VFD struct
* because MPI_File_close wants to modify the file-handle variable.
*/
@@ -192,11 +195,13 @@ main(int argc, char* argv[])
fflush(stdout);
fflush(stderr);
+ MPI_Finalize();
HD_exit(0);
error:
fflush(stdout);
fflush(stderr);
+ MPI_Finalize();
HD_exit(1);
}