...
 
Commits (25)

Too many changes to show.

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

......@@ -40,6 +40,8 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_CURRENT_
project(Gromacs)
include(gmxManageCcache)
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 +194,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 +207,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 +242,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 +420,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 +448,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 +457,10 @@ endif()
########################################################################
include(gmxManageMPI)
########################################################################
#Process MiMiC settings
########################################################################
include(gmxManageMimic)
########################################################################
#Process shared/static library settings
......@@ -492,32 +495,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 +569,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 +692,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 +871,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}")
......@@ -884,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)
......
......@@ -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
# analysis is intended to run.
build_options = ['clang-4', 'clang-static-analyzer-4']
# These options need to match the node label in Jenkins and the
# capabilities in releng/agents.py for the agent where the analysis is
# intended to run.
build_options = ['clang-6', 'clang-static-analyzer-6']
def do_build(context):
cmake_opts = {
......@@ -45,7 +46,8 @@ def do_build(context):
'GMX_OPENMP': 'OFF',
'GMX_SIMD': 'None',
'GMX_USE_RDTSCP': 'OFF',
'GMX_FFT_LIBRARY': 'fftpack'
'GMX_FFT_LIBRARY': 'fftpack',
'GMX_CLANG_ANALYZER' : 'ON'
}
context.run_cmake(cmake_opts)
......
#
# This file is part of the GROMACS molecular simulation package.
#
# Copyright (c) 2015,2016,2017, 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.
def do_build(context):
# TODO: Make the XMLs go directly to the desired folder.
# xml_dir = context.workspace.get_log_dir(category='cppcheck')
cmake_opts = {
'CPPCHECK_EXECUTABLE': context.env.get_cppcheck_command(version='1.76.1'),
'CPPCHECK_XML_OUTPUT': 'ON',
'GMX_SIMD': 'Reference',
'GMX_USE_RDTSCP': 'OFF'
}
context.run_cmake(cmake_opts)
context.build_target(target='cppcheck', parallel=True)
context.process_cppcheck_results('tests/cppcheck-*.xml')
#
# 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.
......@@ -58,12 +58,22 @@ def do_build(context):
elif context.job_type == JobType.GERRIT:
cmake_opts['GMX_COMPACT_DOXYGEN'] = 'ON'
cmake_opts.update(context.get_doc_cmake_options(
doxygen_version='1.8.5', sphinx_version='1.4.1'))
doxygen_version='1.8.5', sphinx_version='1.6.1'))
context.run_cmake(cmake_opts);
context.build_target(target='gmx', parallel=True,
# we keep the individual build targets here to ensure some
# granularity of the resulting error messages (if any).
# it would be possible to run everything at once with
# target=webpage, but then debugging a failed build would
# become exceedingly tedious
context.build_target(target='sphinx-input', parallel=True,
failure_string='Generating Sphinx input failed',
continue_on_failure=True)
context.build_target(target='sphinx-programs', parallel=True,
failure_string='Running gmx help -export rst failed',
continue_on_failure=True)
context.build_target(target='manual', parallel=False,
context.build_target(target='manual', parallel=True,
target_descr='PDF manual', continue_on_failure=True)
logfile = os.path.join(context.workspace.build_dir, 'docs/manual/gromacs.log')
if os.path.isfile(logfile):
......@@ -77,9 +87,9 @@ def do_build(context):
# separately causes many of the Doxygen targets to get built twice if run
# from a tarball.
if not release:
context.build_target(target='doxygen-all', parallel=False,
context.build_target(target='doxygen-all', parallel=True,
target_descr='Doxygen documentation', continue_on_failure=True)
context.build_target(target='check-source', parallel=False,
context.build_target(target='check-source', parallel=True,
failure_string='check-source failed to run', continue_on_failure=True)
logs = []
for target in ('check-source', 'doxygen-xml', 'doxygen-user',
......@@ -93,12 +103,6 @@ def do_build(context):
if context.failed:
return
context.build_target(target='sphinx-input', parallel=False,
failure_string='Generating Sphinx input failed',
continue_on_failure=True)
context.build_target(target='sphinx-programs', parallel=False,
failure_string='Running gmx help -export rst failed',
continue_on_failure=True)
if context.failed:
return
......@@ -110,7 +114,7 @@ def do_build(context):
))
logs = []
for target, log, descr in sphinx_targets:
context.build_target(target=target, parallel=False,
context.build_target(target=target, parallel=True,
failure_string='Sphinx: {0} generation failed'.format(descr),
continue_on_failure=True)
logfile = os.path.join(context.workspace.build_dir,
......@@ -122,7 +126,7 @@ def do_build(context):
if context.failed:
return
context.build_target(target='webpage', parallel=False)
context.build_target(target='webpage', parallel=True)
if context.failed:
return
......
......@@ -49,14 +49,13 @@ extra_options = {
'fftpack': Option.simple,
'double': Option.simple,
'thread-mpi': Option.bool,
'gpu': Option.bool,
'opencl': Option.bool,
'clang_cuda': Option.bool,
'openmp': Option.bool,
'nranks': Option.string,
'npme': Option.string,
'gpu_id': Option.string,
'hwloc': Option.bool
'hwloc': Option.bool,
'tng': Option.bool
}
extra_projects = [Project.REGRESSIONTESTS]
......@@ -68,6 +67,9 @@ def do_build(context):
cmake_opts['CMAKE_BUILD_TYPE'] = 'Debug'
cmake_opts['GMX_USE_RDTSCP'] = 'DETECT'
if not context.opts.msvc and not context.opts.mdrun_only and not context.opts.static:
cmake_opts['GMXAPI'] = 'ON'
if context.opts.reference:
cmake_opts['CMAKE_BUILD_TYPE'] = 'Reference'
elif context.opts['release']:
......@@ -94,11 +96,10 @@ def do_build(context):
cmake_opts['GMX_SIMD'] = 'None'
else:
cmake_opts['GMX_SIMD'] = context.opts.simd
if context.opts.gpu or context.opts.opencl:
if context.opts.cuda or context.opts.opencl:
cmake_opts['GMX_GPU'] = 'ON'
if context.opts.opencl:
context.env.set_env_var('CUDA_PATH', context.env.cuda_root)
context.env.set_env_var('AMDAPPSDKROOT', context.env.amdappsdk_root)
cmake_opts['GMX_USE_OPENCL'] = 'ON'
else:
cmake_opts['CUDA_TOOLKIT_ROOT_DIR'] = context.env.cuda_root
......@@ -121,16 +122,32 @@ def do_build(context):
cmake_opts['GMX_FFT_LIBRARY'] = 'mkl'
elif context.opts.fftpack:
cmake_opts['GMX_FFT_LIBRARY'] = 'fftpack'
if context.opts.mkl or context.opts.atlas:
if context.opts.mkl or context.opts.atlas or context.opts.armpl:
cmake_opts['GMX_EXTERNAL_BLAS'] = 'ON'
cmake_opts['GMX_EXTERNAL_LAPACK'] = 'ON'
if context.opts.clFFT:
cmake_opts['GMX_EXTERNAL_CLFFT'] = 'ON'
cmake_opts['clFFT_ROOT'] = context.env.clFFT_root
if context.opts.armpl:
cmake_opts['FFTWF_LIBRARY'] = os.path.join(context.env.armpl_dir, 'lib/libarmpl_lp64.so')
cmake_opts['FFTWF_INCLUDE_DIR'] = os.path.join(context.env.armpl_dir, 'include')
cmake_opts['GMX_BLAS_USER'] = os.path.join(context.env.armpl_dir, 'lib/libarmpl_lp64.so')
cmake_opts['GMX_LAPACK_USER'] = os.path.join(context.env.armpl_dir, 'lib/libarmpl_lp64.so')
if context.opts.hwloc is False:
cmake_opts['GMX_HWLOC'] = 'OFF'