Accepting request 819606 from home:cjunghans:branches:devel:languages:python:numeric

- Update to 4.1.3, see 
  https://github.com/espressomd/espresso/blob/4.1.3/NEWS for 
  details
- drop 3427.patch - merged upstream

OBS-URL: https://build.opensuse.org/request/show/819606
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python3-espressomd?expand=0&rev=21
This commit is contained in:
Christoph Junghans 2020-07-08 20:15:37 +00:00 committed by Git OBS Bridge
parent 414d23c811
commit 75063dfe9d
5 changed files with 12 additions and 103 deletions

View File

@ -1,96 +0,0 @@
From 540b6f0f5f59bd8257f09b750281dc7ddd9533c0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jean-No=C3=ABl=20Grad?= <jgrad@icp.uni-stuttgart.de>
Date: Tue, 21 Jan 2020 15:39:10 +0100
Subject: [PATCH] Fix BOOST_CHECK_CLOSE assertions
`BOOST_*_CLOSE` assertions take a tolerance as a percentage.
When using machine epsilon, it needs to be multiplied by 100.
---
src/core/unit_tests/grid_test.cpp | 17 ++++++++++-------
src/utils/tests/int_pow_test.cpp | 4 ++--
src/utils/tests/interpolation_test.cpp | 2 +-
src/utils/tests/matrix_vector_product.cpp | 2 +-
4 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/src/core/unit_tests/grid_test.cpp b/src/core/unit_tests/grid_test.cpp
index 3b926bf8c8..310b416f80 100644
--- a/src/core/unit_tests/grid_test.cpp
+++ b/src/core/unit_tests/grid_test.cpp
@@ -170,9 +170,9 @@ BOOST_AUTO_TEST_CASE(regular_decomposition_test) {
auto const result = regular_decomposition(box, {0, 0, 0}, node_grid);
auto const local_box_l = result.length();
- BOOST_CHECK_CLOSE(box_l[0], local_box_l[0] * node_grid[0], eps);
- BOOST_CHECK_CLOSE(box_l[1], local_box_l[1] * node_grid[1], eps);
- BOOST_CHECK_CLOSE(box_l[2], local_box_l[2] * node_grid[2], eps);
+ BOOST_CHECK_CLOSE(box_l[0], local_box_l[0] * node_grid[0], 100. * eps);
+ BOOST_CHECK_CLOSE(box_l[1], local_box_l[1] * node_grid[1], 100. * eps);
+ BOOST_CHECK_CLOSE(box_l[2], local_box_l[2] * node_grid[2], 100. * eps);
}
/* check corners */
@@ -185,9 +185,12 @@ BOOST_AUTO_TEST_CASE(regular_decomposition_test) {
auto const local_box_l = result.length();
auto const lower_corner = result.my_left();
- BOOST_CHECK_CLOSE(lower_corner[0], local_box_l[0] * node_pos[0], eps);
- BOOST_CHECK_CLOSE(lower_corner[1], local_box_l[1] * node_pos[1], eps);
- BOOST_CHECK_CLOSE(lower_corner[2], local_box_l[2] * node_pos[2], eps);
+ BOOST_CHECK_CLOSE(lower_corner[0], local_box_l[0] * node_pos[0],
+ 100. * eps);
+ BOOST_CHECK_CLOSE(lower_corner[1], local_box_l[1] * node_pos[1],
+ 100. * eps);
+ BOOST_CHECK_CLOSE(lower_corner[2], local_box_l[2] * node_pos[2],
+ 100. * eps);
}
}
-}
\ No newline at end of file
+}
diff --git a/src/utils/tests/int_pow_test.cpp b/src/utils/tests/int_pow_test.cpp
index 072aabfff3..74610052d9 100644
--- a/src/utils/tests/int_pow_test.cpp
+++ b/src/utils/tests/int_pow_test.cpp
@@ -40,7 +40,7 @@ BOOST_AUTO_TEST_CASE(even) {
const double x = 3.14159;
BOOST_CHECK(1 == int_pow<0>(x));
- BOOST_CHECK_CLOSE(x * x, int_pow<2>(x), eps);
+ BOOST_CHECK_CLOSE(x * x, int_pow<2>(x), 100. * eps);
BOOST_CHECK_CLOSE((x * x) * (x * x), int_pow<4>(x), 100. * eps);
}
@@ -48,7 +48,7 @@ BOOST_AUTO_TEST_CASE(odd) {
const double x = 3.14159;
BOOST_CHECK(x == int_pow<1>(x));
- BOOST_CHECK_CLOSE((x * x) * x, int_pow<3>(x), eps);
+ BOOST_CHECK_CLOSE((x * x) * x, int_pow<3>(x), 100. * eps);
BOOST_CHECK_CLOSE((x * x) * (x * x) * x, int_pow<5>(x), 100. * eps);
}
diff --git a/src/utils/tests/interpolation_test.cpp b/src/utils/tests/interpolation_test.cpp
index 59a351e723..50b4b164b6 100644
--- a/src/utils/tests/interpolation_test.cpp
+++ b/src/utils/tests/interpolation_test.cpp
@@ -140,7 +140,7 @@ BOOST_AUTO_TEST_CASE(nearest_point) {
bspline_3d<1>({.1, .2, .3}, save_ind, {0.5, 0.5, 0.5}, {});
BOOST_CHECK((std::array<int, 3>{{0, 0, 1}} == nmp));
- BOOST_CHECK_CLOSE(weight, 1., std::numeric_limits<double>::epsilon());
+ BOOST_CHECK_CLOSE(weight, 1., 100. * std::numeric_limits<double>::epsilon());
}
BOOST_AUTO_TEST_CASE(interpolation_points_3) {
diff --git a/src/utils/tests/matrix_vector_product.cpp b/src/utils/tests/matrix_vector_product.cpp
index fb015bb6c5..f3e560620d 100644
--- a/src/utils/tests/matrix_vector_product.cpp
+++ b/src/utils/tests/matrix_vector_product.cpp
@@ -34,6 +34,6 @@ BOOST_AUTO_TEST_CASE(inner_product) {
auto const result = Utils::matrix_vector_product<double, 3, matrix>(vector);
for (int i = 0; i < 3; ++i) {
BOOST_CHECK_CLOSE(result[i], boost::inner_product(matrix[i], vector, 0.0),
- std::numeric_limits<double>::epsilon());
+ 100. * std::numeric_limits<double>::epsilon());
}
}

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:00bc8e4cab8fc8f56d18978970b55f09168521ed5898a92769986f2157a81a2c
size 22921088

3
espresso-4.1.3.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:13dd998f71547c6c979a33d918b7f83e1a0e1c5f2bf2ddeeb0d1e99a3dcd6008
size 16947336

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Wed Jul 8 19:14:39 UTC 2020 - Christoph Junghans <junghans@votca.org>
- Update to 4.1.3, see
https://github.com/espressomd/espresso/blob/4.1.3/NEWS for
details
- drop 3427.patch - merged upstream
-------------------------------------------------------------------
Thu May 21 21:52:51 UTC 2020 - Christoph Junghans <junghans@votca.org>

View File

@ -35,15 +35,13 @@
%define pkgname espresso
%define modname %{pkgname}md
Name: python3-%{modname}
Version: 4.1.2
Version: 4.1.3
Release: 0
Summary: Parallel simulation software for soft matter research
License: GPL-3.0-or-later
Group: Productivity/Scientific/Chemistry
URL: http://espressomd.org
Source: https://github.com/%{modname}/%{pkgname}/releases/download/%{version}/%{pkgname}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM 3427.patch - fix test on 586 - https://github.com/espressomd/espresso/pull/3427
Patch0: 3427.patch
BuildRequires: cmake
BuildRequires: fftw3-devel
BuildRequires: gcc-c++
@ -81,7 +79,6 @@ systems, for example DNA and lipid membranes.
%prep
%setup -q -n %{pkgname}
%patch0 -p1
%build
source %{_libdir}/mpi/gcc/%{mpiver}/bin/mpivars.sh