AEILocalInterp and LocalInterp should output scheduled function name in error messages

Issue #1702 closed
Roland Haas created an issue

the local interpolation routines abort if an interpolation cannot be performed since the interpolation coordinates lie outside of the patch of data they are given eg.

WARNING level 1 in thorn AEILocalInterp processor 0
  (line 1109 of arrangements/AEIThorns/AEILocalInterp/src/Lagrange-tensor-product/../template.c): 
  -> 
   CCTK_InterpLocalUniform():
        interpolation point is either outside the grid,
        or inside but too close to the grid boundary!
        (this may be caused by a global interpolation with
         driver::ghost_size too small)
        0-origin interpolation point number pt=54181 of N_interp_points=54182
        interpolation point (x,y,z)=(45.3992,15.5856,2.93915e-15)
        grid x_min(delta_x)x_max = -0.198(0.066)1.584
        grid y_min(delta_y)y_max = -0.198(0.066)1.518
        grid z_min(delta_z)z_max = -0.198(0.066)1.452

However, if there are mutliple thorns that may call the interpolator it is no always clear which caller was active when the error occured (eg it may be the apparent horizon finder or the puncture tracker).

It would be nice if the interpolators were to report the currently executing scheduled routine's name via CCTK_ScheduleQueryCurrentFunction. That routine currently takes cctkGH as an argument but does not actually use it. Thus, given the possible benefit, it would be acceptable I think to call the routine with a NULL pointer (and a comment that this is strictly not valid).

An alternative, which may be nicer, would be to have the driver add an entry "cctkGH" to the table passed to CCTK_InterpLocalUniform in its param_table_handle. The local interpolator can then savely use this pointer if provided and (with an appropriate loud warning) fall back to passing NULL if it is not found (and stop the fallback once the flesh routine actually uses cctkGH).

Keyword: AEILocalInterl
Keyword: LocalInterp
Keyword: CarpetInterp
Keyword: PUGHInterp

Comments (4)

  1. Log in to comment