[pypy-dev] Unknown Operation Re: What Causes An Ambiguous low-level helper specialization Error?

Andrew Francis andrewfr_ice at yahoo.com
Wed Jan 25 19:56:09 CET 2012


Hello Amaury:

Yes you are right! I commented out the print statement. I'll fix that later (it is there to check if the code is emitting the correct answers. I can change that a bunch of asserts). 


Out of curiosity, I thought there was some sort of rpython lint utility out there? Perhaps I can use that to help me catch those sort of errors (I wrote a version of the code in Python to catch mistakes). 


However now I am getting:

[rtyper] -=- specialized 2 more blocks -=-
[canraise:WARNING] Unknown operation: stm_transaction_boundary
[canraise:WARNING] Unknown operation: stm_transaction_boundary
[canraise:WARNING] Unknown operation: stm_transaction_boundary
[canraise:WARNING] Unknown operation: stm_transaction_boundary
[rtyper] -=- specialized 0 more blocks -=-
[backendopt:inlining] phase with threshold factor: 32.4
[backendopt:inlining] heuristic: pypy.translator.backendopt.inline.inlining_heuristic


.
.
.[translation:ERROR]  CompilationError: CompilationError(err="""
[translation:ERROR]     translator_stm_test_bank.c: In function ‘pypy_g_transactionA’:
[translation:ERROR]     translator_stm_test_bank.c:257: warning: implicit declaration of function ‘OP_STM_TRANSACTION_BOUNDARY’
[translation:ERROR]     translator_stm_test_bank.o: In function `pypy_g_transactionB':
[translation:ERROR]     translator_stm_test_bank.c:(.text+0xc7): undefined reference to `OP_STM_TRANSACTION_BOUNDARY'
[translation:ERROR]     translator_stm_test_bank.o: In function `pypy_g_transactionA':
[translation:ERROR]     translator_stm_test_bank.c:(.text+0x295): undefined reference to `OP_STM_TRANSACTION_BOUNDARY'
[translation:ERROR]     collect2: ld returned 1 exit status
[translation:ERROR]     make: *** [bank-c] Error 1
[translation:ERROR]     """)
[translation] start debugger...
> /home/andrew/pypy-stm/pypy/translator/platform/__init__.py(138)_handle_error()
-> raise CompilationError(stdout, stderr)

Again, the command I am using to compile the code is:
python ../../goal/translate.py --stm --gc=none bank.py

I have bank.py in the same directory as targetdemo.py and I use the same command.

I can't wait to see this code compile! Bank accounts are the "hello world" of transactional programming!

Cheers,
Andrew






________________________________
 From: Amaury Forgeot d'Arc <amauryfa at gmail.com>
To: Andrew Francis <andrewfr_ice at yahoo.com> 
Cc: Armin Rigo <arigo at tunes.org>; "pypy-dev at codespeak.net" <pypy-dev at codespeak.net> 
Sent: Wednesday, January 25, 2012 1:04 PM
Subject: Re: [pypy-dev] What Causes An Ambiguous low-level helper specialization Error?
 

Hi,


2012/1/25 Andrew Francis <andrewfr_ice at yahoo.com>

> /home/andrew/pypy-stm/pypy/rpython/lltypesystem/rstr.py(978)do_stringformat()
>-> assert isinstance(r_arg, IntegerRepr)
This one is easy: you are formatting a float with %d,
which is not supported by RPython.
For your debug output, use %s instead.

-- 
Amaury Forgeot d'Arc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20120125/ff36b9f5/attachment-0001.html>


More information about the pypy-dev mailing list