aboutsummaryrefslogtreecommitdiff
path: root/src/Evolve.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Evolve.c')
-rw-r--r--src/Evolve.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Evolve.c b/src/Evolve.c
index d3b54f5..298b27a 100644
--- a/src/Evolve.c
+++ b/src/Evolve.c
@@ -224,8 +224,7 @@ static int DoneMainLoop (const cGH *GH, CCTK_REAL simulation_time,int iteration)
/* get the elapsed runtime in minutes and compare with max_runtime */
gettimeofday (&runtime, NULL);
runtime.tv_sec -= starttime.tv_sec;
- runtime.tv_sec /= 60;
- max_runtime_reached = runtime.tv_sec >= max_runtime;
+ max_runtime_reached = ((CCTK_REAL) runtime.tv_sec / 60.0) >= max_runtime;
}
#endif
@@ -265,7 +264,7 @@ static int DoneMainLoop (const cGH *GH, CCTK_REAL simulation_time,int iteration)
#ifdef CCTK_MPI
/* reduce the local flags from all processors
into a single global termination flag */
- CACTUS_MPI_ERROR (MPI_Allreduce (&local, &global, 1, PUGH_MPI_INT, MPI_LAND,
+ CACTUS_MPI_ERROR (MPI_Allreduce (&local, &global, 1, PUGH_MPI_INT, MPI_MAX,
PUGH_pGH (GH)->PUGH_COMM_WORLD));
#else
global = local;