Disabled internal clFFT when using MSVC with OpenCL
authorMark Abraham <mark.j.abraham@gmail.com>
Thu, 10 Jan 2019 10:41:37 +0000 (11:41 +0100)
committerRoland Schulz <roland.schulz@intel.com>
Fri, 18 Jan 2019 17:28:38 +0000 (18:28 +0100)
We require clFFT for OpenCL support, and MSVC 2017. But clFFT only
supports MSVC 2010, and a user has reported that that clFFT does not
compile. As we have not provided for clFFT support to be disabled at
configure time (nor taught mdrun that it might not be able to run PME
on an OpenCL GPU in this case), it is simplest to withdraw support for
this corner case until clFFT support for modern MSVC is available.

Fixes #2500

Change-Id: I736501234cfd51bc1cee5d8a71cb1fb343ddd100

docs/release-notes/2019/2019.1.rst
src/gromacs/CMakeLists.txt

index fbb8092b694acacd76dd56585aee847cf9599212..872815a92a158c6b7c7ab9553a6fa0e5c7238aeb 100644 (file)
@@ -34,8 +34,18 @@ it would only write fixed-width columns.
 :issue: `2037`
 
 
-Fixes to improve portability
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Fixes that affect portability
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+With MSVC, disabled internal clFFT fallback used for OpenCL support
+-------------------------------------------------------------------
+GROMACS requires MSVC 2017, and the GROMACS OpenCL build requires
+clFFT. If clFFT is found on the user's system, then all may be well,
+but the version of clFFT bundled within GROMACS cannot be built
+because only MSVC 2010 is supported by clFFT at this time. A
+configure-time fatal error is now issued in this case.
+
+:issue: `2500`
 
 Miscellaneous
 ^^^^^^^^^^^^^
index 3430faf749065e9a97f7e985d0bf94ce87c6ea62..d2f4e9b0e6e21ee7602902c762d16bbea037aca1 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2010,2011,2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+# Copyright (c) 2010,2011,2012,2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
@@ -227,6 +227,17 @@ if (GMX_USE_OPENCL)
             message(FATAL_ERROR "Did not find required external clFFT library, consider setting clFFT_ROOT_DIR")
         endif()
 
+        if(MSVC)
+            message(FATAL_ERROR
+"An OpenCL build was requested with Visual Studio compiler, but GROMACS
+requires clFFT, which was not found on your system. GROMACS does bundle
+clFFT to help with building for OpenCL, but that clFFT has not yet been
+ported to the more recent versions of that compiler that GROMACS itself
+requires. Thus for now, OpenCL is not available with MSVC and the internal
+build of clFFT in GROMACS 2019. Either change compiler, try installing
+a clFFT package, or use the latest GROMACS 2018 point release.")
+        endif()
+
         # Fall back on the internal version
         set (_clFFT_dir ../external/clFFT/src)
         add_subdirectory(${_clFFT_dir} clFFT-build)