From 7347d1d42059ba5720ca3af1a0f19272683fd3fc Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Thu, 25 Apr 2019 00:54:12 +0200 Subject: [PATCH] Add more assertions --- include/deal.II/lac/vector_operations_internal.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/deal.II/lac/vector_operations_internal.h b/include/deal.II/lac/vector_operations_internal.h index d7ff76dd36..0c43a4aef3 100644 --- a/include/deal.II/lac/vector_operations_internal.h +++ b/include/deal.II/lac/vector_operations_internal.h @@ -2389,6 +2389,13 @@ namespace internal static_cast( size)); +# ifdef DEBUG + // Check that the kernel was launched correctly + AssertCuda(cudaGetLastError()); + // Check that there was no problem during the execution of the kernel + AssertCuda(cudaDeviceSynchronize()); +# endif + // Copy the result back to the host Number result; error_code = cudaMemcpy(&result, -- 2.39.5