diff options
Diffstat (limited to 'src/ReductionSum.c')
-rw-r--r-- | src/ReductionSum.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/ReductionSum.c b/src/ReductionSum.c index ffeb39e..46053ac 100644 --- a/src/ReductionSum.c +++ b/src/ReductionSum.c @@ -212,8 +212,9 @@ static int ReductionSum (const cGH *GH, CCTK_REAL outvals[/*num_inarrays*num_outvals*/]) { int i, total_outvals; + const char *vtypename; #ifdef CCTK_MPI - pGH *pughGH; + const pGH *pughGH; CCTK_REAL *local_outvals; #endif @@ -297,13 +298,17 @@ static int ReductionSum (const cGH *GH, break; #endif - case CCTK_VARIABLE_COMPLEX: - CCTK_WARN (1, "PUGH_ReductionSum: Don't know how to compute " - "the sum of complex variables !!!"); - return (-1); - default: - CCTK_WARN (1, "PUGH_ReductionSum: Unknown variable type"); + vtypename = CCTK_VarTypeName (intypes[i]); + if (vtypename && strncmp (vtypename, "CCTK_VARIABLE_COMPLEX", 21) == 0) + { + CCTK_WARN (1, "PUGH_ReductionSum: Don't know how to compute " + "the sum of complex variables !!!"); + } + else + { + CCTK_WARN (1, "PUGH_ReductionSum: Unknown variable type"); + } return (-1); } } |