aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortradke <tradke@b61c5cb5-eaca-4651-9a7a-d64986f99364>2003-01-12 13:31:30 +0000
committertradke <tradke@b61c5cb5-eaca-4651-9a7a-d64986f99364>2003-01-12 13:31:30 +0000
commit4741f66a9eb42a5a6f71ab7366566a22acaec973 (patch)
tree0751b165c7130291dac259b15615662b3b8ef280
parentd231abbd392178ab64de814775d9b9c8bf8f4195 (diff)
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
-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;