Closed pgrete closed 1 year ago
@pgrete What kind of memory is being used to pass the mesh data?
If the are device-only pointers (instead of managed memory) that could cause an issue.
For fields, we can GPU pointers directly to Ascent, but other parts of the mesh need to be transformed on the GPU.
advected
is the data field to be plotted and it's a device pointer. So that should work as expected?
@BenWibking suggested some off-by-one error that might also be causing the issue visible in #1100
I'll investigate (though it looks like I should first add nestsets
info).
Device to device for field data should work.
I am not sure how Kokkos annotates memory, but since it has detailed info (label="advected")
Kokkos::View ERROR: attempt to access inaccessible memory space (label="advected")
This leads me to believe the error happens while preparing the data to hand to ascent?
I found the issue:
mesh["fields/" + varname + "/values"].set_external(&data(icomp, 0, 0, 0), ncells);
would try to access the indices from the host (even though the data
View
was a device one).
We now extract a subview first (which works on the host) and then extract the data pointer from the subview.
@pgrete thanks for the updated info
I'm in the process of adding Ascent support to Parthenon (a performance portable [through Kokkos] adaptive mesh refinement framework), see https://github.com/parthenon-hpc-lab/parthenon/pull/810
Things seem to run fine on the host, but when trying to run on GPUs (only tried Cuda so far), I get the following error at runtime:
Kokkos::View ERROR: attempt to access inaccessible memory space (label="advected")
Is there anything special I need to do to "use" cuda?
Based on the Ascent debug output from the Parthenon config, it looks like my Ascent build should support Cuda: