<html>#2351: rdwr.pl accepts inconsistent read / write statements for a function scheduled multiple times
<table style='border-spacing: 1ex 0pt; '>
<tr><td style='text-align:right'> Reporter:</td><td></td></tr>
<tr><td style='text-align:right'>   Status:</td><td>new</td></tr>
<tr><td style='text-align:right'>Milestone:</td><td>ET_2020_04</td></tr>
<tr><td style='text-align:right'>  Version:</td><td></td></tr>
<tr><td style='text-align:right'>     Type:</td><td>bug</td></tr>
<tr><td style='text-align:right'> Priority:</td><td>minor</td></tr>
<tr><td style='text-align:right'>Component:</td><td>Cactus</td></tr>
</table>

<p>SphericalSurface's schedule.ccl contains:</p>
<div class="codehilite"><pre><span></span>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
} &quot;Set surface radii to be used for initial setup in other thorns&quot;
[...]
SCHEDULE SphericalSurface_Set AT poststep BEFORE SphericalSurface_HasBeenSet
{
  LANG: C
  OPTIONS: global
} &quot;Set surface radii&quot;                                                                                   
</pre></div>


<p>ie the same function <code>SphericalSurface_Set</code> is scheduled multiple times. However only one of them declares reads and writes. </p>
<p>Most likely <code>rdwr.pl</code> 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.</p>
<p>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 <code>DECLARE_CCTK_ARGUMENTS_Checked</code>" (ie use the more specific one) or 2. "use the first one found".  2. would be odd since nothing else in <code>schedule.ccl</code> is order dependent and in fact <code>schedule.ccl</code> is there exactly so that there is no global serial writeup of how to exectuate things.</p>
<p>--<br/>
Ticket URL: <a href='https://bitbucket.org/einsteintoolkit/tickets/issues/2351/rdwrpl-accepts-inconsistent-read-write'>https://bitbucket.org/einsteintoolkit/tickets/issues/2351/rdwrpl-accepts-inconsistent-read-write</a></p>
</html>