diff options
-rw-r--r-- | src/ParseVars.c | 41 |
1 files changed, 27 insertions, 14 deletions
diff --git a/src/ParseVars.c b/src/ParseVars.c index 1d46f5b..fb70525 100644 --- a/src/ParseVars.c +++ b/src/ParseVars.c @@ -95,14 +95,12 @@ static void IOHDF5Util_ParseOutputRequest (int vindex, const char *optstring, void *arg) { - DECLARE_CCTK_PARAMETERS regmatch_t gmatch[6], *dmatch; - int matched; - char *token, *separator; + int i, j, bytes, matched; + char *token, *separator, *fullname; char *substring, *parsestring, *regexstring; - int i, j; - int bytes; ioHDF5Geo_t **output_requests, *new_request; + DECLARE_CCTK_PARAMETERS output_requests = (ioHDF5Geo_t **) arg; @@ -126,8 +124,11 @@ static void IOHDF5Util_ParseOutputRequest (int vindex, 6, gmatch); if (matched <= 0) { + fullname = CCTK_FullName (vindex); CCTK_VWarn (2, __LINE__, __FILE__, CCTK_THORNSTRING, - "Couldn't parse hyperslab parameter '%s'", optstring); + "Couldn't parse hyperslab options '%s' for variable '%s'", + optstring, fullname); + free (fullname); free (new_request); return; } @@ -139,9 +140,11 @@ static void IOHDF5Util_ParseOutputRequest (int vindex, new_request->sdim = atoi (optstring + gmatch[1].rm_so); if (new_request->sdim <= 0 || new_request->sdim > new_request->vdim) { + fullname = CCTK_FullName (vindex); CCTK_VWarn (2, __LINE__, __FILE__, CCTK_THORNSTRING, - "Invalid dimension given %d in hyperslab parameter '%s'", - new_request->sdim, optstring); + "Invalid dimension given %d in hyperslab options '%s' " + "for variable '%s'", new_request->sdim, optstring, fullname); + free (fullname); free (new_request); return; } @@ -167,9 +170,11 @@ static void IOHDF5Util_ParseOutputRequest (int vindex, free (regexstring); if (matched <= 0) { + fullname = CCTK_FullName (vindex); CCTK_VWarn (2, __LINE__, __FILE__, CCTK_THORNSTRING, - "Couldn't parse direction vectors in hyperslab " - "parameter '%s'.", optstring); + "Couldn't parse direction vectors in hyperslab options '%s' " + "for variable '%s'.", optstring, fullname); + free (fullname); free (dmatch); free (new_request); return; @@ -201,9 +206,11 @@ static void IOHDF5Util_ParseOutputRequest (int vindex, free (substring); if (i < new_request->vdim) { + fullname = CCTK_FullName (vindex); CCTK_VWarn (2, __LINE__, __FILE__, CCTK_THORNSTRING, "Direction vectors are incomplete or missing in hyperslab " - "parameter '%s'.", optstring); + "options '%s' for variable '%s'.", optstring, fullname); + free (fullname); free (new_request); return; } @@ -234,9 +241,11 @@ static void IOHDF5Util_ParseOutputRequest (int vindex, if (i < new_request->vdim) { + fullname = CCTK_FullName (vindex); CCTK_VWarn (2, __LINE__, __FILE__, CCTK_THORNSTRING, "Origin vector is incomplete or missing in hyperslab " - "parameter '%s'.", optstring); + "options '%s' for variable '%s'.", optstring, fullname); + free (fullname); free (new_request); return; } @@ -266,9 +275,11 @@ static void IOHDF5Util_ParseOutputRequest (int vindex, if (i < new_request->sdim) { + fullname = CCTK_FullName (vindex); CCTK_VWarn (2, __LINE__, __FILE__, CCTK_THORNSTRING, "Length vector is incomplete or missing in hyperslab " - "parameter '%s'.", optstring); + "options '%s' for variable '%s'.", optstring, fullname); + free (fullname); free (new_request); return; } @@ -298,9 +309,11 @@ static void IOHDF5Util_ParseOutputRequest (int vindex, if (i < new_request->sdim) { + fullname = CCTK_FullName (vindex); CCTK_VWarn (2, __LINE__, __FILE__, CCTK_THORNSTRING, "Downsampling vector is incomplete or missing in hyperslab " - "parameter '%s'.", optstring); + "options '%s' for variable '%s'.", optstring, fullname); + free (fullname); free (new_request); return; } |