Skip to content
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: BCRS blockWiseMultiply runs in wrong execution space #487

Closed
mhoemmen opened this issue Jul 7, 2016 · 0 comments
Closed

Tpetra: BCRS blockWiseMultiply runs in wrong execution space #487

mhoemmen opened this issue Jul 7, 2016 · 0 comments
Assignees

Comments

@mhoemmen
Copy link
Contributor

mhoemmen commented Jul 7, 2016

@trilinos/tpetra Tpetra::Experimental::BlockCrsMatrix::blockWiseMultiply currently runs in the default Kokkos execution space, rather than the one corresponding to Node. For example, if CUDA is enabled, Kokkos::Cuda is Kokkos' default execution space by default. If Node::execution_space is Kokkos::Serial, BlockCrsMatrix::blockWiseMultiply will attempt to run in CUDA. That causes run-time errors, because CUDA cannot (currently) access host memory. Even if it could, this would be inefficient.

This comes about because the code uses parallel_for with a number as the range. Use Kokkos::RangePolicy instead, and explicitly give it the right execution space as its first template parameter.

I never saw this error with CUDA before, because I only had the Cuda Node enabled in my CUDA tests. This error only manifested when both Cuda and Serial Nodes were enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant