python testrunner/pypyjit_tests.py
in dir d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build (timeout 4000 secs)
watching logfiles {'pytestLog': 'pypyjit_new.log'}
argv: ['python', 'testrunner/pypyjit_tests.py']
environment:
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\matti\AppData\Roaming
ASL.LOG=Destination=file
CHOCOLATEYINSTALL=C:\ProgramData\chocolatey
CHOCOLATEYLASTPATHUPDATE=133185086718935289
CHOCOLATEYTOOLSLOCATION=C:\tools
CLINK_DIR=C:\Program Files (x86)\clink\0.4.9
COMMONPROGRAMFILES=C:\Program Files (x86)\Common Files
COMMONPROGRAMFILES(X86)=C:\Program Files (x86)\Common Files
COMMONPROGRAMW6432=C:\Program Files\Common Files
COMPUTERNAME=DESKTOP-RYZEN
COMSPEC=C:\WINDOWS\system32\cmd.exe
CONDA_BAT=d:\miniconda\condabin\conda.bat
CONDA_EXE=d:\miniconda\Scripts\conda.exe
CONDA_SHLVL=0
CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7
CUDA_PATH_V11_7=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7
DRIVERDATA=C:\Windows\System32\Drivers\DriverData
LOCALAPPDATA=C:\Users\matti\AppData\Local
NUMBER_OF_PROCESSORS=2
NVTOOLSEXT_PATH=C:\Program Files\NVIDIA Corporation\NvToolsExt\
OS=Windows_NT
PATH=d:\CPython27\lib\site-packages\pywin32_system32;d:\pypy_stuff\pypy\externals\bin;D:\CPython27;D:\pypy_stuff\pypy2.7-v7.3.18\Scripts;D:\pypy_stuff\pypy2.7-v7.3.18;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseHg\;C:\Program Files\Git\cmd;C:\ProgramData\chocolatey\bin;C:\WINDOWS\System32\OpenSSH
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_ARCHITEW6432=AMD64
PROCESSOR_IDENTIFIER=AMD64 Family 23 Model 113 Stepping 0, AuthenticAMD
PROCESSOR_LEVEL=23
PROCESSOR_REVISION=7100
PROGRAMDATA=C:\ProgramData
PROGRAMFILES=C:\Program Files (x86)
PROGRAMFILES(X86)=C:\Program Files (x86)
PROGRAMW6432=C:\Program Files
PROMPT=$P$G
PSMODULEPATH=%ProgramFiles%\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
PUBLIC=C:\Users\Public
PWD=d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build
PYPY_ENABLE_WINCONSOLEIO=1
PYTEST_XDIST_AUTO_NUM_WORKERS=4
RTOOLS40_HOME=C:\rtools40
RTOOLS43_HOME=C:\rtools43
RTOOLS44_HOME=C:\rtools44
SYSTEMDRIVE=C:
SYSTEMROOT=C:\WINDOWS
TEMP=D:\SystemTemp
TMP=D:\SystemTemp
TMPDIR=d:\systemtemp\pytest
USERDOMAIN=DESKTOP-RYZEN
USERNAME=matti
USERPROFILE=C:\Users\matti
VS140COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\
WINDIR=C:\WINDOWS
using PTY: False
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.23-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build, inifile: pytest.ini
collected 1207 items
pypy\module\pypyjit\test_pypy_c\test_00_model.py .........................
pypy\module\pypyjit\test_pypy_c\test_alloc.py ...................................................
pypy\module\pypyjit\test_pypy_c\test_array.py .......
pypy\module\pypyjit\test_pypy_c\test_boolrewrite.py ......................................................................................................................................................................................................................................................................................................................................
pypy\module\pypyjit\test_pypy_c\test_buffers.py ..
pypy\module\pypyjit\test_pypy_c\test_bug.py s
pypy\module\pypyjit\test_pypy_c\test_call.py ..........................
pypy\module\pypyjit\test_pypy_c\test_containers.py ......................
pypy\module\pypyjit\test_pypy_c\test_cprofile.py .
pypy\module\pypyjit\test_pypy_c\test_exception.py .....
pypy\module\pypyjit\test_pypy_c\test_ffi.py s.Fs.ss...
pypy\module\pypyjit\test_pypy_c\test_generators.py ...
pypy\module\pypyjit\test_pypy_c\test_getframe.py .F
pypy\module\pypyjit\test_pypy_c\test_globals.py .
pypy\module\pypyjit\test_pypy_c\test_import.py ..
pypy\module\pypyjit\test_pypy_c\test_instance.py ................
pypy\module\pypyjit\test_pypy_c\test_intbound.py ..................................................................................................................................................................................................................................................................................
pypy\module\pypyjit\test_pypy_c\test_jitlogparser.py s
pypy\module\pypyjit\test_pypy_c\test_math.py FFs..
pypy\module\pypyjit\test_pypy_c\test_micronumpy.py ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssFFFFFFFF
pypy\module\pypyjit\test_pypy_c\test_min_max.py ...
pypy\module\pypyjit\test_pypy_c\test_misc.py ................F......
pypy\module\pypyjit\test_pypy_c\test_shift.py ...........................................................................................................................................................................................................................
pypy\module\pypyjit\test_pypy_c\test_string.py ................
pypy\module\pypyjit\test_pypy_c\test_struct.py ......
pypy\module\pypyjit\test_pypy_c\test_thread.py ...
pypy\module\pypyjit\test_pypy_c\test_weakref.py .
================================== FAILURES ===================================
____________________ Test__ffi.test__ffi_call_releases_gil ____________________
self = <pypy.module.pypyjit.test_pypy_c.test_ffi.Test__ffi object at 0x000001f1bf84e6b0>
def test__ffi_call_releases_gil(self):
from rpython.rlib.clibffi import get_libc_name
def main(libc_name, n):
import time
import os
from threading import Thread
#
if os.name == 'nt':
from _rawffi.alt import WinDLL, types
libc = WinDLL('Kernel32.dll')
sleep = libc.getfunc('Sleep', [types.uint], types.uint)
delays = [0]*n + [1000]
else:
from _rawffi.alt import CDLL, types
libc = CDLL(libc_name)
sleep = libc.getfunc('sleep', [types.uint], types.uint)
delays = [0]*n + [1]
#
def loop_of_sleeps(i, delays):
for delay in delays:
sleep(delay) # ID: sleep
#
threads = [Thread(target=loop_of_sleeps, args=[i, delays]) for i in range(5)]
start = time.time()
for i, thread in enumerate(threads):
thread.start()
for thread in threads:
thread.join()
end = time.time()
return end - start
log = self.run(main, [get_libc_name(), 200], threshold=150,
import_site=True)
> assert 1 <= log.result <= 1.5 # at most 0.5 seconds of overhead
E assert 2.88800001144 <= 1.5
E + where 2.88800001144 = 2.88800001144
E + where 2.88800001144 = <pypy.module.pypyjit.test_pypy_c.model.Log object at 0x000001f1bf77aa68>.result
pypy\module\pypyjit\test_pypy_c\test_ffi.py:109: AssertionError
______________________ TestGetFrame.test_current_frames _______________________
self = <pypy.module.pypyjit.test_pypy_c.test_getframe.TestGetFrame object at 0x000001f1bfd90170>
def test_current_frames(self):
def main():
import sys
import time
import thread
lst = [0.0] * 1000
lst[-33] = 3.0
done = []
def h1(x):
time.sleep(lst[x])
def g1(x):
h1(x)
def f1():
for j in range(1000):
g1(j)
done.append('done')
for k in range(3):
thread.start_new_thread(f1, ())
time.sleep(1)
d = sys._current_frames()
time.sleep(3)
# the captured frames should be finished by now
done.append(str(len(d)))
for key, value in d.items():
while value is not None:
name = value.f_code.co_name
if len(name) == 2 and name[1] == '1':
done.append(name)
value = value.f_back
return repr('-'.join(done))
log = self.run(main, [])
> assert log.result == 'done-done-done-4-h1-g1-f1-h1-g1-f1-h1-g1-f1'
E assert '4-h1-g1-f1-h1-g1-f1-h1-g1-f1' == 'done-done-don...1-f1-h1-g1-f1'
E - 4-h1-g1-f1-h1-g1-f1-h1-g1-f1
E + done-done-done-4-h1-g1-f1-h1-g1-f1-h1-g1-f1
E ? +++++++++++++++
pypy\module\pypyjit\test_pypy_c\test_getframe.py:67: AssertionError
______________________________ TestMath.test_log ______________________________
self = <pypy.module.pypyjit.test_pypy_c.test_math.TestMath object at 0x000001f1bdfb7d70>
def test_log(self):
def main(n):
import math
i = 1
s = 0.0
while i < n:
s += math.log(i) - math.log10(i)
i += 1
return s
log = self.run(main, [500])
assert round(log.result, 6) == round(main(500), 6)
loop, = log.loops_by_filename(self.filepath)
> assert loop.match("""
i2 = int_lt(i0, i1)
guard_true(i2, descr=...)
guard_not_invalidated(descr=...)
f1 = cast_int_to_float(i0)
i3 = float_le(f1, 0.0)
guard_false(i3, descr=...)
f2 = call_f(ConstClass(log), f1, descr=<Callf . f EF=2>)
f3 = call_f(ConstClass(log10), f1, descr=<Callf . f EF=2>)
f4 = float_sub(f2, f3)
f5 = float_add(f0, f4)
i4 = int_add(i0, 1)
--TICK--
jump(..., descr=...)
""")
pypy\module\pypyjit\test_pypy_c\test_math.py:19:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pypy\module\pypyjit\test_pypy_c\model.py:186: in match
return matcher.match(expected_src, **kwds)
pypy\module\pypyjit\test_pypy_c\model.py:527: in match
self.match_loop(expected_ops, ignore_ops)
pypy\module\pypyjit\test_pypy_c\model.py:503: in match_loop
self.match_op(op, exp_op)
pypy\module\pypyjit\test_pypy_c\model.py:420: in match_op
self._assert(self.match_var(arg, exp_arg), "variable mismatch: %r instead of %r" % (arg, exp_arg))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.module.pypyjit.test_pypy_c.model.OpMatcher object at 0x000001f1c1d42250>
cond = False
message = "variable mismatch: 'ConstClass(ccall_log)' instead of 'ConstClass(log)'"
def _assert(self, cond, message):
if not cond:
> raise InvalidMatch(message, frame=sys._getframe(1))
E InvalidMatch: variable mismatch: 'ConstClass(ccall_log)' instead of 'ConstClass(log)'
pypy\module\pypyjit\test_pypy_c\model.py:405: InvalidMatch
---------------------------- Captured stdout call -----------------------------
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Loops don't match
=================
loop id = None
("variable mismatch: 'ConstClass(ccall_log)' instead of 'ConstClass(log)'",)
<could not determine information>
Ignore ops: []
Got:
i56 = int_lt(i51, i31)
guard_true(i56, descr=<Guard0x23a78a36260>)
guard_not_invalidated(descr=<Guard0x23a78a30fe0>)
f57 = cast_int_to_float(i51)
i59 = float_le(f57, 0.000000)
guard_false(i59, descr=<Guard0x23a78a31040>)
===== HERE =====
f61 = call_f(ConstClass(ccall_log), f57, descr=<Callf 8 f EF=2>)
f63 = call_f(ConstClass(ccall_log10), f57, descr=<Callf 8 f EF=2>)
f64 = float_sub(f61, f63)
f65 = float_add(f49, f64)
i67 = int_add(i51, 1)
i69 = getfield_raw_i(140711600789008, descr=<FieldS pypysig_long_struct_inner.c_value 0>)
i71 = int_lt(i69, 0)
guard_false(i71, descr=<Guard0x23a78a362a8>)
jump(p0, p1, p6, p7, p10, p12, i67, f65, i31, descr=TargetToken(2450155323488))
Expected:
i2 = int_lt(i0, i1)
guard_true(i2, descr=...)
guard_not_invalidated(descr=...)
f1 = cast_int_to_float(i0)
i3 = float_le(f1, 0.0)
guard_false(i3, descr=...)
f2 = call_f(ConstClass(log), f1, descr=<Callf . f EF=2>)
f3 = call_f(ConstClass(log10), f1, descr=<Callf . f EF=2>)
f4 = float_sub(f2, f3)
f5 = float_add(f0, f4)
i4 = int_add(i0, 1)
guard_not_invalidated?
ticker0 = getfield_raw_i(#, descr=<FieldS pypysig_long_struct_inner.c_value .*>)
ticker_cond0 = int_lt(ticker0, 0)
guard_false(ticker_cond0, descr=...)
jump(..., descr=...)
____________________________ TestMath.test_sin_cos ____________________________
self = <pypy.module.pypyjit.test_pypy_c.test_math.TestMath object at 0x000001f1bef75f68>
def test_sin_cos(self):
def main(n):
import math
i = 1
s = 0.0
while i < n:
s += math.sin(i) - math.cos(i)
i += 1
return s
log = self.run(main, [500])
assert round(log.result, 6) == round(main(500), 6)
loop, = log.loops_by_filename(self.filepath)
> assert loop.match("""
i2 = int_lt(i0, i1)
guard_true(i2, descr=...)
guard_not_invalidated(descr=...)
f1 = cast_int_to_float(i0)
i6 = --ISINF--(f1)
guard_false(i6, descr=...)
f2 = call_f(ConstClass(sin), f1, descr=<Callf . f EF=0>)
f3 = call_f(ConstClass(cos), f1, descr=<Callf . f EF=0>)
f4 = float_sub(f2, f3)
f5 = float_add(f0, f4)
i7 = int_add(i0, 1)
--TICK--
jump(..., descr=)
""")
pypy\module\pypyjit\test_pypy_c\test_math.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pypy\module\pypyjit\test_pypy_c\model.py:186: in match
return matcher.match(expected_src, **kwds)
pypy\module\pypyjit\test_pypy_c\model.py:527: in match
self.match_loop(expected_ops, ignore_ops)
pypy\module\pypyjit\test_pypy_c\model.py:503: in match_loop
self.match_op(op, exp_op)
pypy\module\pypyjit\test_pypy_c\model.py:420: in match_op
self._assert(self.match_var(arg, exp_arg), "variable mismatch: %r instead of %r" % (arg, exp_arg))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.module.pypyjit.test_pypy_c.model.OpMatcher object at 0x000001f1be99af38>
cond = False
message = "variable mismatch: 'ConstClass(ccall_sin)' instead of 'ConstClass(sin)'"
def _assert(self, cond, message):
if not cond:
> raise InvalidMatch(message, frame=sys._getframe(1))
E InvalidMatch: variable mismatch: 'ConstClass(ccall_sin)' instead of 'ConstClass(sin)'
pypy\module\pypyjit\test_pypy_c\model.py:405: InvalidMatch
---------------------------- Captured stdout call -----------------------------
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Loops don't match
=================
loop id = None
("variable mismatch: 'ConstClass(ccall_sin)' instead of 'ConstClass(sin)'",)
<could not determine information>
Ignore ops: []
Got:
i57 = int_lt(i52, i31)
guard_true(i57, descr=<Guard0x20e090e6260>)
guard_not_invalidated(descr=<Guard0x20e090e0dd0>)
f58 = cast_int_to_float(i52)
f60 = float_add(f58, 11235582092889474423308157442431404585112356118389416079589380072358292237843810195794279832650471001320007117491962084853674360550901038905802964414967132773610493339054092829768888725077880882465817684505312860552384417646403930092119569408801702322709406917786643639996702871154982269052209770601514008576.000000)
i61 = float_eq(f60, f58)
guard_false(i61, descr=<Guard0x20e090e0e30>)
===== HERE =====
f63 = call_f(ConstClass(ccall_sin), f58, descr=<Callf 8 f EF=2>)
f65 = call_f(ConstClass(ccall_cos), f58, descr=<Callf 8 f EF=2>)
f66 = float_sub(f63, f65)
f67 = float_add(f50, f66)
i69 = int_add(i52, 1)
i71 = getfield_raw_i(140711600789008, descr=<FieldS pypysig_long_struct_inner.c_value 0>)
i73 = int_lt(i71, 0)
guard_false(i73, descr=<Guard0x20e090e62a8>)
jump(p0, p1, p6, p7, p10, p12, i69, f67, i31, descr=TargetToken(2259304726624))
Expected:
i2 = int_lt(i0, i1)
guard_true(i2, descr=...)
guard_not_invalidated(descr=...)
f1 = cast_int_to_float(i0)
f1\B999 = float_add(f1, ...)
i6 = float_eq(f1\B999, f1)
guard_false(i6, descr=...)
f2 = call_f(ConstClass(sin), f1, descr=<Callf . f EF=0>)
f3 = call_f(ConstClass(cos), f1, descr=<Callf . f EF=0>)
f4 = float_sub(f2, f3)
f5 = float_add(f0, f4)
i7 = int_add(i0, 1)
guard_not_invalidated?
ticker0 = getfield_raw_i(#, descr=<FieldS pypysig_long_struct_inner.c_value .*>)
ticker_cond0 = int_lt(ticker0, 0)
guard_false(ticker_cond0, descr=...)
jump(..., descr=)
___________________ TestMicroNumPy.test_reduce_logical_xor ____________________
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x000001f1becc4e20>
def test_reduce_logical_xor(self):
def main():
import _numpypy.multiarray as np
import _numpypy.umath as um
arr = np.array([1.0] * 1500)
return um.logical_xor.reduce(arr)
> log = self.run(main, [])
pypy\module\pypyjit\test_pypy_c\test_micronumpy.py:146:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x000001f1becc4e20>
func_or_src = <function main at 0x000001f1c1fa4728>, args = []
import_site = False, discard_stdout_before_last_line = False
jitopts = {'disable_unrolling': 9999, 'threshold': 200}
src = <py._code.source.Source object at 0x000001f1bec7e608>, funcname = 'main'
arglist = ''
f = <closed file 'd:\\systemtemp\\pytest\\usession-win-rpython-500\\test-pypy-jit\\test_reduce_logical_xor.py', mode 'w' at 0x000001f1c1fa47a0>
logfile = local('d:\\systemtemp\\pytest\\usession-win-rpython-500\\test-pypy-jit\\test_reduce_logical_xor.log')
cmdline = ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\pypy\\goal\\pypy-c.exe', '-S', '--jit', 'threshold=...disable_unrolling=9999', 'd:\\systemtemp\\pytest\\usession-win-rpython-500\\test-pypy-jit\\test_reduce_logical_xor.py']
key = 'disable_unrolling'
def run(self, func_or_src, args=[], import_site=False,
discard_stdout_before_last_line=False, **jitopts):
jitopts.setdefault('threshold', 200)
jitopts.setdefault('disable_unrolling', 9999)
src = py.code.Source(func_or_src)
if isinstance(func_or_src, types.FunctionType):
funcname = func_or_src.func_name
else:
funcname = 'main'
# write the snippet
arglist = ', '.join(map(repr, args))
with self.filepath.open("w") as f:
# we don't want to see the small bridges created
# by the checkinterval reaching the limit
f.write("import sys\n")
f.write("sys.setcheckinterval(10000000)\n")
f.write(str(src) + "\n")
f.write("print %s(%s)\n" % (funcname, arglist))
#
# run a child pypy-c with logging enabled
logfile = self.filepath.new(ext='.log')
#
cmdline = [sys.executable]
if not import_site:
cmdline.append('-S')
if jitopts:
jitcmdline = ['%s=%s' % (key, value)
for key, value in jitopts.items()]
cmdline += ['--jit', ','.join(jitcmdline)]
cmdline.append(str(self.filepath))
#
env = os.environ.copy()
# TODO old logging system
env['PYPYLOG'] = self.log_string + ':' + str(logfile)
jitlogfile = str(logfile) + '.jlog'
env['JITLOG'] = str(jitlogfile)
pipe = subprocess.Popen(cmdline,
env=env,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
stdout, stderr = pipe.communicate()
if pipe.wait() < 0:
raise IOError("subprocess was killed by signal %d" % (
pipe.returncode,))
if stderr.startswith('SKIP:'):
py.test.skip(stderr)
#if stderr.startswith('debug_alloc.h:'): # lldebug builds
# stderr = ''
#assert not stderr
if stderr:
print '*** stderr of the subprocess: ***'
print stderr
#
if discard_stdout_before_last_line:
stdout = stdout.splitlines(True)[-1]
#
# parse the JIT log
rawlog = logparser.parse_log_file(str(logfile), verbose=False)
rawtraces = logparser.extract_category(rawlog, 'jit-log-opt-')
log = Log(rawtraces)
> log.result = eval(stdout)
E File "<string>", line 0
E
E ^
E SyntaxError: invalid syntax
pypy\module\pypyjit\test_pypy_c\test_00_model.py:88: SyntaxError
---------------------------- Captured stdout call -----------------------------
*** stderr of the subprocess: ***
Traceback (most recent call last):
File "d:\systemtemp\pytest\usession-win-rpython-500\test-pypy-jit\test_reduce_logical_xor.py", line 8, in <module>
print main()
File "d:\systemtemp\pytest\usession-win-rpython-500\test-pypy-jit\test_reduce_logical_xor.py", line 4, in main
import _numpypy.multiarray as np
ImportError: No module named _numpypy
___________________ TestMicroNumPy.test_reduce_logical_and ____________________
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x000001f1bf447520>
def test_reduce_logical_and(self):
def main():
import _numpypy.multiarray as np
import _numpypy.umath as um
arr = np.array([1.0] * 1500)
return um.logical_and.reduce(arr)
> log = self.run(main, [])
pypy\module\pypyjit\test_pypy_c\test_micronumpy.py:206:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x000001f1bf447520>
func_or_src = <function main at 0x000001f1c1f7ef20>, args = []
import_site = False, discard_stdout_before_last_line = False
jitopts = {'disable_unrolling': 9999, 'threshold': 200}
src = <py._code.source.Source object at 0x000001f1bf447558>, funcname = 'main'
arglist = ''
f = <closed file 'd:\\systemtemp\\pytest\\usession-win-rpython-500\\test-pypy-jit\\test_reduce_logical_and.py', mode 'w' at 0x000001f1c1f7ef98>
logfile = local('d:\\systemtemp\\pytest\\usession-win-rpython-500\\test-pypy-jit\\test_reduce_logical_and.log')
cmdline = ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\pypy\\goal\\pypy-c.exe', '-S', '--jit', 'threshold=...disable_unrolling=9999', 'd:\\systemtemp\\pytest\\usession-win-rpython-500\\test-pypy-jit\\test_reduce_logical_and.py']
key = 'disable_unrolling'
def run(self, func_or_src, args=[], import_site=False,
discard_stdout_before_last_line=False, **jitopts):
jitopts.setdefault('threshold', 200)
jitopts.setdefault('disable_unrolling', 9999)
src = py.code.Source(func_or_src)
if isinstance(func_or_src, types.FunctionType):
funcname = func_or_src.func_name
else:
funcname = 'main'
# write the snippet
arglist = ', '.join(map(repr, args))
with self.filepath.open("w") as f:
# we don't want to see the small bridges created
# by the checkinterval reaching the limit
f.write("import sys\n")
f.write("sys.setcheckinterval(10000000)\n")
f.write(str(src) + "\n")
f.write("print %s(%s)\n" % (funcname, arglist))
#
# run a child pypy-c with logging enabled
logfile = self.filepath.new(ext='.log')
#
cmdline = [sys.executable]
if not import_site:
cmdline.append('-S')
if jitopts:
jitcmdline = ['%s=%s' % (key, value)
for key, value in jitopts.items()]
cmdline += ['--jit', ','.join(jitcmdline)]
cmdline.append(str(self.filepath))
#
env = os.environ.copy()
# TODO old logging system
env['PYPYLOG'] = self.log_string + ':' + str(logfile)
jitlogfile = str(logfile) + '.jlog'
env['JITLOG'] = str(jitlogfile)
pipe = subprocess.Popen(cmdline,
env=env,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
stdout, stderr = pipe.communicate()
if pipe.wait() < 0:
raise IOError("subprocess was killed by signal %d" % (
pipe.returncode,))
if stderr.startswith('SKIP:'):
py.test.skip(stderr)
#if stderr.startswith('debug_alloc.h:'): # lldebug builds
# stderr = ''
#assert not stderr
if stderr:
print '*** stderr of the subprocess: ***'
print stderr
#
if discard_stdout_before_last_line:
stdout = stdout.splitlines(True)[-1]
#
# parse the JIT log
rawlog = logparser.parse_log_file(str(logfile), verbose=False)
rawtraces = logparser.extract_category(rawlog, 'jit-log-opt-')
log = Log(rawtraces)
> log.result = eval(stdout)
E File "<string>", line 0
E
E ^
E SyntaxError: invalid syntax
pypy\module\pypyjit\test_pypy_c\test_00_model.py:88: SyntaxError
---------------------------- Captured stdout call -----------------------------
*** stderr of the subprocess: ***
Traceback (most recent call last):
File "d:\systemtemp\pytest\usession-win-rpython-500\test-pypy-jit\test_reduce_logical_and.py", line 8, in <module>
print main()
File "d:\systemtemp\pytest\usession-win-rpython-500\test-pypy-jit\test_reduce_logical_and.py", line 4, in main
import _numpypy.multiarray as np
ImportError: No module named _numpypy
___________________ TestMicroNumPy.test_array_getitem_basic ___________________
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x000001f1c1dece90>
def test_array_getitem_basic(self):
def main():
import _numpypy.multiarray as np
arr = np.zeros((300, 300))
x = 150
y = 0
while y < 300:
a = arr[x, y]
y += 1
return a
> log = self.run(main, [])
pypy\module\pypyjit\test_pypy_c\test_micronumpy.py:262:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x000001f1c1dece90>
func_or_src = <function main at 0x000001f1c52573d0>, args = []
import_site = False, discard_stdout_before_last_line = False
jitopts = {'disable_unrolling': 9999, 'threshold': 200}
src = <py._code.source.Source object at 0x000001f1c1decec8>, funcname = 'main'
arglist = ''
f = <closed file 'd:\\systemtemp\\pytest\\usession-win-rpython-500\\test-pypy-jit\\test_array_getitem_basic.py', mode 'w' at 0x000001f1c5257448>
logfile = local('d:\\systemtemp\\pytest\\usession-win-rpython-500\\test-pypy-jit\\test_array_getitem_basic.log')
cmdline = ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\pypy\\goal\\pypy-c.exe', '-S', '--jit', 'threshold=...isable_unrolling=9999', 'd:\\systemtemp\\pytest\\usession-win-rpython-500\\test-pypy-jit\\test_array_getitem_basic.py']
key = 'disable_unrolling'
def run(self, func_or_src, args=[], import_site=False,
discard_stdout_before_last_line=False, **jitopts):
jitopts.setdefault('threshold', 200)
jitopts.setdefault('disable_unrolling', 9999)
src = py.code.Source(func_or_src)
if isinstance(func_or_src, types.FunctionType):
funcname = func_or_src.func_name
else:
funcname = 'main'
# write the snippet
arglist = ', '.join(map(repr, args))
with self.filepath.open("w") as f:
# we don't want to see the small bridges created
# by the checkinterval reaching the limit
f.write("import sys\n")
f.write("sys.setcheckinterval(10000000)\n")
f.write(str(src) + "\n")
f.write("print %s(%s)\n" % (funcname, arglist))
#
# run a child pypy-c with logging enabled
logfile = self.filepath.new(ext='.log')
#
cmdline = [sys.executable]
if not import_site:
cmdline.append('-S')
if jitopts:
jitcmdline = ['%s=%s' % (key, value)
for key, value in jitopts.items()]
cmdline += ['--jit', ','.join(jitcmdline)]
cmdline.append(str(self.filepath))
#
env = os.environ.copy()
# TODO old logging system
env['PYPYLOG'] = self.log_string + ':' + str(logfile)
jitlogfile = str(logfile) + '.jlog'
env['JITLOG'] = str(jitlogfile)
pipe = subprocess.Popen(cmdline,
env=env,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
stdout, stderr = pipe.communicate()
if pipe.wait() < 0:
raise IOError("subprocess was killed by signal %d" % (
pipe.returncode,))
if stderr.startswith('SKIP:'):
py.test.skip(stderr)
#if stderr.startswith('debug_alloc.h:'): # lldebug builds
# stderr = ''
#assert not stderr
if stderr:
print '*** stderr of the subprocess: ***'
print stderr
#
if discard_stdout_before_last_line:
stdout = stdout.splitlines(True)[-1]
#
# parse the JIT log
rawlog = logparser.parse_log_file(str(logfile), verbose=False)
rawtraces = logparser.extract_category(rawlog, 'jit-log-opt-')
log = Log(rawtraces)
> log.result = eval(stdout)
E File "<string>", line 0
E
E ^
E SyntaxError: invalid syntax
pypy\module\pypyjit\test_pypy_c\test_00_model.py:88: SyntaxError
---------------------------- Captured stdout call -----------------------------
*** stderr of the subprocess: ***
Traceback (most recent call last):
File "d:\systemtemp\pytest\usession-win-rpython-500\test-pypy-jit\test_array_getitem_basic.py", line 12, in <module>
print main()
File "d:\systemtemp\pytest\usession-win-rpython-500\test-pypy-jit\test_array_getitem_basic.py", line 4, in main
import _numpypy.multiarray as np
ImportError: No module named _numpypy
________________ TestMicroNumPy.test_array_getitem_accumulate _________________
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x000001f1c078e790>
def test_array_getitem_accumulate(self):
"""Check that operations/ufuncs on array items are jitted correctly"""
def main():
import _numpypy.multiarray as np
arr = np.zeros((300, 300))
a = 0.0
x = 150
y = 0
while y < 300:
a += arr[x, y]
y += 1
return a
> log = self.run(main, [])
pypy\module\pypyjit\test_pypy_c\test_micronumpy.py:302:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x000001f1c078e790>
func_or_src = <function main at 0x000001f1bf27bcb8>, args = []
import_site = False, discard_stdout_before_last_line = False
jitopts = {'disable_unrolling': 9999, 'threshold': 200}
src = <py._code.source.Source object at 0x000001f1c078e7c8>, funcname = 'main'
arglist = ''
f = <closed file 'd:\\systemtemp\\pytest\\usession-win-rpython-500\\test-pypy-jit\\test_array_getitem_accumulate.py', mode 'w' at 0x000001f1bf27bd30>
logfile = local('d:\\systemtemp\\pytest\\usession-win-rpython-500\\test-pypy-jit\\test_array_getitem_accumulate.log')
cmdline = ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\pypy\\goal\\pypy-c.exe', '-S', '--jit', 'threshold=...e_unrolling=9999', 'd:\\systemtemp\\pytest\\usession-win-rpython-500\\test-pypy-jit\\test_array_getitem_accumulate.py']
key = 'disable_unrolling'
def run(self, func_or_src, args=[], import_site=False,
discard_stdout_before_last_line=False, **jitopts):
jitopts.setdefault('threshold', 200)
jitopts.setdefault('disable_unrolling', 9999)
src = py.code.Source(func_or_src)
if isinstance(func_or_src, types.FunctionType):
funcname = func_or_src.func_name
else:
funcname = 'main'
# write the snippet
arglist = ', '.join(map(repr, args))
with self.filepath.open("w") as f:
# we don't want to see the small bridges created
# by the checkinterval reaching the limit
f.write("import sys\n")
f.write("sys.setcheckinterval(10000000)\n")
f.write(str(src) + "\n")
f.write("print %s(%s)\n" % (funcname, arglist))
#
# run a child pypy-c with logging enabled
logfile = self.filepath.new(ext='.log')
#
cmdline = [sys.executable]
if not import_site:
cmdline.append('-S')
if jitopts:
jitcmdline = ['%s=%s' % (key, value)
for key, value in jitopts.items()]
cmdline += ['--jit', ','.join(jitcmdline)]
cmdline.append(str(self.filepath))
#
env = os.environ.copy()
# TODO old logging system
env['PYPYLOG'] = self.log_string + ':' + str(logfile)
jitlogfile = str(logfile) + '.jlog'
env['JITLOG'] = str(jitlogfile)
pipe = subprocess.Popen(cmdline,
env=env,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
stdout, stderr = pipe.communicate()
if pipe.wait() < 0:
raise IOError("subprocess was killed by signal %d" % (
pipe.returncode,))
if stderr.startswith('SKIP:'):
py.test.skip(stderr)
#if stderr.startswith('debug_alloc.h:'): # lldebug builds
# stderr = ''
#assert not stderr
if stderr:
print '*** stderr of the subprocess: ***'
print stderr
#
if discard_stdout_before_last_line:
stdout = stdout.splitlines(True)[-1]
#
# parse the JIT log
rawlog = logparser.parse_log_file(str(logfile), verbose=False)
rawtraces = logparser.extract_category(rawlog, 'jit-log-opt-')
log = Log(rawtraces)
> log.result = eval(stdout)
E File "<string>", line 0
E
E ^
E SyntaxError: invalid syntax
pypy\module\pypyjit\test_pypy_c\test_00_model.py:88: SyntaxError
---------------------------- Captured stdout call -----------------------------
*** stderr of the subprocess: ***
Traceback (most recent call last):
File "d:\systemtemp\pytest\usession-win-rpython-500\test-pypy-jit\test_array_getitem_accumulate.py", line 13, in <module>
print main()
File "d:\systemtemp\pytest\usession-win-rpython-500\test-pypy-jit\test_array_getitem_accumulate.py", line 4, in main
import _numpypy.multiarray as np
ImportError: No module named _numpypy
___________________ TestMicroNumPy.test_array_flatiter_next ___________________
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x000001f1c0fe1b08>
def test_array_flatiter_next(self):
def main():
import _numpypy.multiarray as np
arr = np.zeros((1024, 16)) + 42
ai = arr.flat
i = 0
while i < arr.size:
a = next(ai)
i += 1
return a
> log = self.run(main, [])
pypy\module\pypyjit\test_pypy_c\test_micronumpy.py:341:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x000001f1c0fe1b08>
func_or_src = <function main at 0x000001f1c12a9c40>, args = []
import_site = False, discard_stdout_before_last_line = False
jitopts = {'disable_unrolling': 9999, 'threshold': 200}
src = <py._code.source.Source object at 0x000001f1c0fe1b78>, funcname = 'main'
arglist = ''
f = <closed file 'd:\\systemtemp\\pytest\\usession-win-rpython-500\\test-pypy-jit\\test_array_flatiter_next.py', mode 'w' at 0x000001f1c12a9cb8>
logfile = local('d:\\systemtemp\\pytest\\usession-win-rpython-500\\test-pypy-jit\\test_array_flatiter_next.log')
cmdline = ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\pypy\\goal\\pypy-c.exe', '-S', '--jit', 'threshold=...isable_unrolling=9999', 'd:\\systemtemp\\pytest\\usession-win-rpython-500\\test-pypy-jit\\test_array_flatiter_next.py']
key = 'disable_unrolling'
def run(self, func_or_src, args=[], import_site=False,
discard_stdout_before_last_line=False, **jitopts):
jitopts.setdefault('threshold', 200)
jitopts.setdefault('disable_unrolling', 9999)
src = py.code.Source(func_or_src)
if isinstance(func_or_src, types.FunctionType):
funcname = func_or_src.func_name
else:
funcname = 'main'
# write the snippet
arglist = ', '.join(map(repr, args))
with self.filepath.open("w") as f:
# we don't want to see the small bridges created
# by the checkinterval reaching the limit
f.write("import sys\n")
f.write("sys.setcheckinterval(10000000)\n")
f.write(str(src) + "\n")
f.write("print %s(%s)\n" % (funcname, arglist))
#
# run a child pypy-c with logging enabled
logfile = self.filepath.new(ext='.log')
#
cmdline = [sys.executable]
if not import_site:
cmdline.append('-S')
if jitopts:
jitcmdline = ['%s=%s' % (key, value)
for key, value in jitopts.items()]
cmdline += ['--jit', ','.join(jitcmdline)]
cmdline.append(str(self.filepath))
#
env = os.environ.copy()
# TODO old logging system
env['PYPYLOG'] = self.log_string + ':' + str(logfile)
jitlogfile = str(logfile) + '.jlog'
env['JITLOG'] = str(jitlogfile)
pipe = subprocess.Popen(cmdline,
env=env,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
stdout, stderr = pipe.communicate()
if pipe.wait() < 0:
raise IOError("subprocess was killed by signal %d" % (
pipe.returncode,))
if stderr.startswith('SKIP:'):
py.test.skip(stderr)
#if stderr.startswith('debug_alloc.h:'): # lldebug builds
# stderr = ''
#assert not stderr
if stderr:
print '*** stderr of the subprocess: ***'
print stderr
#
if discard_stdout_before_last_line:
stdout = stdout.splitlines(True)[-1]
#
# parse the JIT log
rawlog = logparser.parse_log_file(str(logfile), verbose=False)
rawtraces = logparser.extract_category(rawlog, 'jit-log-opt-')
log = Log(rawtraces)
> log.result = eval(stdout)
E File "<string>", line 0
E
E ^
E SyntaxError: invalid syntax
pypy\module\pypyjit\test_pypy_c\test_00_model.py:88: SyntaxError
---------------------------- Captured stdout call -----------------------------
*** stderr of the subprocess: ***
Traceback (most recent call last):
File "d:\systemtemp\pytest\usession-win-rpython-500\test-pypy-jit\test_array_flatiter_next.py", line 12, in <module>
print main()
File "d:\systemtemp\pytest\usession-win-rpython-500\test-pypy-jit\test_array_flatiter_next.py", line 4, in main
import _numpypy.multiarray as np
ImportError: No module named _numpypy
______________ TestMicroNumPy.test_array_flatiter_getitem_single ______________
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x000001f1bf473130>
def test_array_flatiter_getitem_single(self):
def main():
import _numpypy.multiarray as np
arr = np.zeros((1024, 16)) + 42
ai = arr.flat
i = 0
while i < arr.size:
a = ai[i] # ID: getitem
i += 1
return a
> log = self.run(main, [])
pypy\module\pypyjit\test_pypy_c\test_micronumpy.py:373:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x000001f1bf473130>
func_or_src = <function main at 0x000001f1c0c446b0>, args = []
import_site = False, discard_stdout_before_last_line = False
jitopts = {'disable_unrolling': 9999, 'threshold': 200}
src = <py._code.source.Source object at 0x000001f1bf473168>, funcname = 'main'
arglist = ''
f = <closed file 'd:\\systemtemp\\pytest\\usession-win-rpython-500\\test-pypy-jit\\test_array_flatiter_getitem_single.py', mode 'w' at 0x000001f1c0c44728>
logfile = local('d:\\systemtemp\\pytest\\usession-win-rpython-500\\test-pypy-jit\\test_array_flatiter_getitem_single.log')
cmdline = ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\pypy\\goal\\pypy-c.exe', '-S', '--jit', 'threshold=...olling=9999', 'd:\\systemtemp\\pytest\\usession-win-rpython-500\\test-pypy-jit\\test_array_flatiter_getitem_single.py']
key = 'disable_unrolling'
def run(self, func_or_src, args=[], import_site=False,
discard_stdout_before_last_line=False, **jitopts):
jitopts.setdefault('threshold', 200)
jitopts.setdefault('disable_unrolling', 9999)
src = py.code.Source(func_or_src)
if isinstance(func_or_src, types.FunctionType):
funcname = func_or_src.func_name
else:
funcname = 'main'
# write the snippet
arglist = ', '.join(map(repr, args))
with self.filepath.open("w") as f:
# we don't want to see the small bridges created
# by the checkinterval reaching the limit
f.write("import sys\n")
f.write("sys.setcheckinterval(10000000)\n")
f.write(str(src) + "\n")
f.write("print %s(%s)\n" % (funcname, arglist))
#
# run a child pypy-c with logging enabled
logfile = self.filepath.new(ext='.log')
#
cmdline = [sys.executable]
if not import_site:
cmdline.append('-S')
if jitopts:
jitcmdline = ['%s=%s' % (key, value)
for key, value in jitopts.items()]
cmdline += ['--jit', ','.join(jitcmdline)]
cmdline.append(str(self.filepath))
#
env = os.environ.copy()
# TODO old logging system
env['PYPYLOG'] = self.log_string + ':' + str(logfile)
jitlogfile = str(logfile) + '.jlog'
env['JITLOG'] = str(jitlogfile)
pipe = subprocess.Popen(cmdline,
env=env,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
stdout, stderr = pipe.communicate()
if pipe.wait() < 0:
raise IOError("subprocess was killed by signal %d" % (
pipe.returncode,))
if stderr.startswith('SKIP:'):
py.test.skip(stderr)
#if stderr.startswith('debug_alloc.h:'): # lldebug builds
# stderr = ''
#assert not stderr
if stderr:
print '*** stderr of the subprocess: ***'
print stderr
#
if discard_stdout_before_last_line:
stdout = stdout.splitlines(True)[-1]
#
# parse the JIT log
rawlog = logparser.parse_log_file(str(logfile), verbose=False)
rawtraces = logparser.extract_category(rawlog, 'jit-log-opt-')
log = Log(rawtraces)
> log.result = eval(stdout)
E File "<string>", line 0
E
E ^
E SyntaxError: invalid syntax
pypy\module\pypyjit\test_pypy_c\test_00_model.py:88: SyntaxError
---------------------------- Captured stdout call -----------------------------
*** stderr of the subprocess: ***
Traceback (most recent call last):
File "d:\systemtemp\pytest\usession-win-rpython-500\test-pypy-jit\test_array_flatiter_getitem_single.py", line 12, in <module>
print main()
File "d:\systemtemp\pytest\usession-win-rpython-500\test-pypy-jit\test_array_flatiter_getitem_single.py", line 4, in main
import _numpypy.multiarray as np
ImportError: No module named _numpypy
______________ TestMicroNumPy.test_array_flatiter_setitem_single ______________
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x000001f1beea3558>
def test_array_flatiter_setitem_single(self):
def main():
import _numpypy.multiarray as np
arr = np.empty((1024, 16))
ai = arr.flat
i = 0
while i < arr.size:
ai[i] = 42.0
i += 1
return ai[-1]
> log = self.run(main, [])
pypy\module\pypyjit\test_pypy_c\test_micronumpy.py:395:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x000001f1beea3558>
func_or_src = <function main at 0x000001f1c0c23178>, args = []
import_site = False, discard_stdout_before_last_line = False
jitopts = {'disable_unrolling': 9999, 'threshold': 200}
src = <py._code.source.Source object at 0x000001f1beea3590>, funcname = 'main'
arglist = ''
f = <closed file 'd:\\systemtemp\\pytest\\usession-win-rpython-500\\test-pypy-jit\\test_array_flatiter_setitem_single.py', mode 'w' at 0x000001f1c0c231f0>
logfile = local('d:\\systemtemp\\pytest\\usession-win-rpython-500\\test-pypy-jit\\test_array_flatiter_setitem_single.log')
cmdline = ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\pypy\\goal\\pypy-c.exe', '-S', '--jit', 'threshold=...olling=9999', 'd:\\systemtemp\\pytest\\usession-win-rpython-500\\test-pypy-jit\\test_array_flatiter_setitem_single.py']
key = 'disable_unrolling'
def run(self, func_or_src, args=[], import_site=False,
discard_stdout_before_last_line=False, **jitopts):
jitopts.setdefault('threshold', 200)
jitopts.setdefault('disable_unrolling', 9999)
src = py.code.Source(func_or_src)
if isinstance(func_or_src, types.FunctionType):
funcname = func_or_src.func_name
else:
funcname = 'main'
# write the snippet
arglist = ', '.join(map(repr, args))
with self.filepath.open("w") as f:
# we don't want to see the small bridges created
# by the checkinterval reaching the limit
f.write("import sys\n")
f.write("sys.setcheckinterval(10000000)\n")
f.write(str(src) + "\n")
f.write("print %s(%s)\n" % (funcname, arglist))
#
# run a child pypy-c with logging enabled
logfile = self.filepath.new(ext='.log')
#
cmdline = [sys.executable]
if not import_site:
cmdline.append('-S')
if jitopts:
jitcmdline = ['%s=%s' % (key, value)
for key, value in jitopts.items()]
cmdline += ['--jit', ','.join(jitcmdline)]
cmdline.append(str(self.filepath))
#
env = os.environ.copy()
# TODO old logging system
env['PYPYLOG'] = self.log_string + ':' + str(logfile)
jitlogfile = str(logfile) + '.jlog'
env['JITLOG'] = str(jitlogfile)
pipe = subprocess.Popen(cmdline,
env=env,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
stdout, stderr = pipe.communicate()
if pipe.wait() < 0:
raise IOError("subprocess was killed by signal %d" % (
pipe.returncode,))
if stderr.startswith('SKIP:'):
py.test.skip(stderr)
#if stderr.startswith('debug_alloc.h:'): # lldebug builds
# stderr = ''
#assert not stderr
if stderr:
print '*** stderr of the subprocess: ***'
print stderr
#
if discard_stdout_before_last_line:
stdout = stdout.splitlines(True)[-1]
#
# parse the JIT log
rawlog = logparser.parse_log_file(str(logfile), verbose=False)
rawtraces = logparser.extract_category(rawlog, 'jit-log-opt-')
log = Log(rawtraces)
> log.result = eval(stdout)
E File "<string>", line 0
E
E ^
E SyntaxError: invalid syntax
pypy\module\pypyjit\test_pypy_c\test_00_model.py:88: SyntaxError
---------------------------- Captured stdout call -----------------------------
*** stderr of the subprocess: ***
Traceback (most recent call last):
File "d:\systemtemp\pytest\usession-win-rpython-500\test-pypy-jit\test_array_flatiter_setitem_single.py", line 12, in <module>
print main()
File "d:\systemtemp\pytest\usession-win-rpython-500\test-pypy-jit\test_array_flatiter_setitem_single.py", line 4, in main
import _numpypy.multiarray as np
ImportError: No module named _numpypy
________________________ TestMicroNumPy.test_mixed_div ________________________
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x000001f1c526f280>
def test_mixed_div(self):
N = 1500
def main():
N = 1500
import _numpypy.multiarray as np
arr = np.zeros(N)
l = [arr[i]/2. for i in range(N)]
return l
> log = self.run(main, [])
pypy\module\pypyjit\test_pypy_c\test_micronumpy.py:427:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x000001f1c526f280>
func_or_src = <function main at 0x000001f1c2ef7b50>, args = []
import_site = False, discard_stdout_before_last_line = False
jitopts = {'disable_unrolling': 9999, 'threshold': 200}
src = <py._code.source.Source object at 0x000001f1c526f2f0>, funcname = 'main'
arglist = ''
f = <closed file 'd:\\systemtemp\\pytest\\usession-win-rpython-500\\test-pypy-jit\\test_mixed_div.py', mode 'w' at 0x000001f1c2ef7bc8>
logfile = local('d:\\systemtemp\\pytest\\usession-win-rpython-500\\test-pypy-jit\\test_mixed_div.log')
cmdline = ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\pypy\\goal\\pypy-c.exe', '-S', '--jit', 'threshold=200,disable_unrolling=9999', 'd:\\systemtemp\\pytest\\usession-win-rpython-500\\test-pypy-jit\\test_mixed_div.py']
key = 'disable_unrolling'
def run(self, func_or_src, args=[], import_site=False,
discard_stdout_before_last_line=False, **jitopts):
jitopts.setdefault('threshold', 200)
jitopts.setdefault('disable_unrolling', 9999)
src = py.code.Source(func_or_src)
if isinstance(func_or_src, types.FunctionType):
funcname = func_or_src.func_name
else:
funcname = 'main'
# write the snippet
arglist = ', '.join(map(repr, args))
with self.filepath.open("w") as f:
# we don't want to see the small bridges created
# by the checkinterval reaching the limit
f.write("import sys\n")
f.write("sys.setcheckinterval(10000000)\n")
f.write(str(src) + "\n")
f.write("print %s(%s)\n" % (funcname, arglist))
#
# run a child pypy-c with logging enabled
logfile = self.filepath.new(ext='.log')
#
cmdline = [sys.executable]
if not import_site:
cmdline.append('-S')
if jitopts:
jitcmdline = ['%s=%s' % (key, value)
for key, value in jitopts.items()]
cmdline += ['--jit', ','.join(jitcmdline)]
cmdline.append(str(self.filepath))
#
env = os.environ.copy()
# TODO old logging system
env['PYPYLOG'] = self.log_string + ':' + str(logfile)
jitlogfile = str(logfile) + '.jlog'
env['JITLOG'] = str(jitlogfile)
pipe = subprocess.Popen(cmdline,
env=env,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
stdout, stderr = pipe.communicate()
if pipe.wait() < 0:
raise IOError("subprocess was killed by signal %d" % (
pipe.returncode,))
if stderr.startswith('SKIP:'):
py.test.skip(stderr)
#if stderr.startswith('debug_alloc.h:'): # lldebug builds
# stderr = ''
#assert not stderr
if stderr:
print '*** stderr of the subprocess: ***'
print stderr
#
if discard_stdout_before_last_line:
stdout = stdout.splitlines(True)[-1]
#
# parse the JIT log
rawlog = logparser.parse_log_file(str(logfile), verbose=False)
rawtraces = logparser.extract_category(rawlog, 'jit-log-opt-')
log = Log(rawtraces)
> log.result = eval(stdout)
E File "<string>", line 0
E
E ^
E SyntaxError: invalid syntax
pypy\module\pypyjit\test_pypy_c\test_00_model.py:88: SyntaxError
---------------------------- Captured stdout call -----------------------------
*** stderr of the subprocess: ***
Traceback (most recent call last):
File "d:\systemtemp\pytest\usession-win-rpython-500\test-pypy-jit\test_mixed_div.py", line 9, in <module>
print main()
File "d:\systemtemp\pytest\usession-win-rpython-500\test-pypy-jit\test_mixed_div.py", line 5, in main
import _numpypy.multiarray as np
ImportError: No module named _numpypy
______________________ TestMisc.test_stat_result_virtual ______________________
self = <pypy.module.pypyjit.test_pypy_c.test_misc.TestMisc object at 0x000001f1c42de608>
def test_stat_result_virtual(self):
def main(n):
import os
res = 0
for i in range(n):
res += os.path.islink(__file__) # ID: islink
return res
log = self.run(main, [3000])
loop, = log.loops_by_id("islink")
opnames = log.opnames(loop.allops())
# one left (used to be 20+)
> assert opnames.count('new_with_vtable') == 1
E assert 0 == 1
E + where 0 = <bound method list.count of ['int_lt', 'guard_false', 'int_ge', 'guard_false',...nvalidated', 'force_token', 'getfield_raw_i', 'int_lt', 'guard_false', 'jump']>('new_with_vtable')
E + where <bound method list.count of ['int_lt', 'guard_false', 'int_ge', 'guard_false',...nvalidated', 'force_token', 'getfield_raw_i', 'int_lt', 'guard_false', 'jump']> = ['int_lt', 'guard_false', 'int_ge', 'guard_false', 'int_add', 'setfield_gc', ...].count
pypy\module\pypyjit\test_pypy_c\test_misc.py:438: AssertionError
=========================== short test summary info ===========================
FAIL pypy/module/pypyjit/test_pypy_c/test_ffi.py::Test__ffi::()::test__ffi_call_releases_gil
FAIL pypy/module/pypyjit/test_pypy_c/test_getframe.py::TestGetFrame::()::test_current_frames
FAIL pypy/module/pypyjit/test_pypy_c/test_math.py::TestMath::()::test_log
FAIL pypy/module/pypyjit/test_pypy_c/test_math.py::TestMath::()::test_sin_cos
FAIL pypy/module/pypyjit/test_pypy_c/test_micronumpy.py::TestMicroNumPy::()::test_reduce_logical_xor
FAIL pypy/module/pypyjit/test_pypy_c/test_micronumpy.py::TestMicroNumPy::()::test_reduce_logical_and
FAIL pypy/module/pypyjit/test_pypy_c/test_micronumpy.py::TestMicroNumPy::()::test_array_getitem_basic
FAIL pypy/module/pypyjit/test_pypy_c/test_micronumpy.py::TestMicroNumPy::()::test_array_getitem_accumulate
FAIL pypy/module/pypyjit/test_pypy_c/test_micronumpy.py::TestMicroNumPy::()::test_array_flatiter_next
FAIL pypy/module/pypyjit/test_pypy_c/test_micronumpy.py::TestMicroNumPy::()::test_array_flatiter_getitem_single
FAIL pypy/module/pypyjit/test_pypy_c/test_micronumpy.py::TestMicroNumPy::()::test_array_flatiter_setitem_single
FAIL pypy/module/pypyjit/test_pypy_c/test_micronumpy.py::TestMicroNumPy::()::test_mixed_div
FAIL pypy/module/pypyjit/test_pypy_c/test_misc.py::TestMisc::()::test_stat_result_virtual
============ 13 failed, 1039 passed, 155 skipped in 610.61 seconds ============
program finished with exit code 1
elapsedTime=613.140000