From d5334da6b05a6dcabee1a2fcbe6c89e1c8289c9b Mon Sep 17 00:00:00 2001
From: Martin Reinecke <martin@mpa-garching.mpg.de>
Date: Mon, 4 Nov 2019 10:40:41 +0100
Subject: [PATCH] revert a few changes in test codes

---
 bench.py  | 2 +-
 stress.py | 8 +++-----
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/bench.py b/bench.py
index c9ccf19..e403ee1 100644
--- a/bench.py
+++ b/bench.py
@@ -107,7 +107,7 @@ def bench_nd(ndim, nmax, ntry, tp, funcs, nrepeat, ttl="", filename=""):
     plt.show()
 
 
-funcs = (measure_pypocketfft, measure_fftw_np_interface)
+funcs = (measure_pypocketfft, measure_fftw)
 ttl = "pypocketfft/FFTW()"
 bench_nd(1, 8192, 100, "c16", funcs, 10, ttl, "1d.png")
 bench_nd(2, 2048, 100, "c16", funcs, 2, ttl, "2d.png")
diff --git a/stress.py b/stress.py
index 635b351..e7526d5 100644
--- a/stress.py
+++ b/stress.py
@@ -2,8 +2,6 @@ import numpy as np
 import pypocketfft
 
 
-np.random.seed(42)
-
 def _l2error(a, b, axes):
     return np.sqrt(np.sum(np.abs(a-b)**2)/np.sum(np.abs(a)**2))/np.log2(np.max([2,np.prod(np.take(a.shape,axes))]))
 
@@ -28,7 +26,7 @@ def irfftn(a, axes=None, lastsize=0, inorm=0, nthreads=1):
                            inorm=inorm, nthreads=nthreads)
 
 
-nthreads = 1
+nthreads = 0
 
 
 def update_err(err, name, value):
@@ -42,9 +40,9 @@ def update_err(err, name, value):
 
 
 def test(err):
-    ndim = 3# np.random.randint(1, 5)
+    ndim = np.random.randint(1, 5)
     axlen = int((2**20)**(1./ndim))
-    shape = (np.random.randint(1, axlen, ndim)//2)*2+1
+    shape = np.random.randint(1, axlen, ndim)
     axes = np.arange(ndim)
     np.random.shuffle(axes)
     nax = np.random.randint(1, ndim+1)
-- 
GitLab