diff options
author | lanfer <lanfer@b61c5cb5-eaca-4651-9a7a-d64986f99364> | 2000-03-17 15:44:13 +0000 |
---|---|---|
committer | lanfer <lanfer@b61c5cb5-eaca-4651-9a7a-d64986f99364> | 2000-03-17 15:44:13 +0000 |
commit | 9327965ee7c2b935f823cd82015949d44e458227 (patch) | |
tree | b33006d9e09f5e45af6c16cd40eb212cac12b323 /src/Comm.c | |
parent | 57df312b3027097a588b3782c9553471b82e3554 (diff) |
overloading CCTK_Exit with: int pugh_Exit(int retval, cGH *GH)
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@178 b61c5cb5-eaca-4651-9a7a-d64986f99364
Diffstat (limited to 'src/Comm.c')
-rw-r--r-- | src/Comm.c | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -14,6 +14,8 @@ #include <stdio.h> #include <stdarg.h> #include <string.h> +#include <assert.h> +#include <unistd.h> #include "cctk.h" @@ -737,14 +739,21 @@ int pugh_ParallelInit(cGH *GH) return 0; } -int pugh_Exit(cGH *GH) +int pugh_Exit(int retval, cGH *GH) { - return 0; +#ifdef MPI + if(MPI_Active) + { + CACTUS_MPI_ERROR(MPI_Finalize()); + } +#endif + exit(retval); } int pugh_Abort(cGH *GH) { - return 0; + assert(0); + exit(0); } |