aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortradke <tradke@ebee0441-1374-4afa-a3b5-247f3ba15b9a>2000-10-05 12:23:56 +0000
committertradke <tradke@ebee0441-1374-4afa-a3b5-247f3ba15b9a>2000-10-05 12:23:56 +0000
commitd4c141d8d76072f79e6ea70d4759fdaf0d8e03aa (patch)
tree902cfb9d9ee3cd80651afc67abff725b386e0543
parent3d2a77163033c72ab235e40100b7bddc39a1cb7e (diff)
Reactivated the termination checkpoint routine.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOFlexIO/trunk@160 ebee0441-1374-4afa-a3b5-247f3ba15b9a
-rw-r--r--schedule.ccl10
-rw-r--r--src/DumpGH.c32
2 files changed, 20 insertions, 22 deletions
diff --git a/schedule.ccl b/schedule.ccl
index ae76b4a..3d432c5 100644
--- a/schedule.ccl
+++ b/schedule.ccl
@@ -8,7 +8,7 @@ schedule IOFlexIO_Startup at STARTUP after ( IOUtil_Startup Driver_Startup )
LANG:C
} "Startup routine"
-schedule IOFlexIO_TerminateGH at CCTK_TERMINATE
+schedule IOFlexIO_TerminateGH at CCTK_TERMINATE after IOFlexIO_TerminationDumpGH
{
LANG:C
} "Closing open IEEEIO files"
@@ -36,10 +36,10 @@ schedule IOFlexIO_ConditionallyDumpGH at CCTK_CHECKPOINT
LANG:C
} "Regular checkpoint routine"
-#schedule IOFlexIO_TerminationDumpGH at CCTK_TERMINATE BEFORE Driver_Terminate
-#{
-# LANG:C
-#} "Termination checkpoint routine"
+schedule IOFlexIO_TerminationDumpGH at CCTK_TERMINATE BEFORE Driver_Terminate
+{
+ LANG:C
+} "Termination checkpoint routine"
if (! CCTK_Equals (recover, "no") && *recover_file)
{
diff --git a/src/DumpGH.c b/src/DumpGH.c
index 464515e..4c8c40a 100644
--- a/src/DumpGH.c
+++ b/src/DumpGH.c
@@ -73,31 +73,29 @@ void IOFlexIO_ConditionallyDumpGH (cGH *GH)
@date Fri Aug 21 14:40:21 1998
@author Gabrielle Allen
@desc
- This routine is registered as CCTK_TERMINATE, it checks if a
- termination signal is raised (that is: global var cactus_terminate
- set to TERMINATION_RAISED_BRDCAST by ./steppers/TerminationStepper.c)
- and checkpoints all available grid hierarchies.
+ This routine is registered as CCTK_TERMINATE
+ and does a checkpoint if the parameter
+ 'IO::checkpoint_on_terminate' was set.
@enddesc
- @calls IOFlexIO_DumpGH
- @history
-
- @endhistory
-
+ @calls IOFlexIO_DumpGH
+ @var GH
+ @vdesc Pointer to CCTK grid hierarchy
+ @vtype cGH
+ @vio in
+ @endvar
@@*/
-
void IOFlexIO_TerminationDumpGH (cGH *GH)
{
-/*** FIXME: no cactus_terminate flag anymore ? ***/
-#if 0
- if (cactus_terminate == TERMINATION_RAISED_BRDCAST)
+ DECLARE_CCTK_PARAMETERS
+
+
+ if (checkpoint && checkpoint_on_terminate)
{
- IOFlexIO_DumpGH (GH, CP_EVOLUTION_DATA);
+ IOFlexIO_DumpGH (GH, CP_EVOLUTION_DATA);
}
-#else
- CCTK_WARN (1, "TerminationDumpGH() not yet implemented !");
-#endif
}
+
/*@@
@routine IOFlexIO_InitialDataDumpGH
@date Fri Aug 21 14:46:28 1998