Commit 9f252b4c authored by Nicholas Breen's avatar Nicholas Breen

New upstream version 2019~beta1

parent be53d79c

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

......@@ -40,6 +40,14 @@ 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()
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
......@@ -192,6 +200,9 @@ gmx_dependent_option(
ON
GMX_MPI)
mark_as_advanced(GMX_MPI_IN_PLACE)
option(GMX_MIMIC "Enable MiMiC QM/MM interface (CPMD is required)" OFF)
option(GMX_FAHCORE "Build a library with mdrun functionality" OFF)
mark_as_advanced(GMX_FAHCORE)
......@@ -202,20 +213,17 @@ gmx_add_cache_dependency(GMX_COOL_QUOTES BOOL "NOT GMX_FAHCORE" OFF)
option(GMX_USE_OPENCL "Enable OpenCL acceleration" OFF)
# Decide on GPU settings based on user-settings and GPU/CUDA
# detection. GCC 4.8 requires CUDA 6.0 (but we choose 6.5 for the
# preliminary C++11 support), icc 15 requires CUDA 7.0, and VS2015
# requires CUDA 8.0
# detection. VS2017 requires CUDA 9.0, for the other arch/compilers
# rest we require CUDA 7.0 or later (including for clang-CUDA).
if(MSVC)
set(REQUIRED_CUDA_VERSION 8.0)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
set(REQUIRED_CUDA_VERSION 7.0)
set(REQUIRED_CUDA_VERSION 9.0)
else()
set(REQUIRED_CUDA_VERSION 6.5)
set(REQUIRED_CUDA_VERSION 7.0)
endif()
set(REQUIRED_CUDA_COMPUTE_CAPABILITY 2.0)
set(REQUIRED_CUDA_COMPUTE_CAPABILITY 3.0)
# OpenCL required version: 1.1 or newer
set(REQUIRED_OPENCL_MIN_VERSION 1.1)
# OpenCL required version: 1.2 or newer
set(REQUIRED_OPENCL_MIN_VERSION 1.2)
if(NOT GMX_USE_OPENCL)
# CUDA detection is done only if GMX_USE_OPENCL is OFF.
......@@ -240,7 +248,7 @@ gmx_option_multichoice(
GMX_SIMD
"SIMD instruction set for CPU kernels and compiler optimization"
"AUTO"
AUTO None SSE2 SSE4.1 AVX_128_FMA AVX_256 AVX2_256 AVX2_128 AVX_512 AVX_512_KNL MIC ARM_NEON ARM_NEON_ASIMD IBM_QPX IBM_VMX IBM_VSX Sparc64_HPC_ACE Reference)
AUTO None SSE2 SSE4.1 AVX_128_FMA AVX_256 AVX2_256 AVX2_128 AVX_512 AVX_512_KNL MIC ARM_NEON ARM_NEON_ASIMD IBM_VMX IBM_VSX Sparc64_HPC_ACE Reference)
if(GMX_TARGET_MIC)
set(GMX_FFT_LIBRARY_DEFAULT "mkl")
......@@ -418,6 +426,7 @@ find_library(HAVE_LIBM m)
mark_as_advanced(HAVE_LIBM)
check_library_exists(rt clock_gettime "" HAVE_CLOCK_GETTIME)
check_library_exists(m feenableexcept "" HAVE_FEENABLEEXCEPT)
check_library_exists(m fedisableexcept "" HAVE_FEDISABLEEXCEPT)
include(TestSchedAffinity)
test_sched_affinity(HAVE_SCHED_AFFINITY)
......@@ -445,10 +454,6 @@ gmx_set_boolean(GMX_USE_NICE "HAVE_UNISTD_H AND HAVE_NICE")
# GROMACS defaults or user settings will make sense. Also, any
# toolchain-related reasons for choosing whether to detect various
# things can be sorted out now, before the detection takes place.
if(${CMAKE_SYSTEM_NAME} MATCHES BlueGene)
include(gmxManageBlueGene)
endif()
if(GMX_TARGET_FUJITSU_SPARC64)
include(gmxManageFujitsuSparc64)
endif()
......@@ -458,6 +463,10 @@ endif()
########################################################################
include(gmxManageMPI)
########################################################################
#Process MiMiC settings
########################################################################
include(gmxManageMimic)
########################################################################
#Process shared/static library settings
......@@ -492,32 +501,37 @@ include(gmxManageSharedLibraries)
# set(XML_LIBRARIES ${LIBXML2_LIBRARIES})
#endif()
if(DEFINED HWLOC_LIBRARIES)
set(Hwloc_FIND_QUIETLY TRUE)
endif()
find_package(Hwloc 1.5)
if (HWLOC_FOUND)
if (HWLOC_LIBRARIES MATCHES ".a$")
set(_STATIC_HWLOC TRUE)
endif()
gmx_option_trivalue(
GMX_HWLOC
"Use hwloc portable hardware locality library"
"AUTO")
gmx_check_if_changed(HWLOC_FOUND_CHANGED HWLOC_FOUND)
if (_STATIC_HWLOC AND HWLOC_FOUND_CHANGED)
message(STATUS "Static hwloc library found, will not attempt using it as it could lead to link-time errors. To use the detected library, manually set GMX_HWLOC=ON and you will likely have to pass appropriate linker flags too to satisfy the link-time dependencies of your hwloc library. Try \"pkg-config --libs --static hwloc\" for suggestions on what you will need.")
set(GMX_HWLOC_DEFAULT OFF)
else()
set(GMX_HWLOC_DEFAULT ON)
if (GMX_HWLOC)
# Find quietly the second time.
if(DEFINED HWLOC_LIBRARIES)
set(Hwloc_FIND_QUIETLY TRUE)
endif()
else()
set(GMX_HWLOC_DEFAULT OFF)
endif()
option(GMX_HWLOC "Add support for hwloc Portable Hardware locality library" ${GMX_HWLOC_DEFAULT})
if(GMX_HWLOC)
if(HWLOC_FOUND)
include_directories(SYSTEM ${HWLOC_INCLUDE_DIRS})
list(APPEND GMX_EXTRA_LIBRARIES ${HWLOC_LIBRARIES})
else()
message(FATAL_ERROR "Hwloc package support requested, but not found.")
find_package(Hwloc 1.5)
if (HWLOC_FOUND)
if (HWLOC_LIBRARIES MATCHES ".a$")
set(_STATIC_HWLOC TRUE)
endif()
gmx_check_if_changed(HWLOC_FOUND_CHANGED HWLOC_FOUND)
if (_STATIC_HWLOC AND HWLOC_FOUND_CHANGED)
message(STATUS "Static hwloc library found, will not attempt using it as it could lead to link-time errors. To use the detected library, manually set GMX_HWLOC=ON and you will likely have to pass appropriate linker flags too to satisfy the link-time dependencies of your hwloc library. Try \"pkg-config --libs --static hwloc\" for suggestions on what you will need.")
set(GMX_USE_HWLOC OFF)
else()
set(GMX_USE_HWLOC ON)
endif()
if (GMX_USE_HWLOC)
include_directories(SYSTEM ${HWLOC_INCLUDE_DIRS})
list(APPEND GMX_EXTRA_LIBRARIES ${HWLOC_LIBRARIES})
endif()
elseif(GMX_HWLOC_FORCE)
message(FATAL_ERROR "Hwloc package support required, but not found.")
endif()
endif()
......@@ -561,8 +575,6 @@ endif()
include(ThreadMPI)
# Enable core threading facilities
tmpi_enable_core("${CMAKE_SOURCE_DIR}/src/external/thread_mpi/include")
# Enable tMPI C++ support
tmpi_enable_cxx()
if(GMX_THREAD_MPI)
# enable MPI functions
tmpi_enable()
......@@ -686,7 +698,15 @@ check_include_file_cxx(regex HAVE_CXX11_REGEX)
include(gmxTestXDR)
gmx_test_xdr(GMX_SYSTEM_XDR)
if(NOT GMX_SYSTEM_XDR)
# Darwin has system XDR, but it uses a three-argument flavour of
# xdrproc_t that it guarantees will still work if you pass the normal
# two-argument xdr filters, but gcc 8 warns about the cast necessary
# to do that, so it's simpler to just use our own XDR library.
#
# TODO It would be better to craft a cmake test which fails if such
# XDR operations cause warnings, and succeeds otherwise, because it is
# generally preferable to use system libraries where possible.
if(NOT GMX_SYSTEM_XDR OR CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set(GMX_INTERNAL_XDR 1)
endif()
......@@ -857,7 +877,7 @@ else()
# Set the RPATH as relative to the executable location to make the
# binaries relocatable.
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") #Assume OS X >=10.5
set(CMAKE_INSTALL_RPATH "@executable_path/../${CMAKE_INSTALL_LIBDIR}")
set(CMAKE_INSTALL_RPATH "@loader_path/../${CMAKE_INSTALL_LIBDIR}")
set(CMAKE_INSTALL_NAME_DIR ${CMAKE_INSTALL_RPATH})
else()
set(CMAKE_INSTALL_RPATH "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}")
......
......@@ -23,6 +23,8 @@ This file contains the licenses for the following bodies of code:
12. Gamma distribution from libc++
13. md5
14. lmfit
15. clFFT
16. Guidelines Support Library (GSL)
Our chosen method for packaging distributions (CPack) only permits a
package to have a single license file, so we are unfortunately forced
......@@ -1248,7 +1250,7 @@ The package lmfit is distributed under the FreeBSD License:
--
Copyright (c) 1980-1999 University of Chicago,
as operator of Argonne National Laboratory
Copyright (c) 2004-2013 Joachim Wuttke, Forschungszentrum Juelich GmbH
Copyright (c) 2004-2015 Joachim Wuttke, Forschungszentrum Juelich GmbH
All rights reserved.
......@@ -1273,3 +1275,50 @@ The package lmfit is distributed under the FreeBSD License:
arising in any way out of the use of this software, even if advised of the
possibility of such damage.
--
15. clFFT
============================================
Files: src/external/clFFT/*
The source for clFFT is licensed under the Apache License, Version 2.0
--
AMD clFFT
Copyright 2013 Advanced Micro Devices, Inc.
This product includes software developed at
Advanced Micro Devices, Inc. (http://www.amd.com).
--
15. Guidelines Support Library
============================================
Files: src/gromacs/compat/pointers.h
The source for the Guidelines Support Library (GSL) is licensed under
the MIT license.
--
Copyright (c) 2015 Microsoft Corporation. All rights reserved.
This code is licensed under the MIT License (MIT).
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
--
This diff is collapsed.
#
# This file is part of the GROMACS molecular simulation package.
#
# Copyright (c) 2015,2016,2017, by the GROMACS development team, led by
# Copyright (c) 2015,2016,2017,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.
......@@ -32,9 +32,10 @@
# To help us fund GROMACS development, we humbly ask that you cite
# the research papers on the package. Check out http://www.gromacs.org.
# These options need to match Jenkins labels on the slave where the