aboutsummaryrefslogtreecommitdiff
path: root/src/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/file.c')
-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)
{