Thread: [myhdl-list] pypy test_all.py
Brought to you by:
jandecaluwe
From: Bob C. <rcu...@ac...> - 2011-07-05 05:58:19
|
I just downloaded and installed MyHDL 0.7 and pypy under Fedora 15. I first did the install using python, and "python test_all.py" ran without correctly. I repeated the install using pypy, and "pypy test_all.py" ran with 4 errors and 1 fail. The diff of the two runs is: > $ diff python_test_all.out pypy_test_all.out > 284,288c284,288 > < testBackupOutputFile (test_traceSignals.TestTraceSigs) ... ok > < testHierarchicalTrace1 (test_traceSignals.TestTraceSigs) ... ok > < testHierarchicalTrace2 (test_traceSignals.TestTraceSigs) ... ok > < testMultipleTraces (test_traceSignals.TestTraceSigs) ... ok > < testReturnVal (test_traceSignals.TestTraceSigs) ... ok > --- >> testBackupOutputFile (test_traceSignals.TestTraceSigs) ... ERROR >> testHierarchicalTrace1 (test_traceSignals.TestTraceSigs) ... ERROR >> testHierarchicalTrace2 (test_traceSignals.TestTraceSigs) ... ERROR >> testMultipleTraces (test_traceSignals.TestTraceSigs) ... ERROR >> testReturnVal (test_traceSignals.TestTraceSigs) ... FAIL > 349a350,351 >> ====================================================================== >> ERROR: testBackupOutputFile (test_traceSignals.TestTraceSigs) > 351c353,360 > < Ran 285 tests in 32.085s > --- >> Traceback (most recent call last): >> File "/home/bobc/Download/AlienCortex/HDL/MyHDL/myhdl-0.7/myhdl/test/core/test_traceSignals.py", line 143, in testBackupOutputFile >> dut = traceSignals(fun) >> File "/usr/lib/pypy-1.5/site-packages/myhdl/_traceSignals.py", line 76, in __call__ >> h = _HierExtr(name, dut, *args, **kwargs) >> File "/usr/lib/pypy-1.5/site-packages/myhdl/_extractHierarchy.py", line 231, in __init__ >> raise ExtractHierarchyError(_error.NoInstances) >> ExtractHierarchyError: No instances found > 353c362,413 > < OK > --- >> ====================================================================== >> ERROR: testHierarchicalTrace1 (test_traceSignals.TestTraceSigs) >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File "/home/bobc/Download/AlienCortex/HDL/MyHDL/myhdl-0.7/myhdl/test/core/test_traceSignals.py", line 131, in testHierarchicalTrace1 >> top() >> File "/home/bobc/Download/AlienCortex/HDL/MyHDL/myhdl-0.7/myhdl/test/core/test_traceSignals.py", line 59, in top >> inst = traceSignals(fun) >> File "/usr/lib/pypy-1.5/site-packages/myhdl/_traceSignals.py", line 76, in __call__ >> h = _HierExtr(name, dut, *args, **kwargs) >> File "/usr/lib/pypy-1.5/site-packages/myhdl/_extractHierarchy.py", line 231, in __init__ >> raise ExtractHierarchyError(_error.NoInstances) >> ExtractHierarchyError: No instances found >> >> ====================================================================== >> ERROR: testHierarchicalTrace2 (test_traceSignals.TestTraceSigs) >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File "/home/bobc/Download/AlienCortex/HDL/MyHDL/myhdl-0.7/myhdl/test/core/test_traceSignals.py", line 137, in testHierarchicalTrace2 >> dut = traceSignals(top) >> File "/usr/lib/pypy-1.5/site-packages/myhdl/_traceSignals.py", line 76, in __call__ >> h = _HierExtr(name, dut, *args, **kwargs) >> File "/usr/lib/pypy-1.5/site-packages/myhdl/_extractHierarchy.py", line 231, in __init__ >> raise ExtractHierarchyError(_error.NoInstances) >> ExtractHierarchyError: No instances found >> >> ====================================================================== >> ERROR: testMultipleTraces (test_traceSignals.TestTraceSigs) >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File "/home/bobc/Download/AlienCortex/HDL/MyHDL/myhdl-0.7/myhdl/test/core/test_traceSignals.py", line 105, in testMultipleTraces >> dut = top3() >> File "/home/bobc/Download/AlienCortex/HDL/MyHDL/myhdl-0.7/myhdl/test/core/test_traceSignals.py", line 69, in top3 >> inst_1 = traceSignals(fun) >> File "/usr/lib/pypy-1.5/site-packages/myhdl/_traceSignals.py", line 76, in __call__ >> h = _HierExtr(name, dut, *args, **kwargs) >> File "/usr/lib/pypy-1.5/site-packages/myhdl/_extractHierarchy.py", line 231, in __init__ >> raise ExtractHierarchyError(_error.NoInstances) >> ExtractHierarchyError: No instances found >> >> ====================================================================== >> FAIL: testReturnVal (test_traceSignals.TestTraceSigs) >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File "/home/bobc/Download/AlienCortex/HDL/MyHDL/myhdl-0.7/myhdl/test/core/test_traceSignals.py", line 125, in testReturnVal >> self.assertEqual(e.kind, _error.InconsistentToplevel % (2, "dummy")) >> AssertionError: 'No instances found' != 'Inconsistent top level 2 for dummy - should be 1' >> >> ---------------------------------------------------------------------- >> Ran 285 tests in 23.302s >> >> FAILED (failures=1, errors=4) Are these failures expected for the current versions of MyHDL and pypy? Some more info: > $ python --version > Python 2.7.1 > > $ pypy --version > Python 2.7.1 (?, May 02 2011, 19:05:27) > [PyPy 1.5.0-alpha0 with GCC 4.6.0] > > $ lsb_release -a > LSB Version: :core-4.0-ia32:core-4.0-noarch > Distributor ID: Fedora > Description: Fedora release 15 (Lovelock) > Release: 15 > Codename: Lovelock > > $ uname -a > Linux snafu 2.6.38.8-32.fc15.i686.PAE #1 SMP Mon Jun 13 19:55:27 UTC 2011 i686 i686 i386 GNU/Linux TIA, -BobC |
From: Shakthi K. <sha...@gm...> - 2011-07-05 06:05:14
|
Hi, --- On Tue, Jul 5, 2011 at 10:36 AM, Bob Cunningham <rcu...@ac...> wrote: | I just downloaded and installed MyHDL 0.7 and pypy under Fedora 15. | | I first did the install using python, \-- A manual installation using setup.py? MyHDL is available in Fedora as python-myhdl: $ sudo yum install python-myhdl SK -- Shakthi Kannan http://www.shakthimaan.com |
From: Bob C. <Fl...@gm...> - 2011-07-05 06:53:42
|
On 07/04/2011 11:05 PM, Shakthi Kannan wrote: > Hi, > > --- On Tue, Jul 5, 2011 at 10:36 AM, Bob Cunningham<rcu...@ac...> wrote: > | I just downloaded and installed MyHDL 0.7 and pypy under Fedora 15. > | > | I first did the install using python, > \-- > > A manual installation using setup.py? MyHDL is available in Fedora as > python-myhdl: > > $ sudo yum install python-myhdl > > SK I did a manual install because I assumed the package would not install MyHDL for pypy, and I want python and pypy to be the same. Plus, I assumed the download from the MyHDL site would be the latest & greatest. Were my assumptions wrong? -BobC |
From: Shakthi K. <sha...@gm...> - 2011-07-05 06:57:56
|
Hi, --- On Tue, Jul 5, 2011 at 12:23 PM, Bob Cunningham <Fl...@gm...> wrote: | I did a manual install because I assumed the package would not install MyHDL | for pypy, and I want python and pypy to be the same. \-- Okay. --- | Plus, I assumed the download from the MyHDL site would be the latest & | greatest. \-- I packed and pushed MyHDL to Fedora/RHEL repos recently. I will try to push the latest and greatest as they are released. SK -- Shakthi Kannan http://www.shakthimaan.com |
From: Bob C. <Fl...@gm...> - 2011-07-05 07:11:34
|
On 07/04/2011 11:57 PM, Shakthi Kannan wrote: > Hi, > > --- On Tue, Jul 5, 2011 at 12:23 PM, Bob Cunningham<Fl...@gm...> wrote: > | I did a manual install because I assumed the package would not install MyHDL > | for pypy, and I want python and pypy to be the same. > \-- > > Okay. > > --- > | Plus, I assumed the download from the MyHDL site would be the latest& > | greatest. > \-- > > I packed and pushed MyHDL to Fedora/RHEL repos recently. I will try to > push the latest and greatest as they are released. > > SK > Great! Thank-you for being a package maintainer! Any problem with simply soft-linking the python-myhdl install over to pypy? -BobC |
From: Bob C. <Fl...@gm...> - 2011-07-05 07:22:26
|
On 07/05/2011 12:11 AM, Bob Cunningham wrote: > On 07/04/2011 11:57 PM, Shakthi Kannan wrote: >> Hi, >> >> --- On Tue, Jul 5, 2011 at 12:23 PM, Bob Cunningham<Fl...@gm...> wrote: >> | I did a manual install because I assumed the package would not install MyHDL >> | for pypy, and I want python and pypy to be the same. >> \-- >> >> Okay. >> >> --- >> | Plus, I assumed the download from the MyHDL site would be the latest& >> | greatest. >> \-- >> >> I packed and pushed MyHDL to Fedora/RHEL repos recently. I will try to >> push the latest and greatest as they are released. >> >> SK >> > Great! Thank-you for being a package maintainer! > > Any problem with simply soft-linking the python-myhdl install over to pypy? > > -BobC I removed my manual install and installed the python-myhdl package, then soft-linked it to pypy. I noticed that the package install did not include all the files present in the download from the MyHDL site: The test directory is omitted. Perhaps those files could be installed in /opt? I reran test_all.py and got the same results: No python errors, 4 pypy errors. So, back to the original question: Does anyone know why these errors occur with pypy, and are they expected? -BobC |
From: Jan D. <ja...@ja...> - 2011-07-05 08:01:20
|
On 07/05/2011 07:06 AM, Bob Cunningham wrote: > I just downloaded and installed MyHDL 0.7 and pypy under Fedora 15. > > I first did the install using python, and "python test_all.py" ran without correctly. > > I repeated the install using pypy, and "pypy test_all.py" ran with 4 errors and 1 fail. > Are these failures expected for the current versions of MyHDL and pypy? http://myhdl.org/doku.php/performance#installation_hints_and_known_issues -- Jan Decaluwe - Resources bvba - http://www.jandecaluwe.com Python as a HDL: http://www.myhdl.org VHDL development, the modern way: http://www.sigasi.com World-class digital design: http://www.easics.com |
From: Bob C. <Fl...@gm...> - 2011-07-05 08:26:55
|
On 07/05/2011 01:00 AM, Jan Decaluwe wrote: > On 07/05/2011 07:06 AM, Bob Cunningham wrote: >> I just downloaded and installed MyHDL 0.7 and pypy under Fedora 15. >> >> I first did the install using python, and "python test_all.py" ran without correctly. >> >> I repeated the install using pypy, and "pypy test_all.py" ran with 4 errors and 1 fail. >> Are these failures expected for the current versions of MyHDL and pypy? > http://myhdl.org/doku.php/performance#installation_hints_and_known_issues > Is there a known pypy nightly build that passes test_all.py? -BobC |
From: Shakthi K. <sha...@gm...> - 2011-07-05 08:58:01
|
Hi, --- On Tue, Jul 5, 2011 at 1:30 PM, Jan Decaluwe <ja...@ja...> wrote: | http://myhdl.org/doku.php/performance#installation_hints_and_known_issues \-- So, I shall wait for PyPy 1.5.1 to be pushed to Fedora. At present PyPy 1.5 is available from Fedora 15 onwards. But, python-myhdl is available in Fedora 14 as well. SK -- Shakthi Kannan http://www.shakthimaan.com |
From: Bob C. <Fl...@gm...> - 2011-08-23 05:44:52
|
I just noticed PyPy 1.6 is out (http://morepypy.blogspot.com/2011/08/pypy-16-kickass-panda.html). I volunteer to test the new RPM when it is ready! I can't wait to run "pypy test_all.py" again... -BobC |
From: Bob C. <Fl...@gm...> - 2011-08-23 05:56:17
|
I got impatient and grabbed pypy 1.6 & pypy-libs 1.6 from Rawhide(fc17) and installed them into my fc15 system: $ pypy --version Python 2.7.1 (?, Aug 19 2011, 23:16:54) [PyPy 1.6.0 with GCC 4.6.1] $ pypy ./test_all.py ... Delete many lines ending in 'ok' ... ---------------------------------------------------------------------- Ran 285 tests in 50.190s OK Yay! -BobC |
From: Bob C. <Fl...@gm...> - 2011-08-23 06:44:55
|
For comparison purposes, on my system: $ python --version Python 2.7.1 $ python ./test_all.py ... Delete many lines ending in 'ok' ... ---------------------------------------------------------------------- Ran 285 tests in 66.255s OK -BobC On 08/22/2011 10:56 PM, Bob Cunningham wrote: > I got impatient and grabbed pypy 1.6& pypy-libs 1.6 from Rawhide(fc17) and installed them into my fc15 system: > > $ pypy --version > Python 2.7.1 (?, Aug 19 2011, 23:16:54) > [PyPy 1.6.0 with GCC 4.6.1] > > $ pypy ./test_all.py > ... Delete many lines ending in 'ok' ... > ---------------------------------------------------------------------- > Ran 285 tests in 50.190s > > OK > > Yay! > > -BobC > > > ------------------------------------------------------------------------------ > Get a FREE DOWNLOAD! and learn more about uberSVN rich system, > user administration capabilities and model configuration. Take > the hassle out of deploying and managing Subversion and the > tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 > _______________________________________________ > myhdl-list mailing list > myh...@li... > https://lists.sourceforge.net/lists/listinfo/myhdl-list > |
From: Christopher F. <chr...@gm...> - 2011-08-24 13:17:17
|
>> $ pypy --version >> Python 2.7.1 (?, Aug 19 2011, 23:16:54) >> [PyPy 1.6.0 with GCC 4.6.1] >> >> $ pypy ./test_all.py >> ... Delete many lines ending in 'ok' ... >> ---------------------------------------------------------------------- >> Ran 285 tests in 50.190s >> >> OK >> >> Yay! >> >> -BobC Thanks for the update! D'oh pypy is slightly slower on test_all.py. I ran one of my projects and it was slightly faster with the pypy 1.6 release versus the 1.5 release. It looks like full MyHDL support in pypy 1.6, *pypy* is pretty damn cool. Regards, Chris |
From: Bob C. <Fl...@gm...> - 2011-07-05 10:22:44
|
On 07/05/2011 01:26 AM, Bob Cunningham wrote: > On 07/05/2011 01:00 AM, Jan Decaluwe wrote: >> On 07/05/2011 07:06 AM, Bob Cunningham wrote: >>> I just downloaded and installed MyHDL 0.7 and pypy under Fedora 15. >>> >>> I first did the install using python, and "python test_all.py" ran without correctly. >>> >>> I repeated the install using pypy, and "pypy test_all.py" ran with 4 errors and 1 fail. >>> Are these failures expected for the current versions of MyHDL and pypy? >> http://myhdl.org/doku.php/performance#installation_hints_and_known_issues >> > Is there a known pypy nightly build that passes test_all.py I just cloned the pypy repository and built the pypy tip (and found a new love for the ASCII Mandelbrot). Though there were a gazillion warnings, the build completed. I ran the following: $ ./pypy-c Python 2.7.1 (2630c86662b4, Jul 05 2011, 08:25:11) [PyPy 1.5.0-alpha0 with GCC 4.6.0] on linux2 Type "help", "copyright", "credits" or "license" for more information. And now for something completely different: ``- how will the fact that they are used in our repl change our topics?'' >>>> 46 - 4 42 >>>> from test import pystone >>>> pystone.main() Pystone(1.1) time for 50000 passes = 0.381942 This machine benchmarks at 130910 pystones/second So the new pypy-c is at least minimally functional. Next, I manually installed myhdl for the new pypy-c executable, without error. Then I ran "pypy-c test_all.py". The pypy-c executable itself died during the first test, so the current pypy tip appears to be broken. (Of course, I could be doing something wrong...) -BobC |
From: Christopher F. <chr...@gm...> - 2011-07-08 05:06:00
|
On 7/5/11 5:22 AM, Bob Cunningham wrote: > > > On 07/05/2011 01:26 AM, Bob Cunningham wrote: >> On 07/05/2011 01:00 AM, Jan Decaluwe wrote: >>> On 07/05/2011 07:06 AM, Bob Cunningham wrote: >>>> I just downloaded and installed MyHDL 0.7 and pypy under Fedora 15. >>>> >>>> I first did the install using python, and "python test_all.py" ran without correctly. >>>> >>>> I repeated the install using pypy, and "pypy test_all.py" ran with 4 errors and 1 fail. >>>> Are these failures expected for the current versions of MyHDL and pypy? >>> http://myhdl.org/doku.php/performance#installation_hints_and_known_issues >>> >> Is there a known pypy nightly build that passes test_all.py > > I just cloned the pypy repository and built the pypy tip (and found a new love for the ASCII Mandelbrot). Though there were a gazillion warnings, the build completed. I ran the following: > > $ ./pypy-c > Python 2.7.1 (2630c86662b4, Jul 05 2011, 08:25:11) > [PyPy 1.5.0-alpha0 with GCC 4.6.0] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > And now for something completely different: ``- how will the fact that they are > used in our repl change our topics?'' > >>>> 46 - 4 > 42 > >>>> from test import pystone > >>>> pystone.main() > Pystone(1.1) time for 50000 passes = 0.381942 > This machine benchmarks at 130910 pystones/second > > So the new pypy-c is at least minimally functional. > > Next, I manually installed myhdl for the new pypy-c executable, without error. > > Then I ran "pypy-c test_all.py". The pypy-c executable itself died during the first test, so the current pypy tip appears to be broken. (Of course, I could be doing something wrong...) > > -BobC > I think you would need a pypy 1.5.1 variant (I could be wrong) that would include the fix for the conversion and traceSignal functions. I believe most have used the version (binaries supplied) that Jan D. mentions in his write-up. And simply avoid using the conversion (toVerilog, toVHDL) and the traceSignal functions. If you have both cpython and pypy you can work around the issue till the next pypy release. Use pypy for the simulations and cpython for conversion. Hope that helps, Chris |