Commit 4f6137d2 authored by Nicholas Breen's avatar Nicholas Breen

Update upstream source from tag 'upstream/2019_beta2'

Update to upstream version '2019~beta2'
with Debian dir 88f05be939767afd26b8693981b93be62f04efc8
parents 3a713672 c8d5e6b8
......@@ -40,13 +40,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_CURRENT_
project(Gromacs)
# Use ccache if available to wrap CMAKE_C_COMPILER and CMAKE_CXX_COMPILER.
# Reference https://ccache.samba.org
option(ENABLE_CCACHE "Allow CMake to use ccache compiler wrappers if available." ON)
# CMAKE_C_COMPILER and CMAKE_CXX_COMPILER do not change after this line.
if(ENABLE_CCACHE)
include(gmxCcache)
endif()
include(gmxManageCcache)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
......@@ -904,6 +898,9 @@ if (BUILD_TESTING)
endif()
if (NOT GMX_BUILD_MDRUN_ONLY)
find_package(ImageMagick QUIET COMPONENTS convert)
include(gmxTestImageMagick)
GMX_TEST_IMAGEMAGICK(IMAGE_CONVERT_POSSIBLE)
add_subdirectory(docs)
add_subdirectory(share)
add_subdirectory(scripts)
......
......@@ -5,7 +5,7 @@ Installation guide
Introduction to building GROMACS
================================
These instructions pertain to building GROMACS 2019-beta1. You might
These instructions pertain to building GROMACS 2019-beta2. You might
also want to check the up-to-date installation instructions.
......@@ -28,8 +28,8 @@ Quick and dirty installation
Or, as a sequence of commands to execute:
tar xfz gromacs-2019-beta1.tar.gz
cd gromacs-2019-beta1
tar xfz gromacs-2019-beta2.tar.gz
cd gromacs-2019-beta2
mkdir build
cd build
cmake .. -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON
......@@ -166,7 +166,7 @@ offer competitive performance. We recommend against PGI because the
performance with C++ is very bad.
The xlc compiler is not supported and has not been tested on POWER
architectures for GROMACS-2019-beta1. We recommend to use the gcc
architectures for GROMACS-2019-beta2. We recommend to use the gcc
compiler instead, as it is being extensively tested.
You may also need the most recent version of other compiler toolchain
......@@ -246,14 +246,14 @@ version for GROMACS code as used as the host compiler for nvcc.
To make it possible to use other accelerators, GROMACS also includes
OpenCL support. The minimum OpenCL version required is 1.2. The
current OpenCL implementation is recommended for use with GCN-based
AMD GPUs, on Linux we recommend the ROCm runtime. For Intel GPUs it is
required to compile with "-DGMX_OCL_NB_CLUSTER_SIZE=4" and the Neo
driver is recommended. It is also supported with NVIDIA GPUs, but
using the latest NVIDIA driver (which includes the NVIDIA OpenCL
runtime) is recommended. Also note that there are performance
limitations (inherent to the NVIDIA OpenCL runtime). It is not
possible to configure both CUDA and OpenCL support in the same version
of GROMACS.
AMD GPUs, and on Linux we recommend the ROCm runtime. Intel integrated
GPUs are supported with the Neo drivers. OpenCL is also supported with
NVIDIA GPUs, but using the latest NVIDIA driver (which includes the
NVIDIA OpenCL runtime) is recommended. Also note that there are
performance limitations (inherent to the NVIDIA OpenCL runtime). It is
not possible to configure both CUDA and OpenCL support in the same
build of GROMACS, nor to support both Intel and other vendors’ GPUs
with OpenCL.
MPI support
......@@ -434,8 +434,8 @@ the name of the directory containing the "CMakeLists.txt" file of the
code you want to build. For example, download the source tarball and
use
tar xfz gromacs-2019-beta1.tgz
cd gromacs-2019-beta1
tar xfz gromacs-2019-beta2.tgz
cd gromacs-2019-beta2
mkdir build-gromacs
cd build-gromacs
cmake ..
......@@ -716,11 +716,13 @@ version could be considered in non performance-critical use-cases.
OpenCL GPU acceleration
~~~~~~~~~~~~~~~~~~~~~~~
The primary target of the GROMACS OpenCL support is accelerating
simulations on AMD hardware, both discrete GPUs and APUs (integrated
CPU+GPU chips). The GROMACS OpenCL on NVIDIA GPUs works, but
performance and other limitations make it less practical (for details
see the user guide).
The primary targets of the GROMACS OpenCL support is accelerating
simulations on AMD and Intel hardware. For AMD, we target both
discrete GPUs and APUs (integrated CPU+GPU chips), and for Intel we
target the integrated GPUs found on modern workstation and mobile
hardware. The GROMACS OpenCL on NVIDIA GPUs works, but performance and
other limitations make it less practical (for details see the user
guide).
To build GROMACS with OpenCL support enabled, two components are
required: the OpenCL headers and the wrapper library that acts as a
......@@ -742,6 +744,11 @@ To trigger an OpenCL build the following CMake flags must be set
cmake .. -DGMX_GPU=ON -DGMX_USE_OPENCL=ON
To build with support for Intel integrated GPUs, it is required to add
"-DGMX_OPENCL_NB_CLUSTER_SIZE=4" to the cmake command line, so that
the GPU kernels match the characteristics of the hardware. The Neo
driver is recommended.
On Mac OS, an AMD GPU can be used only with OS version 10.10.4 and
higher; earlier OS versions are known to run incorrectly.
......@@ -1015,7 +1022,7 @@ The simplest way to run the checks is to build GROMACS with
"-DREGRESSIONTEST_DOWNLOAD", and run "make check". GROMACS will
automatically download and run the tests for you. Alternatively, you
can download and unpack the GROMACS regression test suite
http://gerrit.gromacs.org/download/regressiontests-2019-beta1.tar.gz
http://gerrit.gromacs.org/download/regressiontests-2019-beta2.tar.gz
tarball yourself and use the advanced "cmake" option
"REGRESSIONTEST_PATH" to specify the path to the unpacked tarball,
which will then be used for testing. If the above does not work, then
......
#!/usr/bin/env bash
# Set up compiler wrapper to make it easier to use ccache.
# Set up compiler wrapper used for ccache.
#
# Xcode generator doesn't include the compiler as the
# first argument, Ninja and Makefiles do. Handle both cases.
......@@ -8,4 +8,4 @@ shift
fi
export CCACHE_CPP2=true
exec "${_c_launcher}" "${CMAKE_C_COMPILER}" "$@"
exec "${CCACHE_PROGRAM}" "${CMAKE_C_COMPILER}" "$@"
#!/usr/bin/env bash
# Set up compiler wrapper to make it easier to use ccache.
# Set up compiler wrapper used for ccache.
#
# Xcode generator doesn't include the compiler as the
# first argument, Ninja and Makefiles do. Handle both cases.
......@@ -8,4 +8,4 @@ shift
fi
export CCACHE_CPP2=true
exec "${_cxx_launcher}" "${CMAKE_CXX_COMPILER}" "$@"
exec "${CCACHE_PROGRAM}" "${CMAKE_CXX_COMPILER}" "$@"
......@@ -32,8 +32,27 @@
# To help us fund GROMACS development, we humbly ask that you cite
# the research papers on the package. Check out http://www.gromacs.org.
# Reference https://crascit.com/2016/04/09/using-ccache-with-cmake/
#
# Permit the use of ccache (when available in the system path or
# CMAKE_PREFIX_PATH), which wraps the CMAKE_C_COMPILER and
# CMAKE_CXX_COMPILER to speed up build times. Reference
# https://ccache.samba.org and
# https://crascit.com/2016/04/09/using-ccache-with-cmake/
option(GMX_ENABLE_CCACHE "Allow CMake to use ccache compiler wrappers if available." OFF)
if(NOT GMX_ENABLE_CCACHE)
return()
endif()
if(GMX_CLANG_TIDY)
message(FATAL_ERROR "ccache does not work with the wrapper script used for "
"clang-tidy builds. Use -DGMX_ENABLE_CCACHE=off.")
endif()
if(GMX_CLANG_ANALYZER)
message(FATAL_ERROR "ccache does not work with the wrapper script used for "
"clang-analyzer builds. Use -DGMX_ENABLE_CCACHE=off.")
endif()
# Here we try to make sure that ccache is invoked as `/.../ccache compiler args` to best handle more than one local
# compiler or a compiler wrapper, whereas it is otherwise common to replace the default compilers with symbolic links
# to the ccache binary.
......@@ -43,74 +62,75 @@
find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
# Check whether C compiler wrapper has been set up.
if(NOT DEFINED GMX_CACHE_C_COMPILER)
if(NOT DEFINED GMX_CCACHE_C_COMPILER)
# Determine whether we have a cacheable compiler.
set(_cacheable OFF)
if (CMAKE_C_COMPILER_ID MATCHES "GNU"
OR CMAKE_C_COMPILER_ID MATCHES "AppleClang"
OR CMAKE_C_COMPILER_ID MATCHES "Clang")
message(STATUS "Setting up ccache wrapper for ${CMAKE_C_COMPILER_ID} C compiler ${CMAKE_C_COMPILER}")
set(_c_launcher "${CCACHE_PROGRAM}")
configure_file(launch-c.in ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/launch-c)
unset(_c_launcher)
file(COPY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/launch-c
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/admin/ccache-wrapper-c.in ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/ccache-wrapper-c)
file(COPY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/ccache-wrapper-c
DESTINATION ${CMAKE_BINARY_DIR}
FILE_PERMISSIONS
OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
set(_cacheable ON)
else()
message(STATUS "Disabling ccache set up. Not confirmed to work with compiler ID ${CMAKE_C_COMPILER_ID}.")
endif() # GNU C compiler
set(GMX_CACHE_C_COMPILER ${_cacheable} CACHE INTERNAL "Whether the C compiler will be wrapped for caching.")
message(FATAL_ERROR "Cannot set up ccache, as it is not confirmed to "
"work with compiler ID ${CMAKE_C_COMPILER_ID}.")
endif()
set(GMX_CCACHE_C_COMPILER ${_cacheable} CACHE INTERNAL "Whether the C compiler will be wrapped for caching.")
unset(_cacheable)
endif() # defined
# Check whether we should use the wrapper. If so, set CMAKE variables.
if(GMX_CACHE_C_COMPILER)
if(GMX_CCACHE_C_COMPILER)
if(CMAKE_GENERATOR STREQUAL "Xcode")
# Set Xcode project attributes to route compilation and linking
# through our scripts
set(CMAKE_XCODE_ATTRIBUTE_CC "${CMAKE_BINARY_DIR}/launch-c")
set(CMAKE_XCODE_ATTRIBUTE_LD "${CMAKE_BINARY_DIR}/launch-c")
set(CMAKE_XCODE_ATTRIBUTE_CC "${CMAKE_BINARY_DIR}/ccache-wrapper-c")
set(CMAKE_XCODE_ATTRIBUTE_LD "${CMAKE_BINARY_DIR}/ccache-wrapper-c")
else()
# Support Unix Makefiles and Ninja
set(CMAKE_C_COMPILER_LAUNCHER "${CMAKE_BINARY_DIR}/launch-c")
set(CMAKE_C_COMPILER_LAUNCHER "${CMAKE_BINARY_DIR}/ccache-wrapper-c")
endif()
endif(GMX_CACHE_C_COMPILER)
endif()
# Check whether CXX compiler wrapper has been set up
if(NOT DEFINED GMX_CACHE_CXX_COMPILER)
if(NOT DEFINED GMX_CCACHE_CXX_COMPILER)
# Determine whether we have a cacheable compiler.
set(_cacheable OFF)
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU"
OR CMAKE_CXX_COMPILER_ID MATCHES "AppleClang"
OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
message(STATUS "Setting up ccache wrapper for ${CMAKE_CXX_COMPILER_ID} CXX compiler ${CMAKE_CXX_COMPILER}")
set(_cxx_launcher "${CCACHE_PROGRAM}")
configure_file(launch-cxx.in ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/launch-cxx)
unset(_cxx_launcher)
file(COPY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/launch-cxx
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/admin/ccache-wrapper-cxx.in ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/ccache-wrapper-cxx)
file(COPY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/ccache-wrapper-cxx
DESTINATION ${CMAKE_BINARY_DIR}
FILE_PERMISSIONS
OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
set(_cacheable ON)
else()
message(STATUS "Skipping ccache set up. Not confirmed to work with compiler ID ${CMAKE_CXX_COMPILER_ID}.")
endif() # GNU C++ compiler
set(GMX_CACHE_CXX_COMPILER ${_cacheable} CACHE INTERNAL "Whether the C++ compiler will be wrapped for caching.")
message(FATAL_ERROR "Cannot set up ccache, as it is not confirmed to "
"work with compiler ID ${CMAKE_CXX_COMPILER_ID}.")
endif()
set(GMX_CCACHE_CXX_COMPILER ${_cacheable} CACHE INTERNAL "Whether the C++ compiler will be wrapped for caching.")
unset(_cacheable)
endif() # defined
# Check whether we should use the wrapper. If so, set CMAKE variables.
if(GMX_CACHE_CXX_COMPILER)
if(GMX_CCACHE_CXX_COMPILER)
if(CMAKE_GENERATOR STREQUAL "Xcode")
# Set Xcode project attributes to route compilation and linking
# through our scripts
set(CMAKE_XCODE_ATTRIBUTE_CXX "${CMAKE_BINARY_DIR}/launch-cxx")
set(CMAKE_XCODE_ATTRIBUTE_LDPLUSPLUS "${CMAKE_BINARY_DIR}/launch-cxx")
set(CMAKE_XCODE_ATTRIBUTE_CXX "${CMAKE_BINARY_DIR}/ccache-wrapper-cxx")
set(CMAKE_XCODE_ATTRIBUTE_LDPLUSPLUS "${CMAKE_BINARY_DIR}/ccache-wrapper-cxx")
else()
# Support Unix Makefiles and Ninja
set(CMAKE_CXX_COMPILER_LAUNCHER "${CMAKE_BINARY_DIR}/launch-cxx")
set(CMAKE_CXX_COMPILER_LAUNCHER "${CMAKE_BINARY_DIR}/ccache-wrapper-cxx")
endif()
endif(GMX_CACHE_CXX_COMPILER)
endif(CCACHE_PROGRAM) # ccache program
endif()
else()
message(FATAL_ERROR "GMX_ENABLE_CCACHE requires that the ccache executable "
"can be found. Add its path to the CMAKE_PREFIX_PATH path")
endif()
......@@ -64,8 +64,8 @@ add_definitions(${OpenCL_DEFINITIONS})
include_directories(SYSTEM ${OpenCL_INCLUDE_DIRS})
set(GMX_OCL_NB_CLUSTER_SIZE 8 CACHE STRING "Cluster size used by nonbonded OpenCL kernel. Set to 4 for Intel GPUs.")
mark_as_advanced(GMX_OCL_NB_CLUSTER_SIZE)
set(GMX_OPENCL_NB_CLUSTER_SIZE 8 CACHE STRING "Cluster size used by nonbonded OpenCL kernel. Set to 4 for Intel GPUs.")
mark_as_advanced(GMX_OPENCL_NB_CLUSTER_SIZE)
macro(gmx_gpu_setup)
# no OpenMP is no good!
......
#
# This file is part of the GROMACS molecular simulation package.
#
# Copyright (c) 2018, 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.
#
# GROMACS is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License
# as published by the Free Software Foundation; either version 2.1
# of the License, or (at your option) any later version.
#
# GROMACS is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with GROMACS; if not, see
# http://www.gnu.org/licenses, or write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# If you want to redistribute modifications to GROMACS, please
# consider that scientific software is very special. Version
# control is crucial - bugs must be traceable. We will be happy to
# consider code for inclusion in the official distribution, but
# derived work must not be called official GROMACS. Details are found
# in the README & COPYING files - if they are missing, get the
# official version at http://www.gromacs.org.
#
# To help us fund GROMACS development, we humbly ask that you cite
# the research papers on the package. Check out http://www.gromacs.org.
# - Define macro to check if image conversion using ImageMagick convert
# actually works, because recent changes to it made it necessary to set
# a number of flags in /etc/ImageMagick-6/policy.xml. If a sample
# conversion fails due to this, the user is informed about this being
# a possible issue.
#
# GMX_TEST_IMAGEMAGICK(VARIABLE)
#
# VARIABLE will be set in the cache to either true or false
# if convert is working or not.
function(GMX_TEST_IMAGEMAGICK VARIABLE)
set(value_ OFF)
if(NOT ${ImageMagick_CONVERT_FOUND})
MESSAGE(STATUS "No image conversion possible without ImageMagick")
elseif(NOT DEFINED ${VARIABLE})
set(TEMPDIR "${CMAKE_CURRENT_BINARY_DIR}/imagemagicktmp")
FILE(MAKE_DIRECTORY ${TEMPDIR})
set(SAMPLE_INPUT "${CMAKE_CURRENT_SOURCE_DIR}/cmake/TestImageMagickConvert.pdf")
set(SAMPLE_OUTPUT "${TEMPDIR}/TestImageMagickConvert.png")
execute_process(
COMMAND ${ImageMagick_convert_EXECUTABLE} ${SAMPLE_INPUT} -antialias -quality 03 -quiet -pointsize 12 -density 1200 -units PixelsPerInch ${SAMPLE_OUTPUT}
RESULT_VARIABLE TEST_OUTPUT
OUTPUT_QUIET
ERROR_QUIET
)
FILE(REMOVE_RECURSE ${TEMPDIR})
if (${TEST_OUTPUT} EQUAL 0)
set(value_ ON)
else()
MESSAGE(STATUS "Could not convert sample image, ImageMagick convert can not be used")
endif()
endif()
set(${VARIABLE} ${value_} CACHE INTERNAL "Test if image conversion works")
endfunction()
......@@ -201,7 +201,7 @@ set(GMX_VERSION_PATCH 0)
# candidates, where it signifies the most recent such release from
# this branch; it will be empty before the first such release, as well
# as after the final release is out.
set(GMX_VERSION_SUFFIX "-beta1")
set(GMX_VERSION_SUFFIX "-beta2")
# Conventionally with libtool, any ABI change must change the major
# version number, the minor version number should change if it's just
......@@ -241,7 +241,7 @@ set(REGRESSIONTEST_BRANCH "refs/heads/master")
# build the regressiontests tarball with all the right naming. The
# naming affects the md5sum that has to go here, and if it isn't right
# release workflow will report a failure.
set(REGRESSIONTEST_MD5SUM "3f1896a5aab8fcfb8c252e05e329b504" CACHE INTERNAL "MD5 sum of the regressiontests tarball for this GROMACS version")
set(REGRESSIONTEST_MD5SUM "3d06d41e07f523d70ae575b9ad75c670" CACHE INTERNAL "MD5 sum of the regressiontests tarball for this GROMACS version")
math(EXPR GMX_VERSION_NUMERIC
"${GMX_VERSION_MAJOR}*10000 + ${GMX_VERSION_PATCH}")
......
......@@ -65,7 +65,13 @@ if (DEFINED PYTHON_EXECUTABLE)
set(PythonInterp_FIND_QUIETLY ON)
endif()
find_package(PythonInterp 2.7)
find_package(Sphinx ${EXPECTED_SPHINX_VERSION} QUIET COMPONENTS pygments)
if (NOT ${PYTHON_VERSION_MAJOR} EQUAL 3)
find_package(Sphinx ${EXPECTED_SPHINX_VERSION} QUIET COMPONENTS pygments)
else()
MESSAGE(STATUS "Can not build documentation with Python 3")
endif()
# Even if we aren't going to make the full webpage, set up to put all
# the documentation output in the same place, for convenience
......@@ -87,6 +93,45 @@ if (SOURCE_IS_SOURCE_DISTRIBUTION)
endif()
add_subdirectory(doxygen)
# TODO: Consider whether this could just be replaced by using
# GMX_DEVELOPER_BUILD to control this as well.
option(GMX_BUILD_MANUAL "Whether to try to configure to build the PDF manual" OFF)
mark_as_advanced(GMX_BUILD_MANUAL)
set(MANUAL_BUILD_IS_POSSIBLE ON)
set(MANUAL_BUILD_NOT_POSSIBLE_REASON)
set(NO_IMAGE_CONVERT_REASON)
if (NOT GMX_BUILD_MANUAL)
# Make sure we only do detection of manual-building dependencies
# when the user opted in for that.
set(MANUAL_BUILD_IS_POSSIBLE OFF)
set(MANUAL_BUILD_NOT_POSSIBLE_REASON "GMX_BUILD_MANUAL is not ON")
elseif (BUILD_IS_INSOURCE)
# UseLATEX.cmake does not work with an in-source build
set(MANUAL_BUILD_IS_POSSIBLE OFF)
set(MANUAL_BUILD_NOT_POSSIBLE_REASON "the build is in-source")
else()
include(manual/UseLATEX.cmake)
if(${PYTHON_VERSION_MAJOR} EQUAL 3)
set(MANUAL_BUILD_IS_POSSIBLE OFF)
set(MANUAL_BUILD_NOT_POSSIBLE_REASON "We can not build the documentation when using python3")
elseif(NOT SPHINX_FOUND)
set(MANUAL_BUILD_IS_POSSIBLE OFF)
set(MANUAL_BUILD_NOT_POSSIBLE_REASON "Sphinx has not been found and is needed to create the LaTex input files")
elseif(NOT PDFLATEX_COMPILER OR NOT IMAGE_CONVERT_POSSIBLE)
set(MANUAL_BUILD_IS_POSSIBLE OFF)
set(MANUAL_BUILD_NOT_POSSIBLE_REASON "pdflatex or some other dependency (ImageMagick convert) is not available")
if (NOT IMAGE_CONVERT_POSSIBLE)
set(NO_IMAGE_CONVERT_REASON "Can not convert files for online or pdf manual")
endif()
# TODO Later, identify other dependencies like bibtex,
# make_index, date, some graphics conversion program,
# etc. Perhaps patch UseLATEX.cmake and contribute upstream.
endif()
endif()
if (SPHINX_FOUND)
# We need to have all the Sphinx input files in a single directory, and
# since some of them are generated, we copy everything into the build tree,
......@@ -107,13 +152,40 @@ if (SPHINX_FOUND)
endif()
# The reference manual still contains the individual sections from the
# LaTeX document, with the files below grouped and annotated by chapter.
set(REFERENCEMANUAL_SPHINX_FILES
set(REFERENCEMANUAL_SPHINX_FILES_GENERAL
# Main index file, preface and introduction.
reference-manual/index.rst
reference-manual/preface.rst
reference-manual/introduction.rst
# Definitions and Units chapter
reference-manual/definitions.rst
# Topologies chapter
reference-manual/topologies.rst
reference-manual/topologies/particle-type.rst
reference-manual/topologies/parameter-files.rst
reference-manual/topologies/molecule-definition.rst
reference-manual/topologies/constraint-algorithm-section.rst
reference-manual/topologies/pdb2gmx-input-files.rst
reference-manual/topologies/topology-file-formats.rst
reference-manual/topologies/force-field-organization.rst
# File formats chapter
reference-manual/file-formats.rst
# Run parameters and programs chapter
reference-manual/run-parameters.rst
# Implementation details chapter
reference-manual/details.rst
# Averages and fluctations chapter
reference-manual/averages.rst
# References
reference-manual/references.rst
# PNG formated plot files that don't need to be converted into PNG
# for the web page.
reference-manual/plots/peregrine.png
reference-manual/plots/adress.png
reference-manual/plots/plotje.png
reference-manual/plots/xvgr.png
)
set(REFERENCEMANUAL_SPHINX_FILES_WITH_IMAGES
# Algorithms chapter
reference-manual/algorithms.rst
reference-manual/algorithms/periodic-boundary-conditions.rst
......@@ -142,17 +214,6 @@ if (SPHINX_FOUND)
reference-manual/functions/nonbonded-interactions.rst
reference-manual/functions/polarization.rst
reference-manual/functions/restraints.rst
# Topologies chapter
reference-manual/topologies.rst
reference-manual/topologies/particle-type.rst
reference-manual/topologies/parameter-files.rst
reference-manual/topologies/molecule-definition.rst
reference-manual/topologies/constraint-algorithm-section.rst
reference-manual/topologies/pdb2gmx-input-files.rst
reference-manual/topologies/topology-file-formats.rst
reference-manual/topologies/force-field-organization.rst
# File formats chapter
reference-manual/file-formats.rst
# Special topics chapter
reference-manual/special.rst
reference-manual/special/free-energy-implementation.rst
......@@ -168,8 +229,6 @@ if (SPHINX_FOUND)
reference-manual/special/qmmm.rst
reference-manual/special/vmd-imd.rst
reference-manual/special/membrane-embedding.rst
# Run parameters and programs chapter
reference-manual/run-parameters.rst
# Analysis chapter
reference-manual/analysis.rst
reference-manual/analysis/using-groups.rst
......@@ -185,20 +244,7 @@ if (SPHINX_FOUND)
reference-manual/analysis/covariance-analysis.rst
reference-manual/analysis/dihedral-pca.rst
reference-manual/analysis/protein-related.rst
reference-manual/analysis/interface-related.rst
# Implementation details chapter
reference-manual/details.rst
# Averages and fluctations chapter
reference-manual/averages.rst
# References
reference-manual/references.rst
# PNG formated plot files that don't need to be converted into PNG
# for the web page.
reference-manual/plots/peregrine.png
reference-manual/plots/adress.png
reference-manual/plots/plotje.png
reference-manual/plots/xvgr.png
)
reference-manual/analysis/interface-related.rst)
# The image files have also been ordered by the respective
# chapter they are included in in the reference manual
set(REFERENCEMANUAL_IMAGE_FILES
......@@ -362,13 +408,16 @@ if (SPHINX_FOUND)
user-guide/environment-variables.rst
user-guide/faq.rst
user-guide/floating-point.rst
user-guide/flow.rst
user-guide/force-fields.rst
user-guide/getting-started.rst
user-guide/index.rst
user-guide/managing-simulations.rst
user-guide/mdp-options.rst
user-guide/mdrun-features.rst
user-guide/mdrun-performance.rst
user-guide/run-time-errors.rst
user-guide/security.rst
user-guide/system-preparation.rst
user-guide/terminology.rst
)
......@@ -401,10 +450,17 @@ if (SPHINX_FOUND)
set(GMX_SOURCE_DOI_STRING "${GMX_SOURCE_DOI_STRING} https://doi.org/${GMX_SOURCE_DOI}.")
endif()
if(IMAGE_CONVERT_POSSIBLE)
set(IMAGE_CONVERT_STRING "possible")
else()
set(IMAGE_CONVERT_STRING "impossible")
endif()
set(SPHINX_CONFIG_VARS_FILE ${SPHINX_INPUT_DIR}/conf-vars.py)
gmx_configure_version_file(conf-vars.py.cmakein ${SPHINX_CONFIG_VARS_FILE}
EXTRA_VARS
SPHINX_EXTENSION_PATH RELENG_PATH
IMAGE_CONVERT_STRING
EXPECTED_DOXYGEN_VERSION
EXPECTED_SPHINX_VERSION
CMAKE_MINIMUM_REQUIRED_VERSION REQUIRED_CUDA_VERSION
......@@ -430,34 +486,17 @@ if (SPHINX_FOUND)
dev-manual/releng/jenkins-ui.rst
)
endif()
gmx_add_sphinx_source_files(
FILES
${REFERENCEMANUAL_SPHINX_FILES_GENERAL})
if (IMAGE_CONVERT_POSSIBLE)
gmx_add_sphinx_source_files(
FILES
${REFERENCEMANUAL_SPHINX_FILES}
user-guide/index.rst
user-guide/flow.rst)
gmx_add_sphinx_source_files(
FILES
${REFERENCEMANUAL_SPHINX_FILES_WITH_IMAGES}
${REFERENCEMANUAL_IMAGE_FILES})
gmx_add_sphinx_image_conversion_files(
FILES
${REFERENCEMANUAL_IMAGE_FILES})
else()
gmx_add_sphinx_source_files(
FROM ${CMAKE_CURRENT_SOURCE_DIR}/reference-manual TO user-guide
FILES
file-formats.rst
plots/plotje.png
plots/xvgr.png)
gmx_add_sphinx_source_files(
FROM ${CMAKE_CURRENT_SOURCE_DIR}/reference-manual-minimal TO reference-manual
FILES
index.rst)
gmx_add_sphinx_source_files(
FROM ${CMAKE_CURRENT_SOURCE_DIR}/user-guide-old TO user-guide
FILES
index.rst
flow.rst)
endif()
gmx_add_sphinx_input_target(sphinx-input-rst)
gmx_add_sphinx_image_conversion_target(sphinx-image-conversion)
......
......@@ -111,7 +111,7 @@ function(gmx_add_sphinx_image_conversion_files)
endif()
add_custom_command(
OUTPUT ${_target}
COMMAND convert ${_source} -antialias -quality 03 -quiet -pointsize 12 -density 1200 -units PixelsPerInch ${_target}
COMMAND ${ImageMagick_convert_EXECUTABLE} ${_source} -antialias -quality 03 -quiet -pointsize 12 -density 1200 -units PixelsPerInch ${_target}
DEPENDS ${_source}
COMMENT "Converting Sphinx input graphics file ${_file} to png"
VERBATIM)
......
......@@ -38,6 +38,7 @@ gmx_version_string = '@GMX_VERSION_STRING@'
gmx_version_string_full = '@GMX_VERSION_STRING_FULL@'
regressiontest_version = '@REGRESSIONTEST_VERSION@'
gmx_min_sphinx = '@EXPECTED_SPHINX_VERSION@'
gmx_image_convert = '@IMAGE_CONVERT_STRING@'
variables = [
('EXPECTED_DOXYGEN_VERSION', '@EXPECTED_DOXYGEN_VERSION@'),
('EXPECTED_SPHINX_VERSION', '@EXPECTED_SPHINX_VERSION@'),
......
......@@ -125,6 +125,11 @@ exclude_patterns = ['fragments']
if not tags.has('do_man'):
exclude_patterns += ['man']
# Set variable if documentation build can convert images or not
# to selectively include files in reference manual
def setup(app):
app.add_config_value('gmx_image_convert', 'impossible', 'env')
# The reST default role (used for this markup: `text`) to use for all
# documents.