Robert Bradshaw wrote:
> On Jan 8, 2009, at 4:10 PM, Michael Abshoff wrote:
Hi Robert,
<SNIP>
>> I am tempted to drop in 0.11-devel and see if it compiles the
>> Sage
>> library and if it then even starts Sage :).
>
> I've been meaning to do the same too, but just haven't had time. I
> haven't tried compiling Sage with 0.11 for too long...
Well, I don't get very far:
AttributeError: 'CoerceToTempNode' object has no attribute 'old_temp'
Traceback (most recent call last):
File "/scratch/mabshoff/junk/sage-3.2.4.alpha0/local/bin//cython",
line 8, in <module>
main(command_line = 1)
File
"/scratch/mabshoff/junk/sage-3.2.4.alpha0/local/lib/python2.5/site-packages/Cython/Compiler/Main.py",
line 730, in main
result = compile(sources, options)
File
"/scratch/mabshoff/junk/sage-3.2.4.alpha0/local/lib/python2.5/site-packages/Cython/Compiler/Main.py",
line 707, in compile
return compile_multiple(source, options)
File
"/scratch/mabshoff/junk/sage-3.2.4.alpha0/local/lib/python2.5/site-packages/Cython/Compiler/Main.py",
line 677, in compile_multiple
result = run_pipeline(source, options)
File
"/scratch/mabshoff/junk/sage-3.2.4.alpha0/local/lib/python2.5/site-packages/Cython/Compiler/Main.py",
line 539, in run_pipeline
err, enddata = context.run_pipeline(pipeline, source)
File
"/scratch/mabshoff/junk/sage-3.2.4.alpha0/local/lib/python2.5/site-packages/Cython/Compiler/Main.py",
line 198, in run_pipeline
data = phase(data)
File
"/scratch/mabshoff/junk/sage-3.2.4.alpha0/local/lib/python2.5/site-packages/Cython/Compiler/Main.py",
line 139, in generate_pyx_code
module_node.process_implementation(options, result)
File
"/scratch/mabshoff/junk/sage-3.2.4.alpha0/local/lib/python2.5/site-packages/Cython/Compiler/ModuleNode.py",
line 71, in process_implementation
self.generate_c_code(env, options, result)
File
"/scratch/mabshoff/junk/sage-3.2.4.alpha0/local/lib/python2.5/site-packages/Cython/Compiler/ModuleNode.py",
line 266, in generate_c_code
self.body.generate_function_definitions(env, code)
File
"/scratch/mabshoff/junk/sage-3.2.4.alpha0/local/lib/python2.5/site-packages/Cython/Compiler/Nodes.py",
line 325, in generate_function_definitions
stat.generate_function_definitions(env, code)
File
"/scratch/mabshoff/junk/sage-3.2.4.alpha0/local/lib/python2.5/site-packages/Cython/Compiler/Nodes.py",
line 325, in generate_function_definitions
stat.generate_function_definitions(env, code)
File
"/scratch/mabshoff/junk/sage-3.2.4.alpha0/local/lib/python2.5/site-packages/Cython/Compiler/Nodes.py",
line 1049, in generate_function_definitions
self.body.generate_execution_code(code)
File
"/scratch/mabshoff/junk/sage-3.2.4.alpha0/local/lib/python2.5/site-packages/Cython/Compiler/Nodes.py",
line 331, in generate_execution_code
stat.generate_execution_code(code)
File
"/scratch/mabshoff/junk/sage-3.2.4.alpha0/local/lib/python2.5/site-packages/Cython/Compiler/Nodes.py",
line 3076, in generate_execution_code
self.dup.free_temps(code)
File
"/scratch/mabshoff/junk/sage-3.2.4.alpha0/local/lib/python2.5/site-packages/Cython/Compiler/ExprNodes.py",
line 712, in free_temps
self.release_temp_result(code)
File
"/scratch/mabshoff/junk/sage-3.2.4.alpha0/local/lib/python2.5/site-packages/Cython/Compiler/ExprNodes.py",
line 666, in release_temp_result
if self.old_temp:
AttributeError: 'CoerceToTempNode' object has no attribute 'old_temp'
This is head of 0.11-devel and I made sure the old Cython was removed.
>> Hopefully 0.11 will come soon
>
> Yep. I think the primary bottleneck is the above (and fixing any bugs
> we find there). I would also like a "memleak" mode for doctests, like
> the timing code, where it would run each block, say, twice, then get
> the memory usage, then run the block again and see if it went up at
> all. This would be great to have in general, but would also make me
> much happier knowing I didn't introduce new memory leaks.
I think running things in a loop until they no longer grow the heap is
great, but running it twice will likely not even come close to cutting
it. I have played with muppy which offers a mode to do deltas of two
heap states and I have plans to add this to Sage once I find time, i.e.
I would run a doctest in a loop a reasonable number of times and if it
still leaks after say 100 reps we have a problem. But this is mostly in
the "it would be really nice to have" stage at this point :)
It might be interesting to check out how muppy would fit into this leak
testing framework. It is similar to guppy, but seems faster and more
elegant. guppy seems to be more powerful overall, but if I get what I
want out of muppy I wouldn't care.
>> and we will find a way to integrate the refcount nanny as a special
>> mode during doctesting of Sage, i.e. during compile time of Cython
>> activate it and if we then somehow could have the doctesting framework
>> have some mode where *every* reference was watched this would truly
>> rock. If this is expensive performance wise it doesn't matter since it
>> would be a special debug mode :)
>
> Yeah. Even if it was slower, it wouldn't be as slow as Valgrind
Sure, but the memleaks we target here are very different in nature and
trying to find them with the "other" tool respectively is an exercise in
futility :(
And valgrind offers other fun tools like exp-omega, exp-ptrcheck and so
on :)
> - Robert
Cheers,
Michael
> _______________________________________________
> Cython-dev mailing list
> [email protected]
> http://codespeak.net/mailman/listinfo/cython-dev
>
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev