diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2020-01-01 12:11:24 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-01 12:11:24 -0700 |
commit | 6253ff78be7f21898178799758717bfe59368b94 (patch) | |
tree | 937a8533c3190c7f9b87f13c43ac6559e7278d3e /numpy | |
parent | 3487c36eae4f380a42d98a0da0e32d362bf070ab (diff) | |
parent | 49974bad2d11e3be31cb83f881ae09dd91b8dd25 (diff) | |
download | numpy-6253ff78be7f21898178799758717bfe59368b94.tar.gz |
Merge pull request #15107 from pv/blas64-ilp64-ci
TST: add BLAS ILP64 run in Travis & Azure
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/linalg/tests/test_linalg.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/numpy/linalg/tests/test_linalg.py b/numpy/linalg/tests/test_linalg.py index bd3df1ca4..ef05b595e 100644 --- a/numpy/linalg/tests/test_linalg.py +++ b/numpy/linalg/tests/test_linalg.py @@ -2016,3 +2016,31 @@ def test_blas64_dot(): a[0,-1] = 1 c = np.dot(b, a) assert_equal(c[0,-1], 1) + + +@pytest.mark.xfail(not HAS_LAPACK64, + reason="Numpy not compiled with 64-bit BLAS/LAPACK") +def test_blas64_geqrf_lwork_smoketest(): + # Smoke test LAPACK geqrf lwork call with 64-bit integers + dtype = np.float64 + lapack_routine = np.linalg.lapack_lite.dgeqrf + + m = 2**32 + 1 + n = 2**32 + 1 + lda = m + + # Dummy arrays, not referenced by the lapack routine, so don't + # need to be of the right size + a = np.zeros([1, 1], dtype=dtype) + work = np.zeros([1], dtype=dtype) + tau = np.zeros([1], dtype=dtype) + + # Size query + results = lapack_routine(m, n, a, lda, tau, work, -1, 0) + assert_equal(results['info'], 0) + assert_equal(results['m'], m) + assert_equal(results['n'], m) + + # Should result to an integer of a reasonable size + lwork = int(work.item()) + assert_(2**32 < lwork < 2**42) |