Carpet-Accelerator typo for filling timelevels

Create issue
Issue #1744 closed
anonymous created an issue

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.

Keyword: accelerator

Comments (4)

  1. Log in to comment