From 4741f66a9eb42a5a6f71ab7366566a22acaec973 Mon Sep 17 00:00:00 2001 From: tradke Date: Sun, 12 Jan 2003 13:31:30 +0000 Subject: Parameter Cactus::max_runtime is now evaluated as REAL. Fixed wrong logical operation in MPI_Allreduce() call in DoneMainLoop(). git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@404 b61c5cb5-eaca-4651-9a7a-d64986f99364 --- src/Evolve.c | 5 ++--- 1 file 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; -- cgit v1.2.3