-
Notifications
You must be signed in to change notification settings - Fork 572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tpetra: Invalid access of k_rowPtrs_ inside CrsGraph #8286
Comments
@trilinos/tpetra the solutions that come to mind are:
What are the performance/usability implications for the simplest solution of making it a HostMirror? Are there other preferable solutions that I'm missing? |
@tasmith4 This function doesn't need to read from the whole view, just
and for unpacked it would be similar but the subview would just be for the single index myRow, not a length-2 range. |
@brian-kelley definitely seems like a better solution than copying the whole array -- but why does it need to live on device in the first place? |
@tasmith4 Ah I figured it out, it's never supposed to be accessed on device. Its type is this in CrsGraph_decl:
So you will never run into this issue like you are with |
Hmm, its type might as well be HostSpace rather than a HostMirror, since there's no reason for it to be UVM in a UVM build. |
Yeah I wasn't sure what the most general solution is since HostMirror isn't always HostSpace. Maybe we have a special node that wants the host side to be a particular LogicalMemorySpace? Not sure how much we should care about that |
Tbh I think
|
No I agree with that. I'm talking about |
|
so |
Once a matrix is fill-complete and in packed storage, I don't think any performance sensitive code should be using Edit: the one exception seems to be transformLocalValues/transformGlobalValues. But these are not used at all in Trilinos either. |
Just FYI, we have encountered this error in Galeri and the Tpetra matrix reader when insertGlobal is used. @lucbv is writing a deepcopy for matrices to work around this issue in the short term.. |
@cgcgcg thanks for the heads-up. @brian-kelley that wasn't my point. Seems to me that a pointer to device memory is invalid on host? But honestly I am a little confused about whether |
That array in CRS format can be called "row pointers" (like in Tpetra), "row map" (in Kokkos/KokkosKernels, which is not related to what Tpetra calls "row map") or "row offsets". These all mean the same thing, but they're not literally pointers to memory addresses. They are integer indices into I think "row pointers" is the best name for it in Tpetra because of the ambiguity with "row map". |
ok that makes sense. I think you're right then, when we need one of the row pointers we can just copy the individual one back. |
@kyungjoo-kim said that use of HostMirror was not good; it should just be Host. |
So actually I just found |
@tasmith4 You don't just need |
Fixed through UVM removal refactoring |
Bug Report
@trilinos/tpetra
Description
When running the CrsGraph unit tests, Kokkos errors with "attempt to access inaccessible memory space" from line 1590 in
TpetraCore_CrsGraph_def.hpp
. This is an attempt to index intothis->k_rowPtrs_
which is a view templated ondevice_type
.Steps to Reproduce
-DKokkos_ENABLE_CUDA_UVM=OFF
and-DTpetra_ENABLE_CUDA_UVM=OFF
ctest -R "TpetraCore_CrsGraph_UnitTests0_MPI_4"
The text was updated successfully, but these errors were encountered: