]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add more assertions
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Wed, 24 Apr 2019 22:54:12 +0000 (00:54 +0200)
committerDaniel Arndt <arndtd@ornl.gov>
Fri, 10 May 2019 14:51:07 +0000 (10:51 -0400)
include/deal.II/lac/vector_operations_internal.h

index d7ff76dd363536253a16a530fbe3d9493b80baf5..0c43a4aef3b60b027d18c3e2296632a2f65dc2c0 100644 (file)
@@ -2389,6 +2389,13 @@ namespace internal
                                                     static_cast<unsigned int>(
                                                       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,

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.