Tpetra::MultiVector constructor that takes a device View uses create_mirror instead of create_mirror_view
Created by: mhoemmen
In most cases,
Tpetra::MultiVector's host View is the result of
Kokkos::create_mirror_view on its device View. However, in one case:
Tpetra creates the host View from the input device View using
Kokkos::create_mirror. This means that, unlike in all other cases, the host View is always a separate allocation (even if not building with CUDA!) from the device View. That's weird, and it may be causing issues relating to my fixes for #4626 (closed).
Note the comment above that line of code:
// The difference between create_mirror and create_mirror_view, is // that the latter copies to host. We don't necessarily want to // do that; we just want to allocate the memory.
git blame dates that to 2015. It could have been the case back then that
create_mirror_view copied to host. It certainly does not now.