Skip to content

Commit

Permalink
Stokesian Dynamics (#3790)
Browse files Browse the repository at this point in the history
Add a Stokesian Dynamics integrator with thermalization.
  • Loading branch information
kodiakhq[bot] authored Jul 17, 2020
2 parents 10f9a04 + b582e31 commit 95a9464
Show file tree
Hide file tree
Showing 41 changed files with 1,818 additions and 72 deletions.
41 changes: 25 additions & 16 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ default:
CC: 'gcc-9'
CXX: 'g++-9'
script:
- export with_cuda=false myconfig=default with_coverage=true with_scafacos=true
- export with_cuda=false myconfig=default with_coverage=true
- export with_scafacos=true with_stokesian_dynamics=true
- bash maintainer/CI/build_cmake.sh
tags:
- docker
Expand All @@ -90,7 +91,8 @@ maxset:
CC: 'gcc-9'
CXX: 'g++-9'
script:
- export with_cuda=false myconfig=maxset with_coverage=true with_scafacos=true
- export with_cuda=false myconfig=maxset with_coverage=true
- export with_scafacos=true with_stokesian_dynamics=true
- bash maintainer/CI/build_cmake.sh
tags:
- docker
Expand Down Expand Up @@ -125,20 +127,20 @@ ubuntu:wo-dependencies:
debian:10:
<<: *global_job_definition
stage: build
image: docker.pkg.github.com/espressomd/docker/debian:446ff604bbfa63f30ddb462697fa0d0dc2630460
image: docker.pkg.github.com/espressomd/docker/debian:d496478230db4e5c286680e3bdc1621af1fccffc
script:
- export with_cuda=false myconfig=maxset make_check_python=false
- export with_cuda=false myconfig=maxset make_check_python=false with_stokesian_dynamics=true
- bash maintainer/CI/build_cmake.sh
tags:
- docker
- linux

opensuse:15.1:
opensuse:15.2:
<<: *global_job_definition
stage: build
image: docker.pkg.github.com/espressomd/docker/opensuse:446ff604bbfa63f30ddb462697fa0d0dc2630460
image: docker.pkg.github.com/espressomd/docker/opensuse:d496478230db4e5c286680e3bdc1621af1fccffc
script:
- export with_cuda=false myconfig=maxset make_check_python=false
- export with_cuda=false myconfig=maxset make_check_python=false with_stokesian_dynamics=true
- bash maintainer/CI/build_cmake.sh
tags:
- docker
Expand All @@ -149,7 +151,7 @@ centos:7:
stage: build
image: docker.pkg.github.com/espressomd/docker/centos:446ff604bbfa63f30ddb462697fa0d0dc2630460
script:
- export with_cuda=false myconfig=maxset make_check_python=true
- export with_cuda=false myconfig=maxset make_check_python=true with_stokesian_dynamics=true
- bash maintainer/CI/build_cmake.sh
tags:
- docker
Expand All @@ -160,7 +162,7 @@ fedora:32:
stage: build
image: docker.pkg.github.com/espressomd/docker/fedora:fc7628d32de0fce605976ba9edebe7eff186e618
script:
- export with_cuda=false myconfig=maxset make_check_python=false
- export with_cuda=false myconfig=maxset make_check_python=false with_stokesian_dynamics=true
- bash maintainer/CI/build_cmake.sh
tags:
- docker
Expand All @@ -187,8 +189,9 @@ clang-sanitizer:
CC: 'clang-9'
CXX: 'clang++-9'
script:
- export myconfig=maxset with_cuda=true with_cuda_compiler=clang with_coverage=false with_scafacos=true
- export myconfig=maxset with_cuda=true with_cuda_compiler=clang with_coverage=false
- export with_static_analysis=true test_timeout=900 with_asan=true with_ubsan=true
- export with_scafacos=true with_stokesian_dynamics=true
- bash maintainer/CI/build_cmake.sh
timeout: 2h
tags:
Expand All @@ -203,7 +206,8 @@ cuda10-maxset:
CC: 'gcc-8'
CXX: 'g++-8'
script:
- export myconfig=maxset with_cuda=true with_coverage=false with_scafacos=true test_timeout=900 srcdir=${CI_PROJECT_DIR}
- export myconfig=maxset with_cuda=true with_coverage=false test_timeout=900 srcdir=${CI_PROJECT_DIR}
- export with_scafacos=true with_stokesian_dynamics=true
- bash maintainer/CI/build_cmake.sh
artifacts:
paths:
Expand All @@ -217,13 +221,14 @@ cuda10-maxset:
cuda9-maxset:
<<: *global_job_definition
stage: build
image: docker.pkg.github.com/espressomd/docker/ubuntu-18.04:06b6216c7aa3555bcf28c90734dbb84e7285c96f
image: docker.pkg.github.com/espressomd/docker/ubuntu-18.04:d496478230db4e5c286680e3bdc1621af1fccffc
variables:
CC: 'gcc-6'
CXX: 'g++-6'
GCOV: 'gcov-6'
script:
- export myconfig=maxset with_cuda=true with_coverage=true with_scafacos=true test_timeout=900 srcdir=${CI_PROJECT_DIR}
- export myconfig=maxset with_cuda=true with_coverage=true test_timeout=900 srcdir=${CI_PROJECT_DIR}
- export with_scafacos=true with_stokesian_dynamics=true
- bash maintainer/CI/build_cmake.sh
artifacts:
paths:
Expand Down Expand Up @@ -307,7 +312,8 @@ installation:
CC: 'gcc-8'
CXX: 'g++-8'
script:
- export myconfig=maxset with_cuda=true with_coverage=false with_scafacos=true make_check_unit_tests=false make_check_python=false
- export myconfig=maxset with_cuda=true with_coverage=false make_check_unit_tests=false make_check_python=false
- export with_scafacos=true with_stokesian_dynamics=true
- export srcdir=${CI_PROJECT_DIR} build_type=Release
- bash maintainer/CI/build_cmake.sh
- cd build
Expand Down Expand Up @@ -335,7 +341,8 @@ empty:
CC: 'clang-9'
CXX: 'clang++-9'
script:
- export myconfig=empty with_cuda=true with_cuda_compiler=clang with_static_analysis=true with_scafacos=false
- export myconfig=empty with_cuda=true with_cuda_compiler=clang with_static_analysis=true
- export with_scafacos=false with_stokesian_dynamics=false
- bash maintainer/CI/build_cmake.sh
tags:
- docker
Expand All @@ -347,9 +354,10 @@ empty:
rocm-maxset:
<<: *global_job_definition
stage: build
image: docker.pkg.github.com/espressomd/docker/rocm:06b6216c7aa3555bcf28c90734dbb84e7285c96f
image: docker.pkg.github.com/espressomd/docker/rocm:d496478230db4e5c286680e3bdc1621af1fccffc
script:
- export myconfig=maxset with_cuda=true with_cuda_compiler=hip
- export with_stokesian_dynamics=false
- bash maintainer/CI/build_cmake.sh
tags:
- amdgpu
Expand All @@ -360,6 +368,7 @@ rocm:latest:
image: docker.pkg.github.com/espressomd/docker/rocm:latest_base
script:
- export myconfig=maxset with_cuda=true with_cuda_compiler=hip
- export with_stokesian_dynamics=false
- bash maintainer/CI/build_cmake.sh
tags:
- amdgpu
Expand Down
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Ashreya Jayaram
Ben Reynwar (formerly: Reynolds)
Bogdan Tanygin
Cameron Stewart
Carl Georg Biermann
Christian Haege
Christoph Lohrmann
Christoph Schneider
Expand Down
57 changes: 57 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ option(WITH_CUDA "Build with GPU support" OFF)
option_if_available(WITH_HDF5 "Build with HDF5 support" ON)
option(WITH_TESTS "Enable tests" ON)
option_if_available(WITH_SCAFACOS "Build with ScaFaCoS support" OFF)
option_if_available(WITH_STOKESIAN_DYNAMICS "Build with Stokesian Dynamics" ON)
option(WITH_BENCHMARKS "Enable benchmarks" OFF)
option(WITH_VALGRIND_INSTRUMENTATION
"Build with valgrind instrumentation markers" OFF)
Expand Down Expand Up @@ -253,6 +254,62 @@ if(WITH_GSL)
endif(GSL_FOUND)
endif(WITH_GSL)

find_package(BLAS)
if(BLAS_FOUND)
set(BLAS 1)
endif()
find_package(LAPACK)
if(LAPACK_FOUND)
set(LAPACK 1)
endif()

if(WITH_STOKESIAN_DYNAMICS)
if(BLAS AND LAPACK)
set(STOKESIAN_DYNAMICS 1)
endif()
if(CUDA)
set(STOKESIAN_DYNAMICS_GPU 1)
if(HIP)
find_gpu_library(VARNAME CUDA_CUBLAS_LIBRARIES NAMES rocblas)
find_gpu_library(VARNAME CUDA_cusolver_LIBRARY NAMES rocsolver)
else()
if(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0)
# when importing package cublas, CMake versions older than 3.12.2 will
# look for a library cublas_device that no longer exists in CUDA 10
cmake_minimum_required(VERSION 3.12.2)
endif()
find_gpu_library(VARNAME CUDA_CUBLAS_LIBRARIES NAMES cublas)
find_gpu_library(VARNAME CUDA_cusolver_LIBRARY NAMES cusolver)
endif()
endif(CUDA)
if(NOT (STOKESIAN_DYNAMICS
OR (STOKESIAN_DYNAMICS_GPU AND CUDA_CUBLAS_LIBRARIES
AND CUDA_cusolver_LIBRARY))
AND NOT WITH_STOKESIAN_DYNAMICS_IS_DEFAULT_VALUE)
message(
FATAL_ERROR
"Optional feature Stokesian Dynamics explicitly requested, but dependencies not found."
)
endif()
endif(WITH_STOKESIAN_DYNAMICS)

if(WITH_STOKESIAN_DYNAMICS)
set(CMAKE_INSTALL_LIBDIR
"${CMAKE_INSTALL_PREFIX}/${PYTHON_INSTDIR}/espressomd")
cmake_minimum_required(VERSION 3.11)
include(FetchContent)
FetchContent_Declare(
stokesian_dynamics
GIT_REPOSITORY https://github.com/hmenke/espresso-stokesian-dynamics.git
GIT_TAG 860ceac208175)
FetchContent_GetProperties(stokesian_dynamics)
if(NOT stokesian_dynamics_POPULATED)
FetchContent_Populate(stokesian_dynamics)
add_subdirectory(${stokesian_dynamics_SOURCE_DIR}
${stokesian_dynamics_BINARY_DIR})
endif()
endif(WITH_STOKESIAN_DYNAMICS)

if(WITH_VALGRIND_INSTRUMENTATION)
find_package(PkgConfig)
pkg_check_modules(VALGRIND valgrind)
Expand Down
8 changes: 8 additions & 0 deletions cmake/cmake_config.cmakein
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@

#cmakedefine GSL

#cmakedefine BLAS

#cmakedefine LAPACK

#cmakedefine STOKESIAN_DYNAMICS

#cmakedefine STOKESIAN_DYNAMICS_GPU

#cmakedefine VALGRIND_INSTRUMENTATION

#define PACKAGE_NAME "${PROJECT_NAME}"
Expand Down
Loading

0 comments on commit 95a9464

Please sign in to comment.