note the reason for auto-disabling GPU support in CMake
authorSzilárd Páll <pszilard@cbr.su.se>
Wed, 16 Jan 2013 20:27:42 +0000 (21:27 +0100)
committerSzilárd Páll <pszilard@cbr.su.se>
Thu, 17 Jan 2013 03:44:34 +0000 (04:44 +0100)
As the status message on unsuccesful CUDA detection has been muted, the
user is left clueless about why do we disable GPU support at configure
time. Extended the status message to note that this happens because no
compatible CUDA was found.

Some minor status message and code comment tweaks were also done.

Change-Id: Icfba7b56546997cd38952ceff2b7914c9f5b2d67

cmake/gmxManageGPU.cmake

index 2ad6661fedab67eac1f46c24152c1df237f97bea..ba3c5b476121c2d6643ab9c861d25e6940d1b25a 100644 (file)
@@ -77,8 +77,8 @@ endif()
 # - OFF, TRUE : Will keep GMX_GPU=OFF if no CUDA is detected, but will assemble
 #               a warning message which will be issued at the end of the
 #               configuration if GPU(s) were found in the build system.
-# - ON , FALSE: The user requested GPU builds, will require CUDA and will fail
-#               if it is not available.
+# - ON , FALSE: The user requested GPU build and this requires CUDA, so we will
+#               fail if it is not available.
 # - ON , TRUE : Can't happen (GMX_GPU=ON can only be user-set at this point)
 if((GMX_GPU OR GMX_GPU_AUTO) AND NOT GMX_GPU_DETECTION_DONE)
     if (EXISTS ${CUDA_TOOLKIT_ROOT_DIR})
@@ -111,9 +111,9 @@ if((GMX_GPU OR GMX_GPU_AUTO) AND NOT GMX_GPU_DETECTION_DONE)
 
         set(CUDA_NOTFOUND_MESSAGE "
     mdrun supports native GPU acceleration on NVIDIA hardware with compute
-    capability >=2.0. This requires the NVIDIA CUDA library, which was not
-    found; the location can be hinted by setting CUDA_TOOLKIT_ROOT_DIR as
-    a CMake option (It does not work as an environment variable).
+    capability >=2.0 (Fermi or later). This requires the NVIDIA CUDA toolkit,
+    which was not found. Its location can be hinted by setting the
+    CUDA_TOOLKIT_ROOT_DIR CMake option (does not work as an environment variable).
     The typical location would be /usr/local/cuda[-version].
     Note that CPU or GPU acceleration can be selected at runtime!
 
@@ -123,7 +123,7 @@ if((GMX_GPU OR GMX_GPU_AUTO) AND NOT GMX_GPU_DETECTION_DONE)
     if (NOT CUDA_FOUND)
         if (GMX_GPU_AUTO)
             # Disable GPU acceleration in auto mode
-            message(STATUS "Disabling native GPU acceleration")
+            message(STATUS "No compatible CUDA toolkit found (v3.2+), disabling native GPU acceleration")
             set_property(CACHE GMX_GPU PROPERTY VALUE OFF)
             set(CUDA_NOTFOUND_AUTO ON)
         else ()
@@ -161,7 +161,7 @@ macro(gmx_gpu_setup)
     if(NOT GMX_OPENMP)
         message(WARNING "
     To use GPU acceleration efficiently, mdrun requires OpenMP multi-threading.
-    With no OpenMP a single CPU core can be used with a GPU which is not optimal.
+    Without OpenMP a single CPU core can be used with a GPU which is not optimal.
     Note that with MPI multiple processes can be forced to use a single GPU, but this
     typically inefficient. Note that you need to set both C and C++ compilers that
     support OpenMP (CC and CXX environment variables, respectively) when using GPUs.")