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

{lang}[foss/2021.04] SciPy-bundle v2021.05 #12935

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
easyblock = 'PythonPackage'

name = 'hypothesis'
version = '6.13.1'

homepage = "https://github.com/HypothesisWorks/hypothesis"
description = """Hypothesis is an advanced testing library for Python. It lets you write tests which are parametrized
by a source of examples, and then generates simple and comprehensible examples that make your tests fail. This lets
you find more bugs in your code with less work."""

toolchain = {'name': 'GCCcore', 'version': '10.3.0'}

sources = [SOURCE_TAR_GZ]
checksums = ['074e27e514b305ba0b0c6bc0037faad1abbe2ea641ab4a8ec90e12a5e3238009']

builddependencies = [('binutils', '2.36.1')]

dependencies = [('Python', '3.9.5')]

use_pip = True
download_dep_fail = True
sanity_pip_check = True

moduleclass = 'tools'
23 changes: 23 additions & 0 deletions easybuild/easyconfigs/p/pybind11/pybind11-2.6.2-GCCcore-10.3.0.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name = 'pybind11'
version = '2.6.2'

homepage = 'https://pybind11.readthedocs.io'
description = """pybind11 is a lightweight header-only library that exposes C++ types in Python and vice versa,
mainly to create Python bindings of existing C++ code."""

toolchain = {'name': 'GCCcore', 'version': '10.3.0'}

source_urls = ['https://github.com/pybind/pybind11/archive/']
sources = ['v%(version)s.tar.gz']
checksums = ['8ff2fff22df038f5cd02cea8af56622bc67f5b64534f1b83b9f133b8366acff2']

builddependencies = [
('binutils', '2.36.1'),
('CMake', '3.20.1'),
('Eigen', '3.3.9'),
]
dependencies = [('Python', '3.9.5')]

configopts = "-DPYTHON_EXECUTABLE=$EBROOTPYTHON/bin/python"

moduleclass = 'lib'
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
easyblock = 'PythonBundle'

name = 'SciPy-bundle'
version = '2021.05'

homepage = 'https://python.org/'
description = "Bundle of Python packages for scientific software"

toolchain = {'name': 'foss', 'version': '2021.04'}
toolchainopts = {'pic': True, 'lowopt': True}

builddependencies = [('hypothesis', '6.13.1')]

dependencies = [
('Python', '3.9.5'),
('pybind11', '2.6.2'), # required by scipy
]

use_pip = True

# order is important!
exts_list = [
('numpy', '1.20.3', {
'sources': [SOURCE_ZIP],
'patches': [
'numpy-1.20.3_skip-ppc-long-complex-test.patch',
'numpy-1.20.3_xfail-test-nan.patch',
],
'checksums': [
'e55185e51b18d788e49fe8305fd73ef4470596b33fc2c1ceb304566b99c71a69', # numpy-1.20.3.zip
# numpy-1.20.3_skip-ppc-long-complex-test.patch
'2f9a12e3a352b39076db84a7622fc8f4796abd3cb7f97f71958a495e864659a4',
'f0ce961f7d79551598e23050d92f46e827e300f6a7e5a6112e58efcc10385d4d', # numpy-1.20.3_xfail-test-nan.patch
],
}),
('scipy', '1.6.3', {
'checksums': ['a75b014d3294fce26852a9d04ea27b5671d86736beb34acdfc05859246260707'],
}),
('mpi4py', '3.0.3', {
'checksums': ['012d716c8b9ed1e513fcc4b18e5af16a8791f51e6d1716baccf988ad355c5a1f'],
}),
('numexpr', '2.7.3', {
'checksums': ['43616529f9b7d1afc83386f943dc66c4da5e052f00217ba7e3ad8dd1b5f3a825'],
}),
('Bottleneck', '1.3.2', {
'checksums': ['20179f0b66359792ea283b69aa16366419132f3b6cf3adadc0c48e2e8118e573'],
}),
('pandas', '1.2.4', {
'preinstallopts': """sed -i 's@extra_compile_args = \["-Werror"\]@extra_compile_args = []@g' setup.py && """,
'checksums': ['649ecab692fade3cbfcf967ff936496b0cfba0af00a55dfaacd82bdda5cb2279'],
}),
('mpmath', '1.2.1', {
'checksums': ['79ffb45cf9f4b101a807595bcb3e72e0396202e0b1d25d689134b48c4216a81a'],
}),
('deap', '1.3.1', {
'checksums': ['11f54493ceb54aae10dde676577ef59fc52d52f82729d5a12c90b0813c857a2f'],
}),
]

sanity_pip_check = True

moduleclass = 'lang'
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Include a PPC detection for the inaccurate trig functions
See https://github.com/numpy/numpy/issues/15763

Author: Alexander Grund (TU Dresden), ported to numpy 1.20.3 by Kenneth Hoste (HPC-UGent)

--- numpy-1.20.3/numpy/core/tests/test_umath.py.orig 2021-05-23 16:30:32.532283122 +0200
+++ numpy-1.20.3/numpy/core/tests/test_umath.py 2021-05-23 16:35:26.122552207 +0200
@@ -23,20 +23,25 @@


def bad_arcsinh():
- """The blocklisted trig functions are not accurate on aarch64 for
+ """The blocklisted trig functions are not accurate on aarch64/PPC for
complex256. Rather than dig through the actual problem skip the
test. This should be fixed when we can move past glibc2.17
which is the version in manylinux2014
"""
- x = 1.78e-10
+ if platform.machine() == 'aarch64':
+ x = 1.78e-10
+ elif on_powerpc():
+ x = 2.16e-10
+ else:
+ return False
v1 = np.arcsinh(np.float128(x))
v2 = np.arcsinh(np.complex256(x)).real
# The eps for float128 is 1-e33, so this is way bigger
return abs((v1 / v2) - 1.0) > 1e-23

-if platform.machine() == 'aarch64' and bad_arcsinh():
+if bad_arcsinh():
skip_longcomplex_msg = ('Trig functions of np.longcomplex values known to be '
- 'inaccurate on aarch64 for some compilation '
+ 'inaccurate on aarch64 and PPC for some compilation '
'configurations, should be fixed by building on a '
'platform using glibc>2.17')
else:
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
mark test_nan as expected failure (xfail), see https://github.com/numpy/numpy/issues/18914
and https://github.com/numpy/numpy/pull/18943

From acf249e0c663f148ee6389327f0b35298fc14833 Mon Sep 17 00:00:00 2001
From: Ralf Gommers <[email protected]>
Date: Sat, 8 May 2021 14:52:03 +0200
Subject: [PATCH] TST: xfail `TestCond.test_nan` unconditionally

This is happening on too many build configurations, and it's not
completely clear if it's just an OpenBLAS version or also depends
on something else. Reported as happening mostly on macOS, but
also on Fedora.
---
numpy/linalg/tests/test_linalg.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/numpy/linalg/tests/test_linalg.py b/numpy/linalg/tests/test_linalg.py
index 8a270f194147..c6e8cdd039f1 100644
--- a/numpy/linalg/tests/test_linalg.py
+++ b/numpy/linalg/tests/test_linalg.py
@@ -684,7 +684,7 @@ def hermitian(mat):
axes = list(range(mat.ndim))
axes[-1], axes[-2] = axes[-2], axes[-1]
return np.conj(np.transpose(mat, axes=axes))
-
+
assert_almost_equal(np.matmul(u, hermitian(u)), np.broadcast_to(np.eye(u.shape[-1]), u.shape))
assert_almost_equal(np.matmul(vt, hermitian(vt)), np.broadcast_to(np.eye(vt.shape[-1]), vt.shape))
assert_equal(np.sort(s)[..., ::-1], s)
@@ -766,6 +766,9 @@ def test_singular(self):
for A, p in itertools.product(As, p_neg):
linalg.cond(A, p)

+ @pytest.mark.xfail(True, run=False,
+ reason="Platform/LAPACK-dependent failure, "
+ "see gh-18914")
def test_nan(self):
# nans should be passed through, not converted to infs
ps = [None, 1, -1, 2, -2, 'fro']
@@ -981,7 +984,7 @@ def test_incompatible_dims(self):
linalg.lstsq(A, y, rcond=None)


[email protected]('dt', [np.dtype(c) for c in '?bBhHiIqQefdgFDGO'])
[email protected]('dt', [np.dtype(c) for c in '?bBhHiIqQefdgFDGO'])
class TestMatrixPower:

rshft_0 = np.eye(4)
@@ -1010,7 +1013,7 @@ def tz(M):
mz = matrix_power(M, 0)
assert_equal(mz, identity_like_generalized(M))
assert_equal(mz.dtype, M.dtype)
-
+
for mat in self.rshft_all:
tz(mat.astype(dt))
if dt != object: