AMREX_ALWAYS_ASSERT that works on device? #2648
Answered
by
WeiqunZhang
BenWibking
asked this question in
Q&A
-
Is there a standard way to abort the code from a GPU kernel? I have a cell-by-cell iterative solve that should trigger a code abort if it fails to converge but I can't find a macro that will do this from the device side. |
Beta Was this translation helpful? Give feedback.
Answered by
WeiqunZhang
Mar 7, 2022
Replies: 1 comment 1 reply
-
Yes, |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
BenWibking
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes,
AMREX_ALWAYS_ASSERT
works on device ifNDEBUG
is not defined. This is the same behavior asassert
in CUDA. https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#assertion