#9170: cygwin: get_memory_usage isn't implemented
--------------------------+-------------------------------------------------
Reporter: was | Owner: tbd
Type: defect | Status: needs_review
Priority: major | Milestone: sage-5.7
Component: cygwin | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: | Stopgaps:
--------------------------+-------------------------------------------------
Old description:
> {{{
>
> sage -t "devel/sage/sage/misc/getusage.py"
> **********************************************************************
> File "/home/wstein/sage-4.4.3/devel/sage/sage/misc/getusage.py", line 30:
> sage: print "ignore this"; top() # random output
> Exception raised:
> Traceback (most recent call last):
> File "/home/wstein/sage-4.4.3/local/bin/ncadoctest.py", line 1231,
> in run_one_test
> self.run_one_example(test, example, filename, compileflags)
> File "/home/wstein/sage-4.4.3/local/bin/sagedoctest.py", line 38,
> in run_one_example
> OrigDocTestRunner.run_one_example(self, test, example, filename,
> compileflags)
> File "/home/wstein/sage-4.4.3/local/bin/ncadoctest.py", line 1172,
> in run_one_example
> compileflags, 1) in test.globs
> File "<doctest __main__.example_1[2]>", line 1, in <module>
> print "ignore this"; top() # random output###line
> 30:
> sage: print "ignore this"; top() # random output
> File "/home/wstein/sage-4.4.3/local/lib/python/site-
> packages/sage/misc/getusage.py", line 57, in top
> raise NotImplementedError("top not implemented on platform %s" %
> U)
> NotImplementedError: top not implemented on platform cygwin_nt-5.1
> **********************************************************************
> File "/home/wstein/sage-4.4.3/devel/sage/sage/misc/getusage.py", line 92:
> sage: t = get_memory_usage()
> Exception raised:
> Traceback (most recent call last):
> File "/home/wstein/sage-4.4.3/local/bin/ncadoctest.py", line 1231,
> in run_one_test
> self.run_one_example(test, example, filename, compileflags)
> File "/home/wstein/sage-4.4.3/local/bin/sagedoctest.py", line 38,
> in run_one_example
> OrigDocTestRunner.run_one_example(self, test, example, filename,
> compileflags)
> File "/home/wstein/sage-4.4.3/local/bin/ncadoctest.py", line 1172,
> in run_one_example
> compileflags, 1) in test.globs
> File "<doctest __main__.example_2[2]>", line 1, in <module>
> t = get_memory_usage()###line 92:
> sage: t = get_memory_usage()
> File "/home/wstein/sage-4.4.3/local/lib/python/site-
> packages/sage/misc/getusage.py", line 128, in get_memory_usage
> raise NotImplementedError("memory usage not implemented on
> platform %s" % U)
> NotImplementedError: memory usage not implemented on platform
> cygwin_nt-5.1
> **********************************************************************
> File "/home/wstein/sage-4.4.3/devel/sage/sage/misc/getusage.py", line 93:
> sage: get_memory_usage(t) # amount of memory more than when
> we defined t.
> Exception raised:
> Traceback (most recent call last):
> File "/home/wstein/sage-4.4.3/local/bin/ncadoctest.py", line 1231,
> in run_one_test
> self.run_one_example(test, example, filename, compileflags)
> File "/home/wstein/sage-4.4.3/local/bin/sagedoctest.py", line 38,
> in run_one_example
> OrigDocTestRunner.run_one_example(self, test, example, filename,
> compileflags)
> File "/home/wstein/sage-4.4.3/local/bin/ncadoctest.py", line 1172,
> in run_one_example
> compileflags, 1) in test.globs
> File "<doctest __main__.example_2[3]>", line 1, in <module>
> get_memory_usage(t) # amount of memory more than when we
> defined t.###line 93:
> sage: get_memory_usage(t) # amount of memory more than when
> we defined t.
> NameError: name 't' is not defined
> **********************************************************************
> }}}
>
> Cygwin has {{{top}}} now, so it's straightforward to fix.
New description:
{{{
sage -t "devel/sage/sage/misc/getusage.py"
**********************************************************************
File "/home/wstein/sage-4.4.3/devel/sage/sage/misc/getusage.py", line 30:
sage: print "ignore this"; top() # random output
Exception raised:
Traceback (most recent call last):
File "/home/wstein/sage-4.4.3/local/bin/ncadoctest.py", line 1231,
in run_one_test
self.run_one_example(test, example, filename, compileflags)
File "/home/wstein/sage-4.4.3/local/bin/sagedoctest.py", line 38, in
run_one_example
OrigDocTestRunner.run_one_example(self, test, example, filename,
compileflags)
File "/home/wstein/sage-4.4.3/local/bin/ncadoctest.py", line 1172,
in run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_1[2]>", line 1, in <module>
print "ignore this"; top() # random output###line
30:
sage: print "ignore this"; top() # random output
File "/home/wstein/sage-4.4.3/local/lib/python/site-
packages/sage/misc/getusage.py", line 57, in top
raise NotImplementedError("top not implemented on platform %s" %
U)
NotImplementedError: top not implemented on platform cygwin_nt-5.1
**********************************************************************
File "/home/wstein/sage-4.4.3/devel/sage/sage/misc/getusage.py", line 92:
sage: t = get_memory_usage()
Exception raised:
Traceback (most recent call last):
File "/home/wstein/sage-4.4.3/local/bin/ncadoctest.py", line 1231,
in run_one_test
self.run_one_example(test, example, filename, compileflags)
File "/home/wstein/sage-4.4.3/local/bin/sagedoctest.py", line 38, in
run_one_example
OrigDocTestRunner.run_one_example(self, test, example, filename,
compileflags)
File "/home/wstein/sage-4.4.3/local/bin/ncadoctest.py", line 1172,
in run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_2[2]>", line 1, in <module>
t = get_memory_usage()###line 92:
sage: t = get_memory_usage()
File "/home/wstein/sage-4.4.3/local/lib/python/site-
packages/sage/misc/getusage.py", line 128, in get_memory_usage
raise NotImplementedError("memory usage not implemented on
platform %s" % U)
NotImplementedError: memory usage not implemented on platform
cygwin_nt-5.1
**********************************************************************
File "/home/wstein/sage-4.4.3/devel/sage/sage/misc/getusage.py", line 93:
sage: get_memory_usage(t) # amount of memory more than when
we defined t.
Exception raised:
Traceback (most recent call last):
File "/home/wstein/sage-4.4.3/local/bin/ncadoctest.py", line 1231,
in run_one_test
self.run_one_example(test, example, filename, compileflags)
File "/home/wstein/sage-4.4.3/local/bin/sagedoctest.py", line 38, in
run_one_example
OrigDocTestRunner.run_one_example(self, test, example, filename,
compileflags)
File "/home/wstein/sage-4.4.3/local/bin/ncadoctest.py", line 1172,
in run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_2[3]>", line 1, in <module>
get_memory_usage(t) # amount of memory more than when we
defined t.###line 93:
sage: get_memory_usage(t) # amount of memory more than when
we defined t.
NameError: name 't' is not defined
**********************************************************************
}}}
Cygwin has {{{top}}} now, so it's straightforward to fix.
'''apply'''
* [attachment:trac_9170.patch]
--
Comment (by dimpase):
please test the patch (on Cygwin you might need to install {{{top}}}). The
patch works on my Cygwin install just fine.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9170#comment:22>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.