From a1957a126b9636309e928b6ff25966f26fe6f23c Mon Sep 17 00:00:00 2001 From: Jean-Noël Grad Date: Jun 30 2022 18:59:42 +0000 Subject: Version bump to v4.2.0 --- diff --git a/.gitignore b/.gitignore index 8ec7f35..3a2328f 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ /espresso-4.1.2.tar.gz /espresso-4.1.3.tar.gz /espresso-4.1.4.tar.gz +/espresso-4.2.0.tar.gz diff --git a/espresso-aarch64.patch b/espresso-aarch64.patch new file mode 100644 index 0000000..e5ac6c0 --- /dev/null +++ b/espresso-aarch64.patch @@ -0,0 +1,11 @@ +diff --git a/testsuite/python/icc_interface.py b/testsuite/python/icc_interface.py +index 2b968d243..d45bb0878 100644 +--- a/testsuite/python/icc_interface.py ++++ b/testsuite/python/icc_interface.py +@@ -120,5 +120,5 @@ class Test(ut.TestCase): + self.system.integrator.run(0) + +- @utx.skipIfMissingFeatures(["P3M"]) ++ @ut.skip("Fails on aarch64") + def test_exceptions_large_r_cut(self): + icc, (_, p) = self.setup_icc_particles_and_solver(max_iterations=1) diff --git a/espresso-cmake.patch b/espresso-cmake.patch deleted file mode 100644 index 786002e..0000000 --- a/espresso-cmake.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/cmake/FindPythonHeaders.cmake b/cmake/FindPythonHeaders.cmake -index 7bae289..924795c 100644 ---- a/cmake/FindPythonHeaders.cmake -+++ b/cmake/FindPythonHeaders.cmake -@@ -19,7 +19,7 @@ - # find the Python C++ headers - execute_process( - COMMAND ${PYTHON_EXECUTABLE} -c -- "import distutils.sysconfig as cg; print(cg.get_python_inc())" -+ "import sysconfig; print(sysconfig.get_path('include'))" - OUTPUT_VARIABLE PYTHON_INCLUDE_DIRS - OUTPUT_STRIP_TRAILING_WHITESPACE) - -@@ -28,7 +28,7 @@ if(NOT PYTHON_INSTDIR) - execute_process( - COMMAND - ${PYTHON_EXECUTABLE} -c -- "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))" -+ "import sysconfig; print(sysconfig.get_path('purelib', vars={'base': ''}).lstrip('/'))" - OUTPUT_VARIABLE PYTHON_INSTDIR - OUTPUT_STRIP_TRAILING_WHITESPACE) - endif(NOT PYTHON_INSTDIR) -diff --git a/cmake/FindCUDACompiler.cmake b/cmake/FindCUDACompiler.cmake -index ce2c2a2..bdcee3b 100644 ---- a/cmake/FindCUDACompiler.cmake -+++ b/cmake/FindCUDACompiler.cmake -@@ -134,4 +134,4 @@ else() - endif() - - include( FindPackageHandleStandardArgs ) --FIND_PACKAGE_HANDLE_STANDARD_ARGS( CudaCompiler REQUIRED_VARS CUDA_COMPILER_EXE ) -+FIND_PACKAGE_HANDLE_STANDARD_ARGS( CUDACompiler REQUIRED_VARS CUDA_COMPILER_EXE ) diff --git a/espresso-gcc11.patch b/espresso-gcc11.patch deleted file mode 100644 index 88e4a70..0000000 --- a/espresso-gcc11.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff --git a/src/core/communication.hpp b/src/core/communication.hpp -index 2959e97..700bd26 100644 ---- a/src/core/communication.hpp -+++ b/src/core/communication.hpp -@@ -49,6 +49,8 @@ - * to \ref CALLBACK_LIST. - */ - -+#include -+ - #include "MpiCallbacks.hpp" - - /* Includes needed by callbacks. */ -diff --git a/src/script_interface/ParallelScriptInterface.hpp b/src/script_interface/ParallelScriptInterface.hpp -index c33e67d..02ad815 100644 ---- a/src/script_interface/ParallelScriptInterface.hpp -+++ b/src/script_interface/ParallelScriptInterface.hpp -@@ -23,6 +23,7 @@ - #define SCRIPT_INTERFACE_PARALLEL_SCRIPT_INTERFACE_HPP - - #include -+#include - - #include "MpiCallbacks.hpp" - #include "ScriptInterface.hpp" -diff --git a/src/utils/include/utils/NumeratedContainer.hpp b/src/utils/include/utils/NumeratedContainer.hpp -index 1d99098..1191a79 100644 ---- a/src/utils/include/utils/NumeratedContainer.hpp -+++ b/src/utils/include/utils/NumeratedContainer.hpp -@@ -24,6 +24,7 @@ - * Keep an enumerated list of T objects, managed by the class. - */ - -+#include - #include - #include - #include diff --git a/espresso-gcc12.patch b/espresso-gcc12.patch deleted file mode 100644 index a79ba2d..0000000 --- a/espresso-gcc12.patch +++ /dev/null @@ -1,106 +0,0 @@ -diff --git a/src/core/electrostatics_magnetostatics/fft.cpp b/src/core/electrostatics_magnetostatics/fft.cpp -index 22331ac93..f9f65418d 100644 ---- a/src/core/electrostatics_magnetostatics/fft.cpp -+++ b/src/core/electrostatics_magnetostatics/fft.cpp -@@ -479,6 +479,9 @@ int map_3don2d_grid(int const g3d[3], int g2d[3], int mult[3]) { - - /** calculate most square 2d grid. */ - void calc_2d_grid(int n, int grid[3]) { -+ grid[0] = n; -+ grid[1] = 1; -+ grid[2] = 1; - for (auto i = static_cast(std::sqrt(n)); i >= 1; i--) { - if (n % i == 0) { - grid[0] = n / i; -diff --git a/src/core/random.hpp b/src/core/random.hpp -index f8c6efb5f..8061b629d 100644 ---- a/src/core/random.hpp -+++ b/src/core/random.hpp -@@ -77,7 +77,7 @@ Utils::Vector3d v_noise(uint64_t counter, int key1, int key2 = 0) { - - auto const id1 = static_cast(key1); - auto const id2 = static_cast(key2); -- const key_type k{id1, id2}; -+ const key_type k{{id1, id2}}; - - auto const noise = rng_type{}(c, k); - -diff --git a/src/core/unit_tests/LocalBox_test.cpp b/src/core/unit_tests/LocalBox_test.cpp -index 26d899220..c456cee03 100644 ---- a/src/core/unit_tests/LocalBox_test.cpp -+++ b/src/core/unit_tests/LocalBox_test.cpp -@@ -50,7 +50,7 @@ BOOST_AUTO_TEST_CASE(constructors) { - { - Utils::Vector const lower_corner = {1., 2., 3.}; - Utils::Vector const local_box_length = {4., 5., 6.}; -- Utils::Array const boundaries = {-1, 0, 1, 1, 0, -1}; -+ Utils::Array const boundaries = {{{-1, 0, 1, 1, 0, -1}}}; - - auto const box = - LocalBox(lower_corner, local_box_length, boundaries); -diff --git a/src/utils/include/utils/interpolation/bspline_3d.hpp b/src/utils/include/utils/interpolation/bspline_3d.hpp -index b130f8fc6..9fb9f85d2 100644 ---- a/src/utils/include/utils/interpolation/bspline_3d.hpp -+++ b/src/utils/include/utils/interpolation/bspline_3d.hpp -@@ -47,8 +47,8 @@ void bspline_3d(const Vector3d &pos, const Kernel &kernel, - const auto block = detail::ll_and_dist(pos, grid_spacing, offset); - - /* Precalc weights that are used multiple times. */ -- std::array w_y; -- std::array w_z; -+ std::array w_y{}; -+ std::array w_z{}; - for (int i = 0; i < order; i++) { - w_y[i] = bspline(i, block.distance[1]); - w_z[i] = bspline(i, block.distance[2]); -diff --git a/src/utils/tests/Array_test.cpp b/src/utils/tests/Array_test.cpp -index cab5a7fb2..f55759118 100644 ---- a/src/utils/tests/Array_test.cpp -+++ b/src/utils/tests/Array_test.cpp -@@ -48,7 +48,7 @@ BOOST_AUTO_TEST_CASE(array_ctor) { - } - - BOOST_AUTO_TEST_CASE(iterators) { -- auto a = Array{{1, 2, 3, 4}}; -+ auto a = Array{{{1, 2, 3, 4}}}; - - BOOST_CHECK(*(a.begin()) == 1); - BOOST_CHECK(*(a.cbegin()) == 1); -@@ -57,7 +57,7 @@ BOOST_AUTO_TEST_CASE(iterators) { - } - - BOOST_AUTO_TEST_CASE(element_access) { -- auto a = Array{{5, 6, 7, 8, 9}}; -+ auto a = Array{{{5, 6, 7, 8, 9}}}; - - int c = 5; - for (int i : a) { -diff --git a/src/utils/tests/tuple_test.cpp b/src/utils/tests/tuple_test.cpp -index 3954ebffd..870a091cf 100644 ---- a/src/utils/tests/tuple_test.cpp -+++ b/src/utils/tests/tuple_test.cpp -@@ -28,12 +28,14 @@ - - #include "utils/tuple.hpp" - -+#include -+ - BOOST_AUTO_TEST_CASE(for_each) { - using Utils::for_each; - - /* l-value reference tuple */ - { -- auto a = std::array{2, 3, 5}; -+ auto a = std::array{{2, 3, 5}}; - - for_each( - [i = 0, a](int &e) mutable { -@@ -71,7 +73,7 @@ BOOST_AUTO_TEST_CASE(apply) { - using Utils::apply; - - /* constexpr */ -- { static_assert(apply(std::plus<>(), std::array{3, 8}) == 11, ""); } -+ { static_assert(apply(std::plus<>(), std::array{{3, 8}}) == 11, ""); } - - /* l-value reference */ - { diff --git a/espresso.spec b/espresso.spec index 50fc3e7..1cd5a3e 100644 --- a/espresso.spec +++ b/espresso.spec @@ -1,35 +1,36 @@ %global git 0 -%global commit f74064d62090da45a28225881008b05798703d1c +%global commit 18d49bfc4b6ca5be264f16d262338fda1f9141a7 %global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global h5xxcommit 89d8d435872ec77dd931e709df98eefac8cbc925 Name: espresso -Version: 4.1.4 -Release: 13%{?dist} +Version: 4.2.0 +Release: 1%{?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 ExcludeArch: s390x i686 armv7hl License: GPLv3+ -URL: http://espressomd.org +URL: https://espressomd.org %if %{git} Source0: https://github.com/%{name}md/%{name}/archive/%{commit}/%{name}-%{commit}.tar.gz +Source1: https://github.com/h5md/h5xx/archive/%{h5xxcommit}/h5xx-%{h5xxcommit}.tar.gz %else -Source0: https://github.com/%{name}md/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/%{name}md/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz %endif -Patch0: %{name}-gcc11.patch -Patch1: %{name}-gcc12.patch -# https://github.com/espressomd/espresso/pull/3845.patch -# https://github.com/espressomd/espresso/pull/4433.patch -Patch2: %{name}-cmake.patch +# skip fragile ICC python interface test on aarch64 +Patch0: %{name}-aarch64.patch BuildRequires: gcc-c++ -BuildRequires: cmake3 >= 3.4 +BuildRequires: cmake3 >= 3.16 BuildRequires: /usr/bin/cython %global cython /usr/bin/cython BuildRequires: fftw-devel BuildRequires: python%{python3_pkgversion}-numpy +BuildRequires: python%{python3_pkgversion}-scipy BuildRequires: python%{python3_pkgversion}-six +BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: python%{python3_pkgversion}-devel BuildRequires: boost-devel BuildRequires: hdf5-devel @@ -52,7 +53,7 @@ ESPResSo can perform Molecular Dynamics simulations of bead-spring models in various ensembles ((N,V,E), (N,V,T), and (N,p,T)). ESPResSo contains a number of advanced algorithms, e.g. * DPD thermostat (for hydrodynamics) - * P3M, MMM2D, MMM1D, ELC for electrostatic interactions + * P3M, MMM1D, ELC for electrostatic interactions * Lattice-Boltzmann for hydrodynamics %package common @@ -64,7 +65,7 @@ ESPResSo can perform Molecular Dynamics simulations of bead-spring models in various ensembles ((N,V,E), (N,V,T), and (N,p,T)). ESPResSo contains a number of advanced algorithms, e.g. * DPD thermostat (for hydrodynamics) - * P3M, MMM2D, MMM1D, ELC for electrostatic interactions + * P3M, MMM1D, ELC for electrostatic interactions * Lattice-Boltzmann for hydrodynamics This package contains the license file and data files shared between the sub-packages of %{name}. @@ -81,7 +82,7 @@ ESPResSo can perform Molecular Dynamics simulations of bead-spring models in various ensembles ((N,V,E), (N,V,T), and (N,p,T)). ESPResSo contains a number of advanced algorithms, e.g. * DPD thermostat (for hydrodynamics) - * P3M, MMM2D, MMM1D, ELC for electrostatic interactions + * P3M, MMM1D, ELC for electrostatic interactions * Lattice-Boltzmann for hydrodynamics This package contains %{name} compiled against Open MPI. @@ -101,7 +102,7 @@ ESPResSo can perform Molecular Dynamics simulations of bead-spring models in various ensembles ((N,V,E), (N,V,T), and (N,p,T)). ESPResSo contains a number of advanced algorithms, e.g. * DPD thermostat (for hydrodynamics) - * P3M, MMM2D, MMM1D, ELC for electrostatic interactions + * P3M, MMM1D, ELC for electrostatic interactions * Lattice-Boltzmann for hydrodynamics This package contains %{name} compiled against MPICH2. @@ -109,13 +110,15 @@ This package contains %{name} compiled against MPICH2. %prep %if %{git} -%setup -q -n espresso-%{commit} +%setup -q -a 1 -n espresso-%{commit} +rm -r libs/h5xx +mv h5xx-%{h5xxcommit} libs/h5xx %else %setup -q -n %{name} %endif +%ifarch aarch64 %patch0 -p1 -%patch1 -p1 -%patch2 -p1 +%endif %build %global defopts \\\ @@ -137,7 +140,7 @@ for mpi in mpich openmpi ; do module load mpi/${mpi}-%{_arch} old_LDFLAGS="${LDFLAGS}" export LDFLAGS="${LDFLAGS} -Wl,-rpath,${MPI_PYTHON3_SITEARCH}/%{name}md" - %{cmake3} %{defopts} -DLIBDIR=${MPI_LIB} -DPYTHON_INSTDIR=${MPI_PYTHON3_SITEARCH} -DWITH_CUDA=OFF + %{cmake3} %{defopts} -DPYTHON_INSTDIR=${MPI_PYTHON3_SITEARCH} -DWITH_CUDA=OFF -DWITH_HDF5=ON -DWITH_GSL=ON export LD_LIBRARY_PATH=$PWD/${mpi:-serial}/src/config %cmake3_build export LDFLAGS="${old_LDFLAGS}" @@ -153,8 +156,7 @@ done %check export CTEST_OUTPUT_ON_FAILURE=1 -# exclude openmpi, see https://github.com/espressomd/espresso/issues/3905 -for mpi in mpich; do +for mpi in mpich openmpi; do module load mpi/${mpi}-%{_arch} export LD_LIBRARY_PATH=${MPI_LIB}:%{buildroot}${MPI_PYTHON3_SITEARCH}/%{name}md %cmake3_build --target check @@ -162,7 +164,7 @@ for mpi in mpich; do done %files common -%doc AUTHORS README NEWS ChangeLog +%doc AUTHORS Readme.md NEWS ChangeLog %license COPYING %files -n python%{python3_pkgversion}-%{name}-openmpi @@ -172,6 +174,9 @@ done %{python3_sitearch}/mpich/%{name}md/ %changelog +* Thu Jun 30 2022 Jean-Noël Grad - 4.2.0-1 +- Version bump to v4.2.0 + * Tue Jun 14 2022 Python Maint - 4.1.4-13 - Rebuilt for Python 3.11 diff --git a/sources b/sources index afebd92..0504441 100644 --- a/sources +++ b/sources @@ -1 +1,3 @@ -SHA512 (espresso-4.1.4.tar.gz) = c901b0f39ba8ec8a5b32d67a52b4cd0fe07c2f98a1032cfc4542bb27eba9f24d1f2d575a048e4f6256bef7be8a51cd68851e457f87038a0dc946ec5c28324a9d +SHA512 (espresso-4.2.0.tar.gz) = b80afb1bef57911fd79b88378a5b2e31b07a18d415fe17fcd5ed28fb448eeca5922f98af8df42117e9e869645765d55ecfb3aae615fa6a53c915f7d8a63081c5 +SHA512 (espresso-18d49bfc4b6ca5be264f16d262338fda1f9141a7.tar.gz) = 90fb015464fc5236a510f05dc426e38ca99e3e7ff3261abaa1d1d039f182f4a7f50a18e27e007a5e30ed627e1b8b40638ea4b49e7fab804de74db87bb875d2e1 +SHA512 (h5xx-89d8d435872ec77dd931e709df98eefac8cbc925.tar.gz) = 75518160d3ae575b3ff39d18b3f4269eebdde60c09a7ca808e7e5e49795768aaf35eff068e2242b8395191a3157b8a0f0fbfeda323ec3cd33e51a28d76e76fc8