diff options
author | tradke <tradke@d60812e6-3970-4df4-986e-c251b06effeb> | 2002-06-03 09:47:01 +0000 |
---|---|---|
committer | tradke <tradke@d60812e6-3970-4df4-986e-c251b06effeb> | 2002-06-03 09:47:01 +0000 |
commit | 59e5a2f28de32863aec31e40207d722d816de725 (patch) | |
tree | 14d138d0099b2df26f9ce74b502dc5200c8ae327 | |
parent | 470450140af310f33ad5c1f77316ff8d9731a8a5 (diff) |
Fixed a compiler warning.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGHReduce/trunk@28 d60812e6-3970-4df4-986e-c251b06effeb
-rw-r--r-- | src/ReductionNormInf.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/ReductionNormInf.c b/src/ReductionNormInf.c index 4e0569a..b93ce49 100644 --- a/src/ReductionNormInf.c +++ b/src/ReductionNormInf.c @@ -216,8 +216,8 @@ static int PUGH_ReductionNormInf (cGH *GH, CCTK_REAL outvals[/*num_inarrays*num_outvals*/]) { int i, total_outvals; - pGH *pughGH; #ifdef CCTK_MPI + pGH *pughGH; CCTK_REAL *local_outvals; #endif @@ -325,16 +325,15 @@ static int PUGH_ReductionNormInf (cGH *GH, } } - pughGH = PUGH_pGH (GH); - #ifdef CCTK_MPI /* do the global reduction from the processors' local reduction results */ - if (pughGH->nprocs > 1) + if (CCTK_nProcs (GH) > 1) { local_outvals = (CCTK_REAL *) malloc (total_outvals * sizeof (CCTK_REAL)); /* outvals[] contains now the local sum */ memcpy (local_outvals, outvals, total_outvals * sizeof (CCTK_REAL)); + pughGH = PUGH_pGH (GH); if (proc < 0) { CACTUS_MPI_ERROR (MPI_Allreduce (local_outvals, outvals, total_outvals, |