Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.2.2rc #4751

Merged
merged 31 commits into from
May 22, 2024
Merged

4.2.2rc #4751

Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
f7800be
Update version number to 4.2-dev
jngrad May 26, 2023
093eef0
Fix CI reports (#4736)
kodiakhq[bot] May 24, 2023
61f52f1
Fix inertialess tracers (#4714)
kodiakhq[bot] Apr 26, 2023
b8b278f
Add support for recent compilers (#4715)
kodiakhq[bot] Apr 27, 2023
2d18b26
Improve support for C++20 builds (#4725)
kodiakhq[bot] May 12, 2023
f997677
Modernize python package version specifiers (#4709)
kodiakhq[bot] Apr 18, 2023
fd56cd2
Fix particle radius calculation in the visualizer (#4720)
kodiakhq[bot] May 10, 2023
a3547e2
Rewrite script interface object containers serialization (#4724)
kodiakhq[bot] May 12, 2023
72170bd
Improve benchmark scripts (#4753)
kodiakhq[bot] Jul 18, 2023
2711650
CI: Require Cython 0.29
jngrad Jul 18, 2023
5efbf55
Restore constraints event handling (#4778)
kodiakhq[bot] Aug 25, 2023
2607a7e
Fix energy/pressure observables (#4788)
kodiakhq[bot] Sep 19, 2023
355e4c7
Update installation instructions (#4790)
kodiakhq[bot] Sep 19, 2023
20f929c
CMake: Fix deprecation warnings in CMake 3.27.5
jngrad Sep 19, 2023
e6d6844
Fix OIF force summary function (#4813)
kodiakhq[bot] Nov 6, 2023
bcc8787
LB+particles: guard against missed coupling due to round-off error (#…
kodiakhq[bot] Dec 5, 2023
3a79e65
Remove kinetic energy contribution from virtual sites (#4839)
kodiakhq[bot] Dec 14, 2023
ad3ac5d
Prevent propagation of angular velocities with NpT (#4843)
kodiakhq[bot] Dec 18, 2023
7525b50
Prevent Brownian dynamics coupling of virtual sites (#4295)
jngrad Jan 2, 2024
d09de49
Address API change in Python 3.12 unittest module (#4852)
kodiakhq[bot] Jan 30, 2024
880d2f0
Remove MPI static globals (#4858)
kodiakhq[bot] Feb 29, 2024
aecc572
CI: Disable ASAN checks
jngrad Mar 18, 2024
05df978
Improve user guide chapters on observables and constraints (#4898)
kodiakhq[bot] Apr 5, 2024
73dad41
Disable box length reset when particles are present (#4901)
kodiakhq[bot] Apr 9, 2024
bd08dbb
tutorials: Fix typos
jngrad Apr 10, 2024
7cced5b
core: Remove unused code
jngrad Apr 11, 2024
9e81648
core: Update GPU name string size
jngrad Apr 11, 2024
89737a8
Propagate exceptions during type conversion (#4911)
jngrad Apr 25, 2024
792f6b8
Document Python environments (#4922)
kodiakhq[bot] May 17, 2024
59b6064
Update Python requirements (#4924)
kodiakhq[bot] May 21, 2024
bb71ac9
Update CI runners and installation docs
jngrad May 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update CI runners and installation docs
jngrad committed May 22, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit bb71ac974ddb5c42eb2ba6890590b2f67ce03f82
3 changes: 2 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
@@ -10,6 +10,8 @@ Checks: |
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-macro-parentheses,
-bugprone-reserved-identifier,
-bugprone-switch-missing-default-case,
-bugprone-unchecked-optional-access,
clang-analyzer-alpha.*,
modernize-deprecated-headers,
modernize-make-shared,
@@ -41,7 +43,6 @@ Checks: |
readability-function-size'
WarningsAsErrors: '*,-clang-analyzer-core.StackAddrEscapeBase,-clang-analyzer-optin.mpi.MPI-Checker'
HeaderFilterRegex: '.*'
AnalyzeTemporaryDtors: false
FormatStyle: none
User: espresso
CheckOptions:
15 changes: 3 additions & 12 deletions .github/actions/build_and_check/action.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,15 @@
name: 'Build and check'
description: 'Build espresso and run checks'
inputs:
asan: # id of input
description: 'Whether to build with address sanitizer'
required: true
default: 'false'
ubsan:
description: 'Whether to build with undefined behavior sanitizer'
required: true
default: 'false'
description: 'Build ESPResSo and run checks'
runs:
using: "composite"
steps:
- run: |
brew install boost boost-mpi fftw
brew install hdf5-mpi
pip3 install -c requirements.txt numpy cython h5py scipy
pip3 install -c requirements.txt "cython<3.0" numpy scipy h5py packaging
shell: bash
- run: |
export myconfig=maxset with_cuda=false test_timeout=800 with_asan=${{ inputs.asan }} with_ubsan=${{ inputs.ubsan }} check_skip_long=true
export myconfig=maxset with_cuda=false with_gsl=false test_timeout=800 check_skip_long=true
bash maintainer/CI/build_cmake.sh
shell: bash
# This is a workaround for the unfortunate interaction of MacOS and OpenMPI 4
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ jobs:
- name: Install pandoc
uses: r-lib/actions/setup-pandoc@v2
- name: Setup SSH agent
uses: webfactory/ssh-agent@v0.7.0
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.GH_PAGES_SSH_PRIVATE_KEY }}
- name: Checkout
51 changes: 9 additions & 42 deletions .github/workflows/push_pull.yml
Original file line number Diff line number Diff line change
@@ -1,57 +1,24 @@
name: run tests on mac
name: run tests on macOS

on:
push:
pull_request:
schedule:
- cron: '0 3 * * *'

permissions:
contents: read # to fetch code (actions/checkout)

jobs:
regular_check:
runs-on: macos-12
if: github.event_name != 'schedule'
macos:
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@main
- name: Setup Python environment
uses: actions/setup-python@v4.3.1
uses: actions/setup-python@v5.1.0
with:
python-version: '3.8'
- name: Check without sanitizer
python-version: '3.9'
- name: Build and check
uses: ./.github/actions/build_and_check
with:
asan: false
ubsan: false

sanitizer_check:
permissions:
contents: read # to fetch code (actions/checkout)
issues: write # to create an issue

runs-on: macos-12
if: (github.event_name == 'schedule' && github.repository == 'espressomd/espresso')
steps:
- name: Checkout
uses: actions/checkout@main
- name: Setup Python environment
uses: actions/[email protected]
with:
python-version: '3.8'
- name: Check with sanitizer
uses: ./.github/actions/build_and_check
with:
asan: true
ubsan: true
- name: Setting job link variable
if: ${{ failure() }}
run: |
echo "job_link=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}" >> $GITHUB_ENV
- uses: alialaa/issue-action@v1
if: ${{ failure() }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: Scheduled CI job has failed
body: ${{ env.job_link }}
env:
build_procs: 4
check_procs: 4
57 changes: 57 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -166,6 +166,21 @@ debian:10:
- espresso
- no-cuda

debian:12:
<<: *global_job_definition
stage: build
image: ghcr.io/espressomd/docker/debian:f7f8ef2c0ca93c67aa16b9f91785492fb04ecc1b
variables:
with_cuda: 'false'
myconfig: 'maxset'
make_check_python: 'false'
with_stokesian_dynamics: 'true'
script:
- bash maintainer/CI/build_cmake.sh
tags:
- espresso
- no-cuda

fedora:36:
<<: *global_job_definition
stage: build
@@ -181,6 +196,23 @@ fedora:36:
- espresso
- no-cuda

fedora:40:
<<: *global_job_definition
stage: build
image: ghcr.io/espressomd/docker/fedora:f7f8ef2c0ca93c67aa16b9f91785492fb04ecc1b
variables:
with_cuda: 'false'
with_gsl: 'false'
myconfig: 'maxset'
make_check_python: 'true'
with_stokesian_dynamics: 'true'
cmake_params: '-D CMAKE_INCLUDE_PATH=/usr/include/mpich-x86_64 -D CMAKE_PREFIX_PATH=/usr/lib64/mpich/lib/'
script:
- bash maintainer/CI/build_cmake.sh
tags:
- espresso
- no-cuda

### Builds with CUDA

clang-sanitizer:
@@ -227,6 +259,28 @@ fast_math:
- cuda
when: manual

cuda12-maxset-ubuntu24.04:
<<: *global_job_definition
stage: build
image: ghcr.io/espressomd/docker/ubuntu:f7f8ef2c0ca93c67aa16b9f91785492fb04ecc1b
variables:
CC: 'gcc-12'
CXX: 'g++-12'
GCOV: 'gcov-12'
myconfig: 'maxset'
with_cuda: 'true'
with_coverage: 'false'
with_coverage_python: 'false'
check_skip_long: 'false'
with_scafacos: 'true'
with_stokesian_dynamics: 'true'
script:
- bash maintainer/CI/build_cmake.sh
tags:
- espresso
- cuda
- numa

cuda11-maxset-ubuntu20.04:
<<: *global_job_definition
stage: build
@@ -238,6 +292,7 @@ cuda11-maxset-ubuntu20.04:
myconfig: 'maxset'
with_cuda: 'true'
with_coverage: 'true'
with_coverage_python: 'true'
check_skip_long: 'true'
with_scafacos: 'true'
with_stokesian_dynamics: 'true'
@@ -259,6 +314,7 @@ cuda11-maxset-ubuntu22.04:
myconfig: 'maxset'
with_cuda: 'true'
with_coverage: 'true'
with_coverage_python: 'true'
check_skip_long: 'true'
with_scafacos: 'true'
with_stokesian_dynamics: 'true'
@@ -489,6 +545,7 @@ run_tutorials:
paths:
- build/doc/tutorials
expire_in: 1 week
timeout: 2h
tags:
- espresso
- cuda
15 changes: 10 additions & 5 deletions doc/sphinx/installation.rst
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ performance of the code. Therefore it is not possible to build a single
binary that can satisfy all needs. For performance reasons a user
should always activate only those features that are actually needed.
This means, however, that learning how to compile is a necessary evil.
The build system of |es| uses CMake [4]_ to compile
The build system of |es| uses CMake to compile
software easily on a wide range of platforms.

.. _Requirements:
@@ -39,7 +39,7 @@ are required to be able to compile and use |es|:
.. glossary::

CMake
The build system is based on CMake.
The build system is based on CMake version 3 or later [4]_.

C++ compiler
The C++ core of |es| needs to be built by a C++14-capable compiler.
@@ -52,6 +52,11 @@ are required to be able to compile and use |es|:
For some algorithms like P\ :math:`^3`\ M, |es| needs the FFTW library
version 3 or later [5]_ for Fourier transforms, including header files.

CUDA
For some algorithms like P\ :math:`^3`\ M,
|es| provides GPU-accelerated implementations for NVIDIA GPUs.
We strongly recommend CUDA 12.0 or later [6]_.

MPI
An MPI library that implements the MPI standard version 1.2 is required
to run simulations in parallel. |es| is currently tested against
@@ -247,11 +252,11 @@ Installing requirements on Windows via WSL

To run |es| on Windows, use the Linux subsystem. For that you need to

* follow `these instructions <https://docs.microsoft.com/en-us/windows/wsl/install-win10>`__ to install Ubuntu
* start Ubuntu (or open an Ubuntu tab in `Windows Terminal <https://www.microsoft.com/en-us/p/windows-terminal/9n0dx20hk701>`__)
* follow `these instructions <https://learn.microsoft.com/en-us/windows/wsl/install>`__ to install Ubuntu
* start Ubuntu (or open an Ubuntu tab in `Windows Terminal <https://apps.microsoft.com/detail/9n0dx20hk701?hl=en-us&gl=US>`__)
* execute ``sudo apt update`` to prepare the installation of dependencies
* optional step: If you have a NVIDIA graphics card available and want to make
use of |es|'s GPU acceleration, follow `these instructions <https://docs.nvidia.com/cuda/wsl-user-guide/index.html#ch03a-setting-up-cuda>`__
use of |es|'s GPU acceleration, follow `these instructions <https://docs.nvidia.com/cuda/wsl-user-guide/index.html>`__
to set up CUDA.
* follow the instructions for :ref:`Installing requirements on Ubuntu Linux`

3 changes: 2 additions & 1 deletion doc/tutorials/error_analysis/error_analysis_part2.ipynb
Original file line number Diff line number Diff line change
@@ -205,7 +205,8 @@
"plt.plot(autocov)\n",
"plt.xlabel(\"lag time $j$\")\n",
"plt.ylabel(r\"$\\hat{K}^{XX}_j$\")\n",
"plt.show()"
"plt.show()\n",
"```"
]
},
{
2 changes: 1 addition & 1 deletion src/config/config.hpp
Original file line number Diff line number Diff line change
@@ -54,7 +54,7 @@
#endif

/** Whether to use the approximation of Abramowitz/Stegun @cite abramowitz65a
* @ref AS_erfc_part() for \f$\exp(d^2) \mathrm{erfc}(d)\f$,
* @ref Utils::AS_erfc_part() for \f$\exp(d^2) \mathrm{erfc}(d)\f$,
* or the C function <tt>std::erfc()</tt> in P3M and Ewald summation.
*/
#ifndef USE_ERFC_APPROXIMATION
5 changes: 1 addition & 4 deletions src/core/statistics.cpp
Original file line number Diff line number Diff line change
@@ -133,18 +133,15 @@ Utils::Vector3d angularmomentum(PartCfg &partCfg, int type) {
}

void momentofinertiamatrix(PartCfg &partCfg, int type, double *MofImatrix) {
int i, count;
double massi;
Utils::Vector3d p1{};
count = 0;

for (i = 0; i < 9; i++)
for (unsigned int i = 0; i < 9; i++)
MofImatrix[i] = 0.;

auto const com = centerofmass(partCfg, type);
for (auto const &p : partCfg) {
if (type == p.type() and (not p.is_virtual())) {
count++;
p1 = p.pos() - com;
massi = p.mass();
MofImatrix[0] += massi * (p1[1] * p1[1] + p1[2] * p1[2]);
11 changes: 7 additions & 4 deletions src/python/espressomd/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -73,6 +73,10 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL
Espresso_pyx_flags
INTERFACE -Wno-pedantic -Wno-\#warnings -Wno-sometimes-uninitialized
-Wno-unused-variable -Wno-deprecated-declarations)
if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
target_compile_options(Espresso_pyx_flags
INTERFACE -Wno-missing-field-initializers)
endif()
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
target_compile_options(Espresso_pyx_flags INTERFACE -wd1224)
else()
@@ -105,10 +109,9 @@ foreach(cython_file ${cython_SRC})
add_custom_command(
OUTPUT ${outputpath}
COMMAND
${CYTHON_EXECUTABLE} $<$<BOOL:${WARNINGS_ARE_ERRORS}>:--warning-errors>
-3 --cplus --directive embedsignature=True --directive binding=True -I
${CMAKE_CURRENT_SOURCE_DIR} -I ${CMAKE_CURRENT_BINARY_DIR}
${cython_file} -o ${outputpath}
${CYTHON_EXECUTABLE} -3 --cplus --directive embedsignature=True
--directive binding=True -I ${CMAKE_CURRENT_SOURCE_DIR} -I
${CMAKE_CURRENT_BINARY_DIR} ${cython_file} -o ${outputpath}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/..
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/myconfig.pxi ${cython_file}
${cython_HEADER})
2 changes: 2 additions & 0 deletions testsuite/python/sigint_child.py
Original file line number Diff line number Diff line change
@@ -19,6 +19,8 @@
import numpy as np
import espressomd

np.random.seed(42)

system = espressomd.System(box_l=[100, 100, 100])
system.time_step = 0.01
system.cell_system.skin = 0.1