# decide on GPU settings based on user-settings and GPU/CUDA detection
include(gmxManageGPU)
-# TODO: move OpenMM to contrib
-option(GMX_OPENMM "Accelerated execution on GPUs through the OpenMM library (rerun cmake after changing to see relevant options)" OFF)
-mark_as_advanced(GMX_OPENMM)
-
include(gmxDetectAcceleration)
if(NOT DEFINED GMX_CPU_ACCELERATION)
if(CMAKE_CROSSCOMPILING)
option(GMX_SKIP_DEFAULT_CFLAGS "Don't automatically add suggested/required Compiler flags." OFF)
mark_as_advanced(GMX_SKIP_DEFAULT_CFLAGS)
+option(GMX_BUILD_FOR_COVERAGE
+ "Tune build for better code coverage metrics (e.g., disable asserts)"
+ OFF)
+mark_as_advanced(GMX_BUILD_FOR_COVERAGE)
+
######################################################################
# Compiler tests
# These need to be done early (before further tests).
gmx_gpu_setup()
endif(GMX_GPU)
- if(APPLE)
- find_library(ACCELERATE_FRAMEWORK Accelerate)
- list(APPEND GMX_EXTRA_LIBRARIES ${ACCELERATE_FRAMEWORK})
- endif(APPLE)
-
if(CYGWIN)
set(GMX_CYGWIN 1)
endif(CYGWIN)
else()
set(FFT_LINKER_FLAGS "-mkl=sequential")
endif()
+ # Some versions of icc require this in order that mkl.h can be
+ # found at compile time.
+ set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} ${FFT_LINKER_FLAGS}")
+
set(MKL_ERROR_MESSAGE "Make sure you have configured your compiler so that ${FFT_LINKER_FLAGS} will work.")
else()
# The user will have to provide the set of magic libraries in
add_definitions(-DFFT5D_FFTW_THREADS)
endif()
- set(GMX_EXTERNAL_BLAS TRUE CACHE BOOL "Use external BLAS instead of built-in")
- set(GMX_EXTERNAL_LAPACK TRUE CACHE BOOL "Use external LAPACK instead of built-in")
- # MKL has BLAS/LAPACK routines
- if(NOT HAVE_LIBMKL AND NOT ACCELERATE_FRAMEWORK)
- if(GMX_EXTERNAL_BLAS)
- if (GMX_BLAS_USER)
- list(APPEND GMX_EXTRA_LIBRARIES ${GMX_BLAS_USER})
- else(GMX_BLAS_USER)
- set(BLAS_FIND_QUIETLY ON)
- find_package(BLAS)
- if (BLAS_FOUND)
- list(APPEND GMX_EXTRA_LIBRARIES ${BLAS_LIBRARIES})
- else()
- MESSAGE(STATUS "Using internal BLAS library")
- set(GMX_EXTERNAL_BLAS FALSE CACHE BOOL "Use external BLAS instead of built-in" FORCE)
- endif()
- endif(GMX_BLAS_USER)
- endif(GMX_EXTERNAL_BLAS)
- if(GMX_EXTERNAL_LAPACK)
- if (GMX_LAPACK_USER)
- list(APPEND GMX_EXTRA_LIBRARIES ${GMX_LAPACK_USER})
- else(GMX_LAPACK_USER)
- set(LAPACK_FIND_QUIETLY ON)
- find_package(LAPACK)
- if (LAPACK_FOUND)
- list(APPEND GMX_EXTRA_LIBRARIES ${LAPACK_LIBRARIES})
- else()
- MESSAGE(STATUS "Using internal LAPACK library")
- set(GMX_EXTERNAL_LAPACK FALSE CACHE BOOL "Use external LAPACK instead of built-in" FORCE)
- endif()
- endif(GMX_LAPACK_USER)
- endif(GMX_EXTERNAL_LAPACK)
- endif()
- mark_as_advanced(GMX_EXTERNAL_LAPACK)
- mark_as_advanced(GMX_EXTERNAL_BLAS)
+ include(gmxManageLinearAlgebraLibraries)
set(GMX_USE_PLUGINS OFF CACHE INTERNAL "Whether GROMACS will really try to compile support for VMD plugins")
COMPONENT development)
endif()
+if (GMX_BUILD_FOR_COVERAGE)
+ # Code heavy with asserts makes conditional coverage close to useless metric,
+ # as by design most of the false branches are impossible to trigger in
+ # correctly functioning code. And the benefit of testing those that could
+ # be triggered by using an API against its specification isn't usually
+ # worth the effort.
+ add_definitions(-DNDEBUG -DBOOST_DISABLE_ASSERTS -DGMX_DISABLE_ASSERTS)
+endif ()
+
add_subdirectory(doxygen)
add_subdirectory(share)
add_subdirectory(src)
\newcommand{\threadmpi}{ThreadMPI}
\newcommand{\openmpi}{OpenMPI}
\newcommand{\openmp}{OpenMP}
-\newcommand{\openmm}{OpenMM}
\newcommand{\lammpi}{LAM/MPI}
\newcommand{\mpich}{MPICH}
\newcommand{\cmake}{CMake}
version is strongly encouraged. \nvidia{} GPUs with at least \nvidia{} compute
capability 2.0 are required, e.g. Fermi or Kepler cards.
-The GPU support from \gromacs{} version 4.5 using \openmm{}
-\url{https://simtk.org/home/openmm} is still contained in the code,
-but in the ``user contributions'' section (\verb+src/contrib+). You
-will need to set
-\verb+-DGMX_OPENMM=on -DGMX_GPU=off -DGMX_MPI=off
--DGMX_THREAD_MPI=off\+ in order to build it. It also requires \cuda{},
-and remains the only hardware-based acceleration available for
-implicit solvent simulations in \gromacs{} at the moment. However, the
-long-term plan is to enable this functionality in core Gromacs, and
-not have the OpenMM interface supported by the \gromacs team.
-
If you wish to run in parallel on multiple machines across a network,
you will need to have
\begin{itemize}
can provide performance enhancements for \gromacs{} when doing
normal-mode analysis or covariance analysis. For simplicity, the text
below will refer only to \blas{}, but the same options are available
- for \lapack{}. By default, the \cmake{} optionv
- \verb+GMX_EXTERNAL_BLAS+ is on, which triggers \cmake{} to search for
- \blas{}. If one is found, then it is used. Otherwise, \cmake{} falls
- back on internal versions provided in the \gromacs{} source. These are
- fine for normal use. If you need to specify a non-standard path to
- search, use \verb+-DCMAKE_PREFIX_PATH=/path/to/search+.
+ for \lapack{}. By default, CMake will search for \blas{}, use it if it
+ is found, and otherwise fall back on a version of \blas{} internal to
+ \gromacs{}. The \cmake{} option \verb+GMX_EXTERNAL_BLAS+ will be set
+ accordingly. The internal versions are fine for normal use. If you
+ need to specify a non-standard path to search, use
+ \verb+-DCMAKE_PREFIX_PATH=/path/to/search+. If you need to specify a
+ library with a non-standard name (e.g. ESSL on AIX), then set
+ \verb+-DGMX_BLAS_USER=/path/to/reach/lib/libwhatever.a+.
If you are using Intel's \mkl{} for \fft{}, then the \blas{} and
- \lapack{} it provides are used automatically.
+ \lapack{} it provides are used automatically. This could be
+ over-ridden with \verb+GMX_BLAS_USER+, etc.
On Apple platforms where the Accelerate Framework is available, these
- will be automatically used for \blas{} and \lapack{}.
+ will be automatically used for \blas{} and \lapack{}. This could be
+ over-ridden with \verb+GMX_BLAS_USER+, etc.
\subsection{Native GPU acceleration}
If you have the \cuda{} Software Development Kit installed, you can