aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreschnett <eschnett@ec5ace1c-6809-4267-9cad-ed2f0ecfe59c>2011-01-28 17:43:57 +0000
committereschnett <eschnett@ec5ace1c-6809-4267-9cad-ed2f0ecfe59c>2011-01-28 17:43:57 +0000
commit4d99650c95c04ff0aefc0009c25345437eb6ca7b (patch)
treef189cf87b71ee9233d3f5c154f144f874cf592e9
parentffb2650beab4f35c554c33e420295948f6222ac4 (diff)
Create termination file unconditionally, because the parameter may be steered
git-svn-id: http://svn.cactuscode.org/arrangements/CactusUtils/TerminationTrigger/trunk@8 ec5ace1c-6809-4267-9cad-ed2f0ecfe59c
-rw-r--r--src/file.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/file.c b/src/file.c
index ec111ef..330f0b9 100644
--- a/src/file.c
+++ b/src/file.c
@@ -54,6 +54,10 @@ const char * get_termination_file (void)
+/* Note that the termination file is created even if
+ termination_from_file is false. This is because
+ termination_from_file is steerable and may be changed to true at
+ run time. */
void TerminationTrigger_CreateFile (CCTK_ARGUMENTS)
{
DECLARE_CCTK_ARGUMENTS;
@@ -81,6 +85,11 @@ void TerminationTrigger_CheckFile (CCTK_ARGUMENTS)
FILE *file;
int terminate;
+ if (! termination_from_file)
+ {
+ return;
+ }
+
/* only one processor needs to check the file */
if (CCTK_MyProc (cctkGH) != 0)
{