...
 
Commits (1911)

Too many changes to show.

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

......@@ -32,7 +32,6 @@ Checks: |
readability-redundant-control-flow,
readability-simplify-boolean-expr,
readability-simplify-subscript-expr,
readability-static-accessed-through-instance,
readability-static-definition-in-anonymous-namespace,
readability-string-compare,
readability-uniqueptr-delete-release,
......
......@@ -58,3 +58,4 @@ doc/dg/background_errors.unsorted
*.pyc
.ycm_extra_conf.py
.ipynb_checkpoints
This diff is collapsed.
......@@ -11,7 +11,7 @@ matrix:
- os: linux
sudo: required
services: docker
env: myconfig=maxset image=ubuntu-python3 python_version=3
env: myconfig=maxset image=ubuntu-python3
script:
- maintainer/CI/build_docker.sh
......@@ -13,7 +13,7 @@ Core developers
Florian Weik
Rudolf Weeber
Kai Szuttor
Jean-Noël Grad
Former Core Developers
----------------------
......@@ -29,6 +29,7 @@ Olaf Lenz
Contributors
------------
Adolfo Poma
Alexander Reinauer
Alexander Schlaich
Alexander Weyman
Andrea Tagliabue
......@@ -38,6 +39,8 @@ Ashreya Jayaram
Ben Reynwar (formerly: Reynolds)
Bogdan Tanygin
Cameron Stewart
Christian Haege
Christoph Lohrmann
Christoph Schneider
David Schwörer
David Sean
......@@ -50,7 +53,6 @@ Florian Fahrenberger (formerly: Rühle)
Florian Häußermann
Francesca Lugli
Frank Mühlbach
Georg Rempfer
Gizem Inci
Gregoria Illya
Hamid Zaheri
......@@ -61,7 +63,7 @@ Ira Cooke
Iva Jancigova
Ivan Cimrak
Iveta Jancigova
Jean Noel Grad
Jan Finkbeiner
Joan Josep Cerdà
Jonas Landsgesell
Jon Halverson
......@@ -70,8 +72,8 @@ Josh Berryman
Julius Herb
Kai Grass
Kai Kratzer
Kai Szuttor
Karen Johnston
Kartik Jain
Kevin Kleinbeck
Konrad Breitsprecher
Le Qiao
......@@ -86,6 +88,7 @@ Michael Lahnert
Milena Smiljanic
Mingyang Hu
Miru Lee
Moritz Schumacher
Muhammad Anwar
Nicolai Roth
Nils Binz
......@@ -100,7 +103,6 @@ Peter Kosovan
Pierre de Buyl
Robert Kaufmann
Robin Bardakcioglu
Rudolf Weeber
Sam Foley
Sandeep Tyagi
Sascha Erhardt
......
# Copyright (C) 2009-2018 The ESPResSo project
# Copyright (C) 2009-2019 The ESPResSo project
# Copyright (C) 2009,2010
# Max-Planck-Institute for Polymer Research, Theory Group
#
......@@ -20,20 +20,16 @@
cmake_minimum_required(VERSION 3.4)
include(FeatureSummary)
include(GNUInstallDirs)
project(ESPResSo)
include(cmake/FindPythonModule.cmake)
if(NOT ${CMAKE_VERSION} VERSION_LESS "3.12")
cmake_policy(SET CMP0074 NEW)
endif()
enable_language(CXX)
set(PROJECT_VERSION "4.1-dev")
string(REGEX
REPLACE "^([1-9]+)\\.[0-9]+.*$"
"\\1"
SOVERSION
"${PROJECT_VERSION}")
if(NOT ${SOVERSION} MATCHES "^[1-9]+$")
message(FATAL_ERROR "Could not determind SOVERSION from ${PROJECT_VERSION}")
endif(NOT ${SOVERSION} MATCHES "^[1-9]+$")
set(PROJECT_VERSION "4.2-dev")
#
# CMake internal vars
......@@ -53,8 +49,7 @@ set(CMAKE_FIND_FRAMEWORK LAST)
# User input options
######################################################################
set(WITH_PYTHON yes)
option(WITH_PYTHON "Build with Python bindings" ON)
option(WITH_GSL "Build with GSL support" ON)
option(WITH_CUDA "Build with GPU support" ON)
option(WITH_HDF5 "Build with HDF5 support" ON)
......@@ -188,6 +183,7 @@ if(WITH_CUDA)
find_package(HIP MODULE)
message(STATUS "Found HIP compiler: ${HIP_HIPCC_EXECUTABLE}")
set(CUDA 1)
set(HIP 1)
list(APPEND HIP_HCC_FLAGS "-Wno-macro-redefined -Wno-duplicate-decl-specifier -std=c++14")
find_library(ROCFFT_LIB name "rocfft" PATHS "${HIP_ROOT_DIR}/lib")
......@@ -209,10 +205,10 @@ if(WITH_CUDA)
set(CUDA_LINK_LIBRARIES_KEYWORD PUBLIC)
set(CUDA_NVCC_FLAGS_DEBUG "${CUDA_NVCC_FLAGS_DEBUG} -g -G")
set(CUDA_NVCC_FLAGS_DEBUG "${CUDA_NVCC_FLAGS_DEBUG} -g")
set(CUDA_NVCC_FLAGS_RELEASE "${CUDA_NVCC_FLAGS_RELEASE} -O3 -DNDEBUG")
set(CUDA_NVCC_FLAGS_MINSIZEREL "${CUDA_NVCC_FLAGS_MINSIZEREL} -Os -DNDEBUG")
set(CUDA_NVCC_FLAGS_RELWITHDEBINFO "${CUDA_NVCC_FLAGS_RELWITHDEBINFO} -g -G -O2")
set(CUDA_NVCC_FLAGS_RELWITHDEBINFO "${CUDA_NVCC_FLAGS_RELWITHDEBINFO} -g -O2")
set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode=arch=compute_30,code=sm_30 -gencode=arch=compute_52,code=sm_52 -gencode=arch=compute_52,code=compute_52")
list(APPEND CUDA_NVCC_FLAGS "-std=c++14")
SET(CUDA_PROPAGATE_HOST_FLAGS OFF)
......@@ -232,7 +228,7 @@ if(WITH_CUDA)
endif()
endif(WITH_CUDA)
find_package(PythonInterp REQUIRED)
find_package(PythonInterp 3.3 REQUIRED)
if(WITH_PYTHON)
find_package(Cython 0.23 REQUIRED)
......@@ -246,29 +242,19 @@ if(WITH_PYTHON)
execute_process(
COMMAND
${PYTHON_EXECUTABLE} -c
"import distutils.sysconfig as cg; print(cg.get_python_lib(1,0,prefix='${CMAKE_INSTALL_EXEC_PREFIX}'))"
"import distutils.sysconfig as cg; print(cg.get_python_lib(prefix='${CMAKE_INSTALL_PREFIX}', plat_specific=True, standard_lib=False).replace('${CMAKE_INSTALL_PREFIX}/', '', 1))"
OUTPUT_VARIABLE PYTHON_INSTDIR
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif(NOT PYTHON_INSTDIR)
if(PYTHON_VERSION_MAJOR EQUAL 2)
set(
CYTHON_FLAGS "-2"
CACHE STRING "Flags used by the Cython compiler during all build types.")
else()
set(
CYTHON_FLAGS "-3"
set(CYTHON_FLAGS "-3"
CACHE STRING "Flags used by the Cython compiler during all build types.")
endif()
if(WARNINGS_ARE_ERRORS)
set(CYTHON_FLAGS "--warning-errors;${CYTHON_FLAGS}")
endif()
if(PYTHON_VERSION_MAJOR EQUAL 2)
find_program(IPYTHON_EXECUTABLE NAMES ipython2 ipython jupyter)
else()
find_program(IPYTHON_EXECUTABLE NAMES ipython3 ipython jupyter)
endif()
find_program(IPYTHON_EXECUTABLE NAMES jupyter ipython3 ipython)
endif(WITH_PYTHON)
......@@ -277,7 +263,7 @@ if(FFTW3_FOUND)
set(FFTW 3)
endif(FFTW3_FOUND)
# If we build either interface turn on script interface
# If we build Python bindings, turn on script interface
if(WITH_PYTHON)
set(WITH_SCRIPT_INTERFACE ON)
endif()
......@@ -343,7 +329,7 @@ endif(WITH_VALGRIND_INSTRUMENTATION)
# MPI
#
find_package(MPI REQUIRED)
find_package(MPI 3.0 REQUIRED)
# CMake < 3.9
if(NOT TARGET MPI::MPI_CXX)
......@@ -413,10 +399,6 @@ endif()
# Paths
#
if(NOT DEFINED BINDIR)
set(BINDIR "bin")
endif(NOT DEFINED BINDIR)
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${PYTHON_INSTDIR}/espressomd")
#
......@@ -535,7 +517,9 @@ if(WITH_TESTS)
set(WITH_UNIT_TESTS ON)
endif(Boost_UNIT_TEST_FRAMEWORK_FOUND)
add_custom_target(check)
add_subdirectory(testsuite)
if(WITH_PYTHON)
add_subdirectory(testsuite)
endif(WITH_PYTHON)
endif(WITH_TESTS)
if(WITH_BENCHMARKS)
......@@ -550,7 +534,6 @@ endif(WITH_BENCHMARKS)
add_subdirectory(doc)
add_subdirectory(src)
add_subdirectory(libs)
add_subdirectory(config)
#
# Feature summary
#
......
This diff is collapsed.
......@@ -4,7 +4,7 @@
[![codecov](https://codecov.io/gh/espressomd/espresso/branch/python/graph/badge.svg)](https://codecov.io/gh/espressomd/espresso)
This is the Molecular Dynamics software ESPResSo ("Extensible
Simulation Package for the Research on Soft Matter Systems").
Simulation Package for Research on Soft Matter Systems").
ESPResSo is a highly versatile software package for performing and
analyzing scientific Molecular Dynamics many-particle simulations of
......@@ -70,7 +70,7 @@ relevant publications, as indicated in the ESPResSo User's Guide.
## License
Copyright (C) 2010-2018 The ESPResSo project
Copyright (C) 2010-2019 The ESPResSo project
Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010
Max-Planck-Institute for Polymer Research, Theory Group
......
status = [
"ICP GitLab CI"
]
timeout-sec = 14400
timeout_sec = 14400
required_approvals = 1
include(FindPackageHandleStandardArgs)
find_program(SPHINX_EXECUTABLE NAMES sphinx-build sphinx-build-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}
HINTS
$ENV{SPHINX_DIR}
PATHS /opt/local/ /usr/local/ $ENV{HOME}/Library/Python/2.7/
PATH_SUFFIXES bin
DOC "Sphinx documentation generator."
)
find_program(SPHINX_API_DOC_EXE NAMES sphinx-apidoc sphinx-apidoc-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}
HINTS
PATH_SUFFIXES bin
PATHS /opt/local/ /usr/local/ $ENV{HOME}/Library/Python/2.7/
DOC "Sphinx api-doc executable."
)
find_program(SPHINX_EXECUTABLE
NAMES sphinx-build
sphinx-build-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}
HINTS $ENV{SPHINX_DIR}
PATHS /opt/local/ /usr/local/ $ENV{HOME}/Library/Python/2.7/
PATH_SUFFIXES bin
DOC "Sphinx documentation generator.")
find_program(SPHINX_API_DOC_EXE
NAMES sphinx-apidoc
sphinx-apidoc-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}
HINTS
PATH_SUFFIXES bin
PATHS /opt/local/ /usr/local/ $ENV{HOME}/Library/Python/2.7/
DOC "Sphinx api-doc executable.")
if(Sphinx_FIND_VERSION)
execute_process(COMMAND "${SPHINX_EXECUTABLE}" --version
OUTPUT_VARIABLE QUERY_VERSION_OUT
ERROR_VARIABLE QUERY_VERSION_ERR
RESULT_VARIABLE QUERY_VERSION_RESULT)
# Sphinx switched at some point from returning ther version
# on stdout to printing it at stderr. Since we do not know
# ther version yet, we use stdout if it matches a version
# regex, or stderr otherwise.
OUTPUT_VARIABLE QUERY_VERSION_OUT
ERROR_VARIABLE QUERY_VERSION_ERR
RESULT_VARIABLE QUERY_VERSION_RESULT)
# Sphinx switched at some point from returning ther version on stdout to
# printing it at stderr. Since we do not know ther version yet, we use stdout
# if it matches a version regex, or stderr otherwise.
if(QUERY_VERSION_OUT MATCHES "[0-9.]+")
set(QUERY_VERSION "${QUERY_VERSION_OUT}")
else()
......@@ -32,13 +32,26 @@ if(Sphinx_FIND_VERSION)
endif()
if(NOT QUERY_VERSION_RESULT)
string(REGEX MATCH "[0-9.]+" AVAILABLE_VERSION "${QUERY_VERSION}")
endif( )
endif( )
find_package_handle_standard_args(Sphinx
REQUIRED_VARS SPHINX_EXECUTABLE SPHINX_API_DOC_EXE
VERSION_VAR AVAILABLE_VERSION
)
string(REGEX MATCH
"[0-9.]+"
SPHINX_VERSION
"${QUERY_VERSION}")
endif()
set(SPHINX_VERSION_COMPATIBLE TRUE)
# Blacklist broken version
if("${SPHINX_VERSION}" VERSION_EQUAL "2.1.0")
message(WARNING "Sphinx version 2.1.0 is not compatible.")
set(SPHINX_VERSION_COMPATIBLE FALSE)
endif()
endif()
find_package_handle_standard_args(Sphinx
REQUIRED_VARS
SPHINX_EXECUTABLE
SPHINX_API_DOC_EXE
SPHINX_VERSION_COMPATIBLE
VERSION_VAR
SPHINX_VERSION)
mark_as_advanced(SPHINX_EXECUTABLE)
......@@ -3,6 +3,8 @@
#cmakedefine CUDA
#cmakedefine HIP
#cmakedefine FFTW
#cmakedefine H5MD
......
if(EXISTS ${MPIEXEC})
# OpenMPI 3.0 and higher checks the number of processes against the number of CPUs
execute_process(COMMAND ${MPIEXEC} --version RESULT_VARIABLE mpi_version_result OUTPUT_VARIABLE mpi_version_output ERROR_VARIABLE mpi_version_output)
if (mpi_version_result EQUAL 0 AND mpi_version_output MATCHES "\\(Open(RTE| MPI)\\) ([3-9]\\.|1[0-9])")
set(MPIEXEC_OVERSUBSCRIBE "-oversubscribe")
else()
set(MPIEXEC_OVERSUBSCRIBE "")
endif()
endif()
# unit_test function
function(UNIT_TEST)
cmake_parse_arguments(TEST "" "NAME;NUM_PROC" "SRC;DEPENDS" ${ARGN})
......@@ -31,13 +41,7 @@ function(UNIT_TEST)
endif()
endif()
# OpenMPI 3.0 and higher checks the number of processes against the number of CPUs
execute_process(COMMAND ${MPIEXEC} --version RESULT_VARIABLE mpi_version_result OUTPUT_VARIABLE mpi_version_output ERROR_VARIABLE mpi_version_output)
if (mpi_version_result EQUAL 0 AND mpi_version_output MATCHES "\\(Open(RTE| MPI)\\) ([3-9]\\.|1[0-9])")
add_test(${TEST_NAME} ${MPIEXEC} -oversubscribe ${MPIEXEC_NUMPROC_FLAG} ${TEST_NUM_PROC} ${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME})
else()
add_test(${TEST_NAME} ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} ${TEST_NUM_PROC} ${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME})
endif()
add_test(${TEST_NAME} ${MPIEXEC} ${MPIEXEC_OVERSUBSCRIBE} ${MPIEXEC_NUMPROC_FLAG} ${TEST_NUM_PROC} ${MPIEXEC_PREFLAGS} ${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME} ${MPIEXEC_POSTFLAGS})
else( )
add_test(${TEST_NAME} ${TEST_NAME})
endif( )
......
find_package(Git)
if(GIT_FOUND)
execute_process(
COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_BRANCH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(GIT_EXECUTABLE)
# Get the name of the working branch
execute_process(
COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
OUTPUT_VARIABLE GIT_BRANCH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# Get the latest abbreviated commit hash of the working branch
execute_process(
COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_COMMIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
# Get the latest abbreviated commit hash of the working branch
execute_process(
COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
OUTPUT_VARIABLE GIT_COMMIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
execute_process(
COMMAND "${GIT_EXECUTABLE}" diff-index --quiet HEAD --
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
RESULT_VARIABLE res
OUTPUT_VARIABLE out
OUTPUT_STRIP_TRAILING_WHITESPACE
# Get branch status
execute_process(
COMMAND ${GIT_EXECUTABLE} diff-index --quiet HEAD --
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
RESULT_VARIABLE GIT_DIFF_INDEX_RESULT
OUTPUT_VARIABLE GIT_DIFF_INDEX_OUTPUT
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(GIT_DIFF_INDEX_RESULT EQUAL 0)
set(GIT_STATE "CLEAN")
else()
set(GIT_STATE "DIRTY")
endif()
endif(GIT_EXECUTABLE)
if(res EQUAL 0)
set(GIT_STATE "CLEAN")
else()
set(GIT_STATE "DIRTY")
endif()
endif()
configure_file(${PROJECT_SOURCE_DIR}/src/config/version.hpp.in version.hpp.tmp)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different version.hpp.tmp version.hpp)