I took your 'dead code' suggestion to heart and instead focused on getting
the Sage Cell Server 2 (2012-09-25) to install successfully in sage-5.4.rc2.

Unlike in 5.4.rc1, all of the patches in [1] install without issue and the
upgrade to IPython 0.14.dev goes smoothly.
Installation of [2] fails, so I wrote bc-sage-001.patch and
bc-sage-002.patch to allow 01-sage-embedded.patch and 02-sage-show.patch,
respectively, to succeed.
Once [2] was installed, configured, and compiled, the Sage Cell Server was
accessible at localhost:8888.  However, it was throwing the same errors I
saw in my installation in sage-5.4.rc1.
I increased the memory allocation from 512 to 2048 as you suggested, and it
now began generating usable tracebacks.  I made bc-sage-003.patch to fix
the remaining problems.

It now works!  plot(y) gives me the graph I've wanted.

What is the proper procedure for providing the patches I made to someone
who can include them 'the right way'?  Their contents are available here:
bc-sage-001.patch - http://pastebin.com/P7kMNub2
bc-sage-002.patch - http://pastebin.com/nGjs800e
bc-sage-003.patch - http://pastebin.com/m91jvS0r

Where and in what format can I contribute documentation?  A sketch of my
installation procedure is available here:
Sage Cell Server 2 on Sage Math 5.4 rc2 - http://pastebin.com/7sBMHGdG

Thanks again for your help!

[1] http://trac.sagemath.org/sage_trac/ticket/12719
[2]
http://sage.math.washington.edu/home/jason/sagecell-spkg/sagecell-2012-09-25.spkg

*
  Brandon Curtis, PhD Candidate
UC Berkeley - Chem/Bio Eng <http://www.linkedin.com/in/brandoncurtis>
<https://kindle.amazon.com/profile/Brandon-Curtis/5046185>
  <https://plus.google.com/u/0/105858766264293200612/about>
<http://brandoncurtis.net>
  <http://jbei.org>
*


On Sat, Nov 3, 2012 at 3:14 AM, Jason Grout <[email protected]>wrote:

> On 11/2/12 6:26 PM, Brandon Curtis wrote:
>
>> Whether I use plot(y,x,-2,2), plot(y,(x,-2,2)), plot(y,x,(-2,2)),
>> plot(y,(-2,2)), or plot(y,-2,2), the Notebook happily produces the same
>> plot and the Cell Server unhappily throws errors.
>>
>
> Okay.  I can't reproduce the error (yet) with my config.
>
>
>> var('x y')
>> y = x
>> plot(y)
>>
>> In addition to the IPython sys.excepthook error:
>>
>> {{{
>> File
>> "/opt/sage/sage-5.4.rc1/local/**lib/python2.7/site-packages/**
>> ipython-0.14.dev-py2.7.egg/**IPython/core/ultratb.py",
>> line 754, in structured_traceback
>> }}}
>>
>> {{{
>> Traceback (most recent call last):
>>    File "/opt/sage/sage-5.4.rc1/devel/**sagecell-main/receiver.py", line
>> 181, in <module>
>>      receiver.start()
>>    File "/opt/sage/sage-5.4.rc1/devel/**sagecell-main/receiver.py", line
>> 36, in start
>>      response = handler(msg["content"])
>>    File "/opt/sage/sage-5.4.rc1/devel/**sagecell-main/receiver.py", line
>> 127, in start_kernel
>>      reply_content = self.km.start_kernel(resource_**
>> limits=resource_limits)
>>    File
>> "/opt/sage/sage-5.4.rc1/devel/**sagecell-main/untrusted_**kernel_manager.py",
>> line
>> 11, in start_kernel
>>      x = self.fkm.start_kernel(**resource_limits=resource_**limits)
>>    File
>> "/opt/sage/sage-5.4.rc1/devel/**sagecell-main/forking_kernel_**
>> manager.py",
>> line 79, in start_kernel
>>      proc.start()
>>    File
>> "/opt/sage/sage-5.4.rc1/local/**lib/python/multiprocessing/**process.py",
>> line 130, in start
>>      self._popen = Popen(self)
>>    File
>> "/opt/sage/sage-5.4.rc1/local/**lib/python/multiprocessing/**forking.py",
>> line 125, in __init__
>>      code = process_obj._bootstrap()
>>    File
>> "/opt/sage/sage-5.4.rc1/local/**lib/python/multiprocessing/**process.py",
>> line 274, in _bootstrap
>>      sys.stderr.write('Process %s:\n' % self.name <http://self.name>)
>> MemoryError
>> }}}
>>
>
> Check the memory limits in the config.  It looks like the default memory
> limit is 512MB, which actually seems a little low:
>
> https://github.com/sagemath/**sagecell/blob/master/config_**default.py#L39<https://github.com/sagemath/sagecell/blob/master/config_default.py#L39>
>
> Can you try increasing that to see if that solves your problem? Increasing
> it to 1 or 2 GB may help.
>
> "RLIMIT_AS": 1024*(2**20) # 1GB memory
>
> This may also be the difference in our systems---I'm running on OS X,
> where the RLIMIT_AS is not a hard limit, but a suggestion.
>
>
>
>
>
>> sagecell.log repeats these two lines many times over, which I assume
>> have to do with forking to allow multiple users to access it
>> simultaneously:
>> {{{
>> 8d22e437: 2012-11-02 15:58:58,239 To connect another client to this
>> kernel, use:
>> 8d22e437: 2012-11-02 15:58:58,239 --existing kernel-5637.json
>> }}}
>>
>
> Those messages appear when IPython forks a new kernel.
>
>
>
>  Is there an indication whether this is an error specific to IPython or
>> to Sage Cell?  What other logs should I look through?
>>
>
> Try increasing the memory.  I notice that the one linux installation I
> have of the sage cell, I have the memory limit set at 2GB, not 512MB like
> the default is.  My development setup is on OS X, where the memory limit
> doesn't mean anything.
>
>
>  I know this is still under heavy development, but I'd really like to get
>> a Cell Server working to demo in my class.
>> I will build sage-5.0 and attempt to install the older Cell Server
>> (https://github.com/sagemath/**sagecell/blob/master/README.**rst<https://github.com/sagemath/sagecell/blob/master/README.rst>)
>> while I
>> continue to troubleshoot this in parallel.
>>
>>
> I'd suggest not spending time on the old sage cell server since it is
> essentially dead code at this point.  But of course, that's up to you.
>
>
> Thanks,
>
> Jason
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-support" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to sage-support+unsubscribe@**
> googlegroups.com <sage-support%[email protected]>.
> Visit this group at 
> http://groups.google.com/**group/sage-support?hl=en<http://groups.google.com/group/sage-support?hl=en>
> .
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
Visit this group at http://groups.google.com/group/sage-support?hl=en.


Reply via email to