diff options
-rw-r--r-- | src/main/Coord.c | 5 | ||||
-rw-r--r-- | src/main/GroupsOnGH.c | 24 | ||||
-rw-r--r-- | src/main/Parameters.c | 1 | ||||
-rw-r--r-- | src/main/WarnLevel.c | 16 |
4 files changed, 26 insertions, 20 deletions
diff --git a/src/main/Coord.c b/src/main/Coord.c index 689eae6e..7d3ac38e 100644 --- a/src/main/Coord.c +++ b/src/main/Coord.c @@ -456,7 +456,8 @@ int CCTK_CoordRegisterRange (cGH *GH, if (coord_system->coords[vindex].listcomp) { CCTK_VWarn (3, __LINE__, __FILE__, "Cactus", - "CCTK_CoordRange: Range already registered", systemname); + "CCTK_CoordRange: Range already registered for system '%s'", + systemname); coord_system->coords[vindex].listcomp->lower = min; coord_system->coords[vindex].listcomp->upper = max; } @@ -629,7 +630,7 @@ int CCTK_CoordRegisterRangePhysIndex (cGH *GH, { CCTK_VWarn (3, __LINE__, __FILE__, "Cactus", "CCTK_CoordRegisterRangePhysIndex: " - "Range already registered", systemname); + "Range already registered for system '%s'", systemname); coord_system->coords[vindex].listphysi->lower = min; coord_system->coords[vindex].listphysi->upper = max; } diff --git a/src/main/GroupsOnGH.c b/src/main/GroupsOnGH.c index 5bceb28a..ab247346 100644 --- a/src/main/GroupsOnGH.c +++ b/src/main/GroupsOnGH.c @@ -281,7 +281,7 @@ void *CCTK_VarDataPtrI(const cGH *GH, int timelevel, int vari) void *retval; if (vari < 0) - { + { CCTK_Warn(1,__LINE__,__FILE__,"Cactus", "CCTK_VarPtrDataI: Calling CCTK_VarDataPtrI with negative index"); retval = NULL; @@ -543,14 +543,16 @@ int CCTK_GrouplbndGI(const cGH *cctkGH, int retval = 0; int ierr; int usedim = dim; /* Actual number of integers copied */ + char *groupname; cGroupDynamicData data; + groupname = CCTK_GroupName (groupindex); if (CCTK_GroupTypeI(groupindex) == CCTK_SCALAR) { retval = -3; CCTK_VWarn(2,__LINE__,__FILE__,"Cactus", - "CCTK_GrouplbndGI: Grid information called for scalar group %s", - CCTK_GroupName(groupindex)); + "CCTK_GrouplbndGI: Grid information called for scalar group '%s'", + groupname); } else { @@ -563,8 +565,9 @@ int CCTK_GrouplbndGI(const cGH *cctkGH, retval = -1; usedim = (data.dim < dim) ? data.dim : dim; CCTK_VWarn(1,__LINE__,__FILE__,"Cactus", - "CCTK_GrouplbndGI: Incorrect dimension %d supplied, group %s has dimension %d, copying %d integers", - dim,data.dim,usedim); + "CCTK_GrouplbndGI: Incorrect dimension %d supplied, " + "group '%s' has dimension %d, copying %d integers", + dim, groupname, data.dim, usedim); } memcpy(lbnd,(const int *)data.lbnd,usedim*sizeof(int)); } @@ -575,6 +578,7 @@ int CCTK_GrouplbndGI(const cGH *cctkGH, "CCTK_GrouplbndGI: Data not available from driver thorn"); } } + free (groupname); return retval; } @@ -745,7 +749,7 @@ int CCTK_GroupubndGI(const cGH *cctkGH, usedim = (data.dim < dim) ? data.dim : dim; CCTK_VWarn(1,__LINE__,__FILE__,"Cactus", "CCTK_GroupubndGI: Incorrect dimension %d supplied, " - "group %s has dimension %d, copying %d integers", + "group %s has dimension %d, copying %d integers", dim,CCTK_GroupName(groupindex),data.dim,usedim); } memcpy(ubnd,(const int *)data.ubnd,usedim*sizeof(int)); @@ -927,7 +931,7 @@ int CCTK_GrouplshGI(const cGH *cctkGH, usedim = (data.dim < dim) ? data.dim : dim; CCTK_VWarn(1,__LINE__,__FILE__,"Cactus", "CCTK_GrouplshGI: Incorrect dimension %d supplied, " - "group %s has dimension %d, copying %d integers", + "group %s has dimension %d, copying %d integers", dim,CCTK_GroupName(groupindex),data.dim,usedim); } memcpy(lsh,(const int *)data.lsh,usedim*sizeof(int)); @@ -1109,7 +1113,7 @@ int CCTK_GroupgshGI(const cGH *cctkGH, usedim = (data.dim < dim) ? data.dim : dim; CCTK_VWarn(1,__LINE__,__FILE__,"Cactus", "CCTK_GroupgshGI: Incorrect dimension %d supplied, " - "group %s has dimension %d, copying %d integers", + "group %s has dimension %d, copying %d integers", dim,CCTK_GroupName(groupindex),data.dim,usedim); } memcpy(gsh,(const int *)data.gsh,usedim*sizeof(int)); @@ -1277,7 +1281,7 @@ int CCTK_GroupnghostzonesGI(const cGH *cctkGH, retval = -3; CCTK_VWarn(2,__LINE__,__FILE__,"Cactus", "CCTK_GroupnghostzonesGI: Grid information called " - "for scalar group %s", + "for scalar group %s", CCTK_GroupName(groupindex)); } else @@ -1292,7 +1296,7 @@ int CCTK_GroupnghostzonesGI(const cGH *cctkGH, usedim = (data.dim < dim) ? data.dim : dim; CCTK_VWarn(1,__LINE__,__FILE__,"Cactus", "CCTK_GroupnghostzonesGI: Incorrect dimension %d supplied, " - "group %s has dimension %d, copying %d integers", + "group %s has dimension %d, copying %d integers", dim,CCTK_GroupName(groupindex),data.dim,usedim); } memcpy(nghostzones,(const int *)data.nghostzones,usedim*sizeof(int)); diff --git a/src/main/Parameters.c b/src/main/Parameters.c index 6633eb0a..2d464e6c 100644 --- a/src/main/Parameters.c +++ b/src/main/Parameters.c @@ -314,6 +314,7 @@ int CCTKi_ParameterCreate (const char *name, if(array) { + retval = 0; for(i = 0; i < array; i++) { /* Setup ranges on the array element */ diff --git a/src/main/WarnLevel.c b/src/main/WarnLevel.c index b1c9265a..ed48b55f 100644 --- a/src/main/WarnLevel.c +++ b/src/main/WarnLevel.c @@ -421,7 +421,7 @@ void CCTK_FCALL CCTK_FNAME (CCTK_ParamWarn) @author Gabrielle Allen @desc Warn the user if a parameter error is found using a variable - argument list (extends CCTK_ParamWarn) + argument list (extends CCTK_ParamWarn) @enddesc @calls CCTK_ParameterGet @@ -437,8 +437,8 @@ void CCTK_FCALL CCTK_FNAME (CCTK_ParamWarn) @endvar @var ... @vdesc Variable argument list - @vtype - @vio + @vtype + @vio @endvar @returntype int @@ -446,9 +446,9 @@ void CCTK_FCALL CCTK_FNAME (CCTK_ParamWarn) 0 - success @endreturndesc @@*/ -int CCTK_VParamWarn (const char *thorn, - const char *format, - ...) +int CCTK_VParamWarn (const char *thorn, + const char *format, + ...) { va_list ap; const CCTK_INT *cctk_strong_param_check; @@ -593,7 +593,7 @@ int CCTKi_SetWarnLevel (int level) { error_level = warning_level; CCTK_VWarn (2, __LINE__, __FILE__, "Cactus", - "Decreasing error level to new warning level", warning_level); + "Decreasing error level to new warning level %d",warning_level); } return (retval); @@ -607,7 +607,7 @@ int CCTKi_SetWarnLevel (int level) @desc Sets the error level @enddesc - @calls CCTK_VWarn + @calls CCTK_VWarn CCTK_VInfo @var level |