diff --git a/espresso-array-bounds.patch b/espresso-array-bounds.patch new file mode 100644 index 0000000..7b29fce --- /dev/null +++ b/espresso-array-bounds.patch @@ -0,0 +1,19 @@ +diff --git a/src/core/p3m/interpolation.hpp b/src/core/p3m/interpolation.hpp +index a25b0d8f66..0573648938 100644 +--- a/src/core/p3m/interpolation.hpp ++++ b/src/core/p3m/interpolation.hpp +@@ -109,10 +109,10 @@ class p3m_interpolation_cache { + InterpolationWeights ret; + ret.ind = ca_fmp[i]; + +- auto const offset = ca_frac.data() + 3 * i * m_cao; +- boost::copy(make_const_span(offset + 0 * m_cao, m_cao), ret.w_x.begin()); +- boost::copy(make_const_span(offset + 1 * m_cao, m_cao), ret.w_y.begin()); +- boost::copy(make_const_span(offset + 2 * m_cao, m_cao), ret.w_z.begin()); ++ auto const offset = ca_frac.data() + 3 * i * cao; ++ boost::copy(make_const_span(offset + 0 * cao, cao), ret.w_x.begin()); ++ boost::copy(make_const_span(offset + 1 * cao, cao), ret.w_y.begin()); ++ boost::copy(make_const_span(offset + 2 * cao, cao), ret.w_z.begin()); + + return ret; + } diff --git a/espresso-tracers.patch b/espresso-tracers.patch new file mode 100644 index 0000000..11560ac --- /dev/null +++ b/espresso-tracers.patch @@ -0,0 +1,13 @@ +diff --git a/src/core/virtual_sites/lb_inertialess_tracers.cpp b/src/core/virtual_sites/lb_inertialess_tracers.cpp +index 5aae5af66c..b87b2d4232 100644 +--- a/src/core/virtual_sites/lb_inertialess_tracers.cpp ++++ b/src/core/virtual_sites/lb_inertialess_tracers.cpp +@@ -92,7 +92,7 @@ void IBM_UpdateParticlePositions(ParticleRange const &particles, + // Euler integrator + for (auto &p : particles) { + if (p.is_virtual()) { +- for (int axis = 0; axis < 2; axis++) { ++ for (int axis = 0; axis < 3; axis++) { + #ifdef EXTERNAL_FORCES + if (not p.is_fixed_along(axis)) + #endif diff --git a/espresso.spec b/espresso.spec index 71f66f1..844c40c 100644 --- a/espresso.spec +++ b/espresso.spec @@ -3,7 +3,7 @@ Name: espresso Version: 4.2.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Extensible Simulation Package for Research on Soft matter # segfault on s390x: https://github.com/espressomd/espresso/issues/3753 # segfault on armv7hl: https://src.fedoraproject.org/rpms/espresso/pull-request/4 @@ -15,6 +15,12 @@ Source0: https://github.com/%{name}md/%{name}/releases/download/%{version # fix for API change in setuptools # https://github.com/espressomd/espresso/pull/4709 Patch0: %{name}-setuptools.patch +# fix for LB inertialess tracers integration bug +# https://github.com/espressomd/espresso/pull/4714 +Patch1: %{name}-tracers.patch +# fix for GCC compiler warning -Warray-bounds +# https://github.com/espressomd/espresso/pull/4715 +Patch2: %{name}-array-bounds.patch BuildRequires: gcc-c++ BuildRequires: cmake3 >= 3.16 @@ -106,6 +112,8 @@ This package contains %{name} compiled against MPICH2. %prep %setup -q -n %{name} %patch 0 -p1 +%patch 1 -p1 +%patch 2 -p1 %build %global defopts \\\ @@ -163,6 +171,9 @@ done %{python3_sitearch}/mpich/%{name}md/ %changelog +* Wed Apr 26 2023 Jean-Noël Grad - 4.2.1-2 +- Fix LB inertialess tracers bug, fix compiler warnings + * Tue Apr 18 2023 Jean-Noël Grad - 4.2.1-1 - Version bump to v4.2.1