]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add a better error message for Cuda + bundled Kokkos. 15435/head
authorDavid Wells <drwells@email.unc.edu>
Thu, 22 Jun 2023 15:04:20 +0000 (11:04 -0400)
committerDavid Wells <drwells@email.unc.edu>
Thu, 22 Jun 2023 18:03:14 +0000 (14:03 -0400)
cmake/configure/configure_40_cuda.cmake

index cf08a36dbef203428c10ae85872cc62bd461622e..02700de68e3629cf6211973e5f5d06bdb802ff08 100644 (file)
 set(DEAL_II_WITH_CUDA FALSE CACHE BOOL "")
 
 macro(feature_cuda_find_external var)
-  if(NOT Kokkos_ENABLE_CUDA)
+  if(DEAL_II_FEATURE_KOKKOS_BUNDLED_CONFIGURED)
+    set(CUDA_ADDITIONAL_ERROR_STRING
+      ${CUDA_ADDITIONAL_ERROR_STRING}
+      "deal.II's bundled version of Kokkos only supports the Serial backend and therefore cannot be used with Cuda."
+      )
+    set(${var} FALSE)
+  elseif(NOT Kokkos_ENABLE_CUDA)
     set(CUDA_ADDITIONAL_ERROR_STRING
       ${CUDA_ADDITIONAL_ERROR_STRING}
       "deal.II can only be compiled with Cuda support if Kokkos was built with Cuda support!"
@@ -113,7 +119,7 @@ macro(feature_cuda_error_message)
   message(FATAL_ERROR "\n"
     "Could not find any suitable cuda library!\n"
     ${CUDA_ADDITIONAL_ERROR_STRING}
-    "\nPlease ensure that a cuda library is installed on your computer\n"
+    "\nPlease ensure that a cuda library is installed on your computer and deal.II is configured to use an external Kokkos installation.\n"
     )
 endmacro()
 

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.