summaryrefslogtreecommitdiffstats
path: root/tools/h5diff/ph5diff_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/h5diff/ph5diff_main.c')
-rw-r--r--tools/h5diff/ph5diff_main.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/tools/h5diff/ph5diff_main.c b/tools/h5diff/ph5diff_main.c
index 871b93b..67b0c92 100644
--- a/tools/h5diff/ph5diff_main.c
+++ b/tools/h5diff/ph5diff_main.c
@@ -245,3 +245,32 @@ ph5diff_worker(int nID)
}
}
+/*-------------------------------------------------------------------------
+ * Function: h5diff_exit
+ *
+ * Purpose: dismiss phdiff worker processes and exit
+ *
+ * Return: none
+ *
+ * Programmer: Albert Cheng
+ * Date: Feb 6, 2005
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void h5diff_exit(int status)
+{
+ /* if in parallel mode, dismiss workers, close down MPI, then exit */
+ if((g_nTasks > 1) && g_Parallel) {
+ phdiff_dismiss_workers();
+ MPI_Barrier(MPI_COMM_WORLD);
+ }
+ if(g_Parallel)
+ MPI_Finalize();
+
+ exit(status);
+}
+