[pypy-dev] Problems Installing STM

Andrew Francis andrewfr_ice at yahoo.com
Thu Jan 5 20:34:20 CET 2012

Hi Armin:

 From: Armin Rigo <arigo at tunes.org>
To: Andrew Francis <andrewfr_ice at yahoo.com> 
Cc: "pypy-dev at codespeak.net" <pypy-dev at codespeak.net> 
Sent: Thursday, January 5, 2012 5:46 AM
Subject: Re: [pypy-dev] Problems Installing STM
>You don't need a PyPy at all, pre-compiled or not.  You don't need
>virtualenv either.

Thanks for clarifying this.

>As documented at various places, you run the tests by saying:
>   python ../../../test_all.py test_rstm.py

Me bad. Ran the tests. All four passed.

>The only fully-compiled multithreaded demo using stm is in
>pypy/translator/stm/test/targetdemo.py, which you can use instead of
>bpnn.py in the line above.


>You are getting this because the support is only good enough to run

Yes I realise running bpnn is pointless in regards to STM. But it did alert me to the --stm option.
I ran the targetdemo and the error is:

[translation:ERROR]  AssertionError: cast_ptr_to_adr(gcref) is a bad idea with STM.  Consider checking config.stm in <FunctionGraph of (pypy.rpython.memory.gc.minimark:427)MiniMarkGC.post_setup at 0x98f82d4>

How is this fixed?

As a sidenote: I would like to get to a stage where I can take simple Haskell STM examples and transcribe them into RPython. The first being the "Hello World of STM" : the deposit/withdrawl programme.

I am looking at the targetdemo programme. The only place that references rstm is

for i in range(LENGTH):
        add_at_end_of_chained_list(glob.anchor, i)
 print "thread done"

I don't see rstm.begin_transaction() being called. Is this implicit with when a thread starts? 

In general, what sort of feedback are you looking for at this stage?


A bientôt,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20120105/6a7ed38d/attachment.html>

More information about the pypy-dev mailing list