#1744: Carpet-Accelerator typo for filling timelevels -------------------------------------+-------------------------------------- Reporter: mclark3@… | Owner: eschnett Type: defect | Status: new Priority: unset | Milestone: Component: Carpet | Version: development version Keywords: accelerator | -------------------------------------+-------------------------------------- In Carpet/src/Cycle.cc (current master branch): in function FillTimeLevels, line 282 reads
{{{ 278 if (have_accel) { 279 const CCTK_INT on_device = 0; 280 Accelerator_NotifyDataModified 281 (cctkGH, 282 &vis.front(), &rls.front(), &rls.front(), vis.size(), 283 on_device); 284 } 285 } 286 break; }}}
The line should read
{{{ 282 &vis.front(), &rls.front(), &tls.front(), vis.size(), }}}
as the second-to-last argument of Accelerator_NotifyDataModified should correspond to timelevels. Failing to pass this correctly can lead to std::out_of_range errors as Accelerator tries to access locations that do not exist in its "mem" structure.