#2351: rdwr.pl accepts inconsistent read / write statements for a function scheduled multiple times
Reporter:
Status:new
Milestone:ET_2020_04
Version:
Type:bug
Priority:minor
Component:Cactus

SphericalSurface's schedule.ccl contains:

SCHEDULE SphericalSurface_Set AT basegrid BEFORE SphericalSurface_HasBeenSet
{
  LANG: C
  OPTIONS: global
  READS: SphericalSurface::sf_nphi #scalar
  READS: SphericalSurface::sf_ntheta #scalar
  READS: SphericalSurface::sf_coordinate_descriptors #scalar
  WRITES: SphericalSurface::sf_active(everywhere) #scalar
  WRITES: SphericalSurface::sf_valid(everywhere) #scalar
  WRITES: SphericalSurface::sf_info(everywhere) #scalar
  WRITES: SphericalSurface::sf_origin(everywhere) #scalar
  WRITES: SphericalSurface::sf_radius(everywhere) #scalar
} "Set surface radii to be used for initial setup in other thorns"
[...]
SCHEDULE SphericalSurface_Set AT poststep BEFORE SphericalSurface_HasBeenSet
{
  LANG: C
  OPTIONS: global
} "Set surface radii"                                                                                   

ie the same function SphericalSurface_Set is scheduled multiple times. However only one of them declares reads and writes.

Most likely rdwr.pl should at the very least output a warning about this, and if there were actually read / write statements in both schedule blocks (and they were not identical) it should abort.

Even when one is empty it may be good to abort since otherwise there are at least two ways this could be interpreted 1. "use the one with read / write to define DECLARE_CCTK_ARGUMENTS_Checked" (ie use the more specific one) or 2. "use the first one found". 2. would be odd since nothing else in schedule.ccl is order dependent and in fact schedule.ccl is there exactly so that there is no global serial writeup of how to exectuate things.

--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2351/rdwrpl-accepts-inconsistent-read-write