<html>#2656: PreSync syncing more than old code
<table style='border-spacing: 1ex 0pt; '>
<tr><td style='text-align:right'> Reporter:</td><td>Samuel Cupp</td></tr>
<tr><td style='text-align:right'>   Status:</td><td>new</td></tr>
<tr><td style='text-align:right'>Milestone:</td><td></td></tr>
<tr><td style='text-align:right'>  Version:</td><td>development version</td></tr>
<tr><td style='text-align:right'>     Type:</td><td>bug</td></tr>
<tr><td style='text-align:right'> Priority:</td><td>major</td></tr>
<tr><td style='text-align:right'>Component:</td><td>Carpet</td></tr>
</table>

<p>I have been investigating the source of the slowdown for the evolution of a BBH using BaikalVacuum when PreSync is turned on. The largest problem was reported in <a data-is-external-link="true" href="https://bitbucket.org/einsteintoolkit/tickets/issues/2653/carpet-presync-triggering-syncs-for-all" rel="nofollow">Ticket #2653</a>, but the code is still noticeably slower than without PreSync. I have tracked the extra sync calls to restriction. There is one group which is only written, never read. In the old way, these syncs were manually scheduled in the schedule.ccl. PreSync (properly) syncs this group at restriction at every refinement level. The observed behavior shows it</p>
<p>1. Syncs the group aux_variables from the coarsest to finest level</p>
<p>Then, it begins heading back up the levels, presumably to begin the restriction operation. However, it then</p>
<p>2. syncs the groups aux_variables and evol_variables from finest to coarsest, skipping the finest level</p>
<p>The syncs in 2 are not present in the old way. Either the old way wasn’t properly syncing during restriction, or PreSync is introducing extra syncs into this operation. I’m inclined to believe the latter. My guess as to the possible source of this is the code</p>
<div class="codehilite"><pre><span></span><span class="o">//</span> <span class="nt">Restrict</span> <span class="nt">a</span> <span class="nt">refinement</span> <span class="nt">level</span>
<span class="nt">void</span> <span class="nt">ggf</span><span class="p">::</span><span class="nd">ref_restrict_all</span><span class="o">(</span><span class="nt">comm_state</span> <span class="o">&amp;</span><span class="nt">state</span><span class="o">,</span> <span class="nt">int</span> <span class="nt">const</span> <span class="nt">tl</span><span class="o">,</span> <span class="nt">int</span> <span class="nt">const</span> <span class="nt">rl</span><span class="o">,</span>
                           <span class="nt">int</span> <span class="nt">const</span> <span class="nt">ml</span><span cla
<p>--<br/>
Ticket URL: <a href='https://bitbucket.org/einsteintoolkit/tickets/issues/2656/presync-syncing-more-than-old-code'>https://bitbucket.org/einsteintoolkit/tickets/issues/2656/presync-syncing-more-than-old-code</a></p>
</html>