Merge "Merge branch release-4-6 into master"
authorTeemu Murtola <teemu.murtola@gmail.com>
Sun, 1 Sep 2013 09:39:18 +0000 (11:39 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Sun, 1 Sep 2013 09:39:18 +0000 (11:39 +0200)
1  2 
CMakeLists.txt
admin/installguide/installguide.tex

diff --combined CMakeLists.txt
index 32f062ee513b78fe8f7144f04f419282aa105c36,dea2ac5e65783a0bc4902156e8b9f30b086bfb92..2e57adef754b198b515b2ff5dd52b79448e66fc4
@@@ -127,6 -127,10 +127,6 @@@ mark_as_advanced(GMX_FAHCORE
  # 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)
@@@ -181,11 -185,6 +181,11 @@@ mark_as_advanced(GMX_CYCLE_SUBCOUNTERS
  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).
@@@ -533,11 -532,6 +533,6 @@@ if(GMX_GPU
      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)
@@@ -974,6 -968,10 +969,10 @@@ elseif(${GMX_FFT_LIBRARY} STREQUAL "MKL
          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
@@@ -1037,41 -1035,7 +1036,7 @@@ if(FFTW3_THREADS OR FFTW3F_THREADS
      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")
  
@@@ -1222,15 -1186,6 +1187,15 @@@ else(
              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)
index 6881cbf2999405adacced4ce774249275088e664,b5ede9a4d840e5dff8dd94a33d0a8707646b084f..e890e46f921b8dad3286826543d7d0f9101de47e
@@@ -28,6 -28,7 +28,6 @@@
  \newcommand{\threadmpi}{ThreadMPI}
  \newcommand{\openmpi}{OpenMPI}
  \newcommand{\openmp}{OpenMP}
 -\newcommand{\openmm}{OpenMM}
  \newcommand{\lammpi}{LAM/MPI}
  \newcommand{\mpich}{MPICH}
  \newcommand{\cmake}{CMake}
@@@ -144,6 -145,17 +144,6 @@@ If you wish to use the excellent new na
  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}
@@@ -426,18 -438,22 +426,22 @@@ As mentioned above, sometimes vendor \b
  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