Issue 11895: pybench prep_times calculation error (original) (raw)

Issue11895

Created on 2011-04-21 03:20 by termim, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
pybench.patch termim,2011-04-21 03:20 divide prep_times by CALIBRATION_LOOPS review
Messages (3)
msg134192 - (view) Author: Mikhail Terekhov (termim) * Date: 2011-04-21 03:20
For some time now my builds of python 3.2 on x86_64 platform in SuSE OBS are failing depending on the phase of the moon. The spec file for the python3-base package uses 'make profile-opt' command to build and Makefile.pre.in uses pybench.py for profile guided optimization. The pybench.py fails sometimes with the '* Internal Error (use --debug to display the traceback)' error. Adding --debug gives 'calibration setup did not work' i.e. some of the self.overhead_times values in the Test.calibrate_test method became negative. It happens for the NestedForLoops test. The source inspection shows that most probably it was forgotten to divide by CALIBRATION_LOOPS when calculating prep_times. The patch against current head is attached, it solves the problem.
msg134204 - (view) Author: Marc-Andre Lemburg (lemburg) * (Python committer) Date: 2011-04-21 09:30
Mikhail Terekhov wrote: > > New submission from Mikhail Terekhov <termim@gmail.com>: > > For some time now my builds of python 3.2 on x86_64 platform in SuSE OBS are failing depending on the phase of the moon. The spec file for the python3-base package uses 'make profile-opt' command to build and Makefile.pre.in uses pybench.py for profile guided optimization. The pybench.py fails sometimes with the '* Internal Error (use --debug to display the traceback)' error. Adding --debug gives 'calibration setup did not work' i.e. some of the self.overhead_times values in the Test.calibrate_test method became negative. It happens for the NestedForLoops test. The source inspection shows that most probably it was forgotten to divide by CALIBRATION_LOOPS when calculating prep_times. The patch against current head is attached, it solves the problem. Good catch. Your analysis is correct. Interesting that it took more than 6 years to discover this bug... looks like CPUs got more than 20 times faster since back then.
msg134366 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-04-25 01:47
New changeset e4fcfb8066ff by Jesus Cea in branch '2.7': pybench prep_times calculation error (closes #11895) http://hg.python.org/cpython/rev/e4fcfb8066ff New changeset 7569870a8236 by Jesus Cea in branch '3.1': pybench prep_times calculation error (closes #11895) http://hg.python.org/cpython/rev/7569870a8236 New changeset 66ef5e844e6c by Jesus Cea in branch '3.2': pybench prep_times calculation error (closes #11895) http://hg.python.org/cpython/rev/66ef5e844e6c New changeset 8a277949d904 by Jesus Cea in branch 'default': pybench prep_times calculation error (closes #11895) http://hg.python.org/cpython/rev/8a277949d904
History
Date User Action Args
2022-04-11 14:57:16 admin set github: 56104
2011-06-26 13:30:27 sandro.tosi set status: open -> closednosy: + sandro.tosiresolution: acceptedstage: resolved
2011-04-25 01:51:17 jcea set status: closed -> opennosy: + jcearesolution: fixed -> (no value)stage: resolved -> (no value)
2011-04-25 01:47:49 python-dev set status: open -> closednosy: + python-devmessages: + resolution: fixedstage: resolved
2011-04-21 09:30:22 lemburg set nosy: + lemburgmessages: +
2011-04-21 03:20:12 termim create