summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/source/release/1.18.0-notes.rst5
-rw-r--r--numpy/distutils/system_info.py1
-rw-r--r--numpy/lib/tests/test_io.py2
-rw-r--r--numpy/linalg/tests/test_linalg.py2
-rw-r--r--numpy/testing/_private/decorators.py4
-rw-r--r--numpy/testing/_private/utils.py11
6 files changed, 13 insertions, 12 deletions
diff --git a/doc/source/release/1.18.0-notes.rst b/doc/source/release/1.18.0-notes.rst
index e0b89ba67..0cea811fb 100644
--- a/doc/source/release/1.18.0-notes.rst
+++ b/doc/source/release/1.18.0-notes.rst
@@ -205,6 +205,11 @@ The `numpy.expand_dims` ``axis`` keyword can now accept a tuple of
axes. Previously, ``axis`` was required to be an integer.
(`gh-14051 <https://github.com/numpy/numpy/pull/14051>`__)
+Support for 64-bit OpenBLAS with symbol suffix
+----------------------------------------------
+Added support for 64-bit (ILP64) OpenBLAS compiled with
+``make INTERFACE64=1 SYMBOLSUFFIX=64_``. See ``site.cfg.example``
+for details.
Improvements
============
diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py
index 1bc1b1391..fc2902b78 100644
--- a/numpy/distutils/system_info.py
+++ b/numpy/distutils/system_info.py
@@ -2062,7 +2062,6 @@ class openblas_info(blas_info):
%(calls)s
return 0;
}""") % dict(prototypes=prototypes, calls=calls)
- print(s)
src = os.path.join(tmpdir, 'source.c')
out = os.path.join(tmpdir, 'a.out')
# Add the additional "extra" arguments
diff --git a/numpy/lib/tests/test_io.py b/numpy/lib/tests/test_io.py
index 4188265e8..39fe40685 100644
--- a/numpy/lib/tests/test_io.py
+++ b/numpy/lib/tests/test_io.py
@@ -576,7 +576,7 @@ class TestSaveTxt(object):
@pytest.mark.skipif(sys.platform=='win32',
reason="large files cause problems")
@pytest.mark.slow
- @requires_memory(7e9)
+ @requires_memory(free_bytes=7e9)
def test_large_zip(self):
# The test takes at least 6GB of memory, writes a file larger than 4GB
test_data = np.asarray([np.random.rand(np.random.randint(50,100),4)
diff --git a/numpy/linalg/tests/test_linalg.py b/numpy/linalg/tests/test_linalg.py
index e1590f1e7..bd3df1ca4 100644
--- a/numpy/linalg/tests/test_linalg.py
+++ b/numpy/linalg/tests/test_linalg.py
@@ -2008,7 +2008,7 @@ def test_unsupported_commontype():
@pytest.mark.slow
@pytest.mark.xfail(not HAS_LAPACK64, run=False,
reason="Numpy not compiled with 64-bit BLAS/LAPACK")
-@requires_memory(16e9)
+@requires_memory(free_bytes=16e9)
def test_blas64_dot():
n = 2**32
a = np.zeros([1, n], dtype=np.float32)
diff --git a/numpy/testing/_private/decorators.py b/numpy/testing/_private/decorators.py
index eab40e7c9..24c4e385d 100644
--- a/numpy/testing/_private/decorators.py
+++ b/numpy/testing/_private/decorators.py
@@ -15,10 +15,6 @@ function name, setup and teardown functions and so on - see
"""
from __future__ import division, absolute_import, print_function
-import sys
-import os
-import re
-
try:
# Accessing collections abstract classes from collections
# has been deprecated since Python 3.3
diff --git a/numpy/testing/_private/utils.py b/numpy/testing/_private/utils.py
index 4642cc0f8..32bd738bc 100644
--- a/numpy/testing/_private/utils.py
+++ b/numpy/testing/_private/utils.py
@@ -2417,9 +2417,10 @@ def requires_memory(free_bytes):
def _parse_size(size_str):
"""Convert memory size strings ('12 GB' etc.) to float"""
- suffixes = {'': 1.0, 'b': 1.0,
- 'k': 1e3, 'm': 1e6, 'g': 1e9, 't': 1e12,
- 'kb': 1e3, 'mb': 1e6, 'gb': 1e9, 'tb': 1e12}
+ suffixes = {'': 1, 'b': 1,
+ 'k': 1000, 'm': 1000**2, 'g': 1000**3, 't': 1000**4,
+ 'kb': 1000, 'mb': 1000**2, 'gb': 1000**3, 'tb': 1000**4,
+ 'kib': 1024, 'mib': 1024**2, 'gib': 1024**3, 'tib': 1024**4}
size_re = re.compile(r'^\s*(\d+|\d+\.\d+)\s*({0})\s*$'.format(
'|'.join(suffixes.keys())), re.I)
@@ -2427,7 +2428,7 @@ def _parse_size(size_str):
m = size_re.match(size_str.lower())
if not m or m.group(2) not in suffixes:
raise ValueError("value {!r} not a valid size".format(size_str))
- return float(m.group(1)) * suffixes[m.group(2)]
+ return int(float(m.group(1)) * suffixes[m.group(2)])
def _get_mem_available():
@@ -2443,7 +2444,7 @@ def _get_mem_available():
with open('/proc/meminfo', 'r') as f:
for line in f:
p = line.split()
- info[p[0].strip(':').lower()] = float(p[1]) * 1e3
+ info[p[0].strip(':').lower()] = int(p[1]) * 1024
if 'memavailable' in info:
# Linux >= 3.14